2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __SOUSCHEF_DATA_CHEF_H__
18 #define __SOUSCHEF_DATA_CHEF_H__
20 #include "Arguments.h"
29 using Data = std::vector<uint8_t>;
32 * @brief Data Generator
36 virtual ~DataChef() = default;
38 // TODO Allow users to query the type of elements that this DataChef generates
41 * @brief Generate a sequence of 'count' elements as a byte sequence
43 * Let D be the return value of generate(N).
44 * Then, D.size() == N * sizeof(T) where T is the element type.
46 virtual Data generate(int32_t count) const = 0;
50 * @brief Data Generator Factory
52 struct DataChefFactory
54 virtual ~DataChefFactory() = default;
56 virtual std::unique_ptr<DataChef> create(const Arguments &args) const = 0;
59 } // namespace souschef
61 #endif // __SOUSCHEF_DATA_CHEF_H__