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_LIBSHARED_CODEGEN_H_
18 #define VTS_COMPILATION_TOOLS_VTSC_CODE_GEN_DRIVER_LIBSHARED_CODEGEN_H_
19 
20 #include <string>
21 
22 #include "code_gen/driver/HalCodeGen.h"
23 #include "test/vts/proto/ComponentSpecificationMessage.pb.h"
24 
25 using namespace std;
26 
27 namespace android {
28 namespace vts {
29 
30 class LibSharedCodeGen : public HalCodeGen {
31  public:
LibSharedCodeGen(const char * input_vts_file_path)32   explicit LibSharedCodeGen(const char* input_vts_file_path)
33       : HalCodeGen(input_vts_file_path) {}
34 
35  protected:
36   void GenerateCppBodyFuzzFunction(Formatter& out,
37       const ComponentSpecificationMessage& message,
38       const string& fuzzer_extended_class_name) override;
39 
40   void GenerateCppBodyGetAttributeFunction(Formatter& out,
41       const ComponentSpecificationMessage& message,
42       const string& fuzzer_extended_class_name) override;
43 
44   void GenerateClassConstructionFunction(Formatter& out,
45       const ComponentSpecificationMessage& message,
46       const string& fuzzer_extended_class_name) override;
47 
48   // instance variable name (e.g., submodule_);
49   static const char* const kInstanceVariableName;
50 };
51 
52 }  // namespace vts
53 }  // namespace android
54 
55 #endif  // VTS_COMPILATION_TOOLS_VTSC_CODE_GEN_DRIVER_LIBSHARED_CODEGEN_H_
56