1a69a01cdSopenharmony_ci/* 2a69a01cdSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 3a69a01cdSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4a69a01cdSopenharmony_ci * you may not use this file except in compliance with the License. 5a69a01cdSopenharmony_ci * You may obtain a copy of the License at 6a69a01cdSopenharmony_ci * 7a69a01cdSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8a69a01cdSopenharmony_ci * 9a69a01cdSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10a69a01cdSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11a69a01cdSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12a69a01cdSopenharmony_ci * See the License for the specific language governing permissions and 13a69a01cdSopenharmony_ci * limitations under the License. 14a69a01cdSopenharmony_ci */ 15a69a01cdSopenharmony_ci 16a69a01cdSopenharmony_ci#ifndef TEST_WUKONG_DATA_SET_H 17a69a01cdSopenharmony_ci#define TEST_WUKONG_DATA_SET_H 18a69a01cdSopenharmony_ci 19a69a01cdSopenharmony_ci#include <map> 20a69a01cdSopenharmony_ci#include <memory> 21a69a01cdSopenharmony_ci#include <string> 22a69a01cdSopenharmony_ci#include <vector> 23a69a01cdSopenharmony_ci 24a69a01cdSopenharmony_ci#include "filter.h" 25a69a01cdSopenharmony_ci#include "format.h" 26a69a01cdSopenharmony_ci#include "statistics.h" 27a69a01cdSopenharmony_ci#include "table.h" 28a69a01cdSopenharmony_ci#include "wukong_define.h" 29a69a01cdSopenharmony_cinamespace OHOS { 30a69a01cdSopenharmony_cinamespace WuKong { 31a69a01cdSopenharmony_ciclass DataSet { 32a69a01cdSopenharmony_cipublic: 33a69a01cdSopenharmony_ci DataSet() = default; 34a69a01cdSopenharmony_ci ~DataSet() = default; 35a69a01cdSopenharmony_ci void FilterData(std::map<std::string, std::string> data); 36a69a01cdSopenharmony_ci void SetFilterType(std::string filterType); 37a69a01cdSopenharmony_ci void SetFilterStragety(std::shared_ptr<Filter> filter); 38a69a01cdSopenharmony_ci void StatisticsData(); 39a69a01cdSopenharmony_ci void SetStatisticsStragety(std::shared_ptr<Statistics> statistics); 40a69a01cdSopenharmony_ci void FormatData(std::string name, std::string &content); 41a69a01cdSopenharmony_ci void SetFormatStragety(std::shared_ptr<Format> format); 42a69a01cdSopenharmony_ciprivate: 43a69a01cdSopenharmony_ci // filtered data vector 44a69a01cdSopenharmony_ci std::vector<std::map<std::string, std::string>> dataVector_; 45a69a01cdSopenharmony_ci std::shared_ptr<Filter> filter_ = nullptr; 46a69a01cdSopenharmony_ci std::shared_ptr<Format> format_; 47a69a01cdSopenharmony_ci std::shared_ptr<Statistics> statistics_ = nullptr; 48a69a01cdSopenharmony_ci // filtered data vector statistical processing tables 49a69a01cdSopenharmony_ci std::map<std::string, std::shared_ptr<Table>> tables_; 50a69a01cdSopenharmony_ci std::string filterType_; 51a69a01cdSopenharmony_ci}; 52a69a01cdSopenharmony_ci} // namespace WuKong 53a69a01cdSopenharmony_ci} // namespace OHOS 54a69a01cdSopenharmony_ci#endif 55