1 /* 2 * Copyright 2016 The Android Open Source Project 3 * 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 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 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. 15 */ 16 17 #ifndef VTS_COMPILATION_TOOLS_VTSC_CODE_GEN_DRIVER_LEGACYHALCODEGEN_H_ 18 #define VTS_COMPILATION_TOOLS_VTSC_CODE_GEN_DRIVER_LEGACYHALCODEGEN_H_ 19 20 #include <fstream> 21 #include <iostream> 22 #include <sstream> 23 #include <string> 24 25 #include "test/vts/proto/ComponentSpecificationMessage.pb.h" 26 27 #include "code_gen/driver/HalCodeGen.h" 28 29 using namespace std; 30 31 namespace android { 32 namespace vts { 33 34 class LegacyHalCodeGen : public HalCodeGen { 35 public: 36 LegacyHalCodeGen(const char* input_vts_file_path) 37 : HalCodeGen(input_vts_file_path) {} 38 39 protected: 40 void GenerateCppBodyFuzzFunction(Formatter& out, 41 const ComponentSpecificationMessage& message, 42 const string& fuzzer_extended_class_name) override; 43 44 void GenerateCppBodyGetAttributeFunction(Formatter& out, 45 const ComponentSpecificationMessage& message, 46 const string& fuzzer_extended_class_name) override; 47 48 void GenerateClassConstructionFunction(Formatter& out, 49 const ComponentSpecificationMessage& message, 50 const string& fuzzer_extended_class_name) override; 51 52 // instance variable name (e.g., submodule_); 53 static const char* const kInstanceVariableName; 54 }; 55 56 } // namespace vts 57 } // namespace android 58 59 #endif // VTS_COMPILATION_TOOLS_VTSC_CODE_GEN_DRIVER_LEGACYHALCODEGEN_H_ 60