• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_HALSUBMODULECODEGEN_H_
18 #define VTS_COMPILATION_TOOLS_VTSC_CODE_GEN_DRIVER_HALSUBMODULECODEGEN_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 HalSubmoduleCodeGen : public HalCodeGen {
35  public:
HalSubmoduleCodeGen(const char * input_vts_file_path,const string & vts_name)36   HalSubmoduleCodeGen(const char* input_vts_file_path, const string& vts_name)
37       : HalCodeGen(input_vts_file_path, vts_name) {
38   }
39 
40  protected:
41   void GenerateClassConstructionFunction(Formatter& out,
42       const ComponentSpecificationMessage& message,
43       const string& fuzzer_extended_class_name) override;
44 
45   void GenerateAdditionalFuctionDeclarations(Formatter& out,
46       const ComponentSpecificationMessage& message,
47       const string& fuzzer_extended_class_name) override;
48 
49   void GeneratePrivateMemberDeclarations(Formatter& out,
50       const ComponentSpecificationMessage& message) 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_HALSUBMODULECODEGEN_H_
60