Home
last modified time | relevance | path

Searched refs:AutoPtr (Results 1 - 25 of 58) sorted by relevance

123

/drivers/hdf_core/framework/tools/hdi-gen/parser/
H A Dparser.h31 bool operator()(const AutoPtr<AST> &lhs, const AutoPtr<AST> &rhs) const in operator ()()
36 using AstMergeMap = std::map<std::string, std::set<AutoPtr<AST>, AstCompare>>;
45 using StrAstMap = std::unordered_map<std::string, AutoPtr<AST>>;
90 AutoPtr<ASTAttr> ParseInfAttrInfo(const AttrSet &attrs);
92 void CheckInterfaceAttr(const AutoPtr<ASTInterfaceType> &interface, Token token);
94 void ParseInterfaceBody(const AutoPtr<ASTInterfaceType> &interface);
96 AutoPtr<ASTMethod> ParseMethod(const AutoPtr<ASTInterfaceType> &interface);
98 AutoPtr<ASTAtt
[all...]
H A Dparser.cpp46 AutoPtr<ASTEnumType> g_currentEnum = nullptr;
236 AutoPtr<AST> importAst = (iter != allAsts_.end()) ? iter->second : nullptr; in ParseImportInfo()
262 AutoPtr<ASTSequenceableType> seqType = new ASTSequenceableType(); in ParseSequenceableInfo()
271 AutoPtr<AST> seqAst = new AST(); in ParseSequenceableInfo()
396 AutoPtr<ASTInterfaceType> interfaceType = new ASTInterfaceType; in ParseInterface()
397 AutoPtr<ASTAttr> astAttr = ParseInfAttrInfo(attrs); in ParseInterface()
422 AutoPtr<ASTAttr> Parser::ParseInfAttrInfo(const AttrSet &attrs) in ParseInfAttrInfo()
424 AutoPtr<ASTAttr> infAttr = new ASTAttr(); in ParseInfAttrInfo()
469 void Parser::CheckInterfaceAttr(const AutoPtr<ASTInterfaceType> &interface, Token token) in CheckInterfaceAttr()
496 void Parser::ParseInterfaceBody(const AutoPtr<ASTInterfaceTyp
[all...]
/drivers/hdf_core/framework/tools/hdi-gen/util/
H A Dautoptr.h15 class AutoPtr { class
17 inline AutoPtr() : mPtr(nullptr) {} in AutoPtr() function in OHOS::HDI::AutoPtr
19 AutoPtr(T *other);
21 AutoPtr(const AutoPtr<T> &other);
23 AutoPtr(AutoPtr<T> &&other);
25 ~AutoPtr();
27 AutoPtr &operator=(T *other);
29 AutoPtr
74 AutoPtr<T>::AutoPtr(T *other) : mPtr(other) AutoPtr() function in OHOS::HDI::AutoPtr
82 AutoPtr<T>::AutoPtr(const AutoPtr<T> &other) : mPtr(other.mPtr) AutoPtr() function in OHOS::HDI::AutoPtr
90 AutoPtr<T>::AutoPtr(AutoPtr<T> &&other) : mPtr(other.mPtr) AutoPtr() function in OHOS::HDI::AutoPtr
[all...]
/drivers/hdf_core/framework/tools/hdi-gen/ast/
H A Dast.h54 using StrASTMap = std::unordered_map<std::string, AutoPtr<AST>>;
55 using TypeStringMap = std::unordered_map<std::string, AutoPtr<ASTType>>;
100 AutoPtr<ASTNamespace> ParseNamespace(const std::string &nspaceStr);
102 void AddNamespace(const AutoPtr<ASTNamespace> &nspace);
104 AutoPtr<ASTNamespace> FindNamespace(const std::string &nspaceStr);
106 AutoPtr<ASTNamespace> GetNamespace(size_t index);
108 inline std::vector<AutoPtr<ASTNamespace>> GetNamespace() in GetNamespace()
118 void AddInterfaceDef(const AutoPtr<ASTInterfaceType> &interface);
120 inline AutoPtr<ASTInterfaceType> GetInterfaceDef() in GetInterfaceDef()
125 void AddSequenceableDef(const AutoPtr<ASTSequenceableTyp
[all...]
H A Dast_namespace.h33 void AddNamespace(const AutoPtr<ASTNamespace> &innerNspace);
35 AutoPtr<ASTNamespace> FindNamespace(const std::string &nspaceStr);
37 AutoPtr<ASTNamespace> GetNamespace(size_t index);
44 void AddInterface(const AutoPtr<ASTInterfaceType> &interface);
46 AutoPtr<ASTInterfaceType> GetInterface(size_t index);
53 void AddSequenceable(const AutoPtr<ASTSequenceableType> &sequenceable);
55 AutoPtr<ASTSequenceableType> GetSequenceable(size_t index);
72 std::vector<AutoPtr<ASTNamespace>> innerNamespaces_;
73 std::vector<AutoPtr<ASTSequenceableType>> sequenceables_;
74 std::vector<AutoPtr<ASTInterfaceTyp
[all...]
H A Dast_namespace.cpp20 void ASTNamespace::AddNamespace(const AutoPtr<ASTNamespace> &innerNspace) in AddNamespace()
30 AutoPtr<ASTNamespace> ASTNamespace::FindNamespace(const std::string &nspaceStr) in FindNamespace()
37 innerNamespaces_.begin(), innerNamespaces_.end(), [nspaceStr](const AutoPtr<ASTNamespace> &element) { in FindNamespace()
43 AutoPtr<ASTNamespace> ASTNamespace::GetNamespace(size_t index) in GetNamespace()
52 void ASTNamespace::AddInterface(const AutoPtr<ASTInterfaceType> &interface) in AddInterface()
61 AutoPtr<ASTInterfaceType> ASTNamespace::GetInterface(size_t index) in GetInterface()
70 void ASTNamespace::AddSequenceable(const AutoPtr<ASTSequenceableType> &sequenceable) in AddSequenceable()
79 AutoPtr<ASTSequenceableType> ASTNamespace::GetSequenceable(size_t index) in GetSequenceable()
H A Dast_enum_type.h32 inline void SetType(const AutoPtr<ASTType> &type) in SetType()
37 inline AutoPtr<ASTType> GetType() in GetType()
42 inline void SetExprValue(const AutoPtr<ASTExpr> &value) in SetExprValue()
47 inline AutoPtr<ASTExpr> GetExprValue() in GetExprValue()
54 AutoPtr<ASTType> mType_;
55 AutoPtr<ASTExpr> value_;
72 inline void SetAttribute(const AutoPtr<ASTAttr> &attr) in SetAttribute()
89 void SetBaseType(const AutoPtr<ASTType> &baseType);
91 AutoPtr<ASTType> GetBaseType();
93 bool AddMember(const AutoPtr<ASTEnumValu
[all...]
H A Dast_method.h32 inline void SetAttribute(AutoPtr<ASTAttr> attr) in SetAttribute()
39 inline AutoPtr<ASTAttr> GetAttribute() const in GetAttribute()
69 void CheckOverload(AutoPtr<ASTInterfaceType> interface);
71 void AddParameter(const AutoPtr<ASTParameter> &parameter);
73 AutoPtr<ASTParameter> GetParameter(size_t index);
99 AutoPtr<ASTAttr> attr_ = new ASTAttr();
100 std::vector<AutoPtr<ASTParameter>> parameters_;
H A Dast.cpp71 AutoPtr<ASTNamespace> AST::ParseNamespace(const std::string &nspaceStr) in ParseNamespace()
73 AutoPtr<ASTNamespace> currNspace; in ParseNamespace()
78 AutoPtr<ASTNamespace> nspace; in ParseNamespace()
98 void AST::AddNamespace(const AutoPtr<ASTNamespace> &nspace) in AddNamespace()
106 AutoPtr<ASTNamespace> AST::FindNamespace(const std::string &nspaceStr) in FindNamespace()
116 AutoPtr<ASTNamespace> AST::GetNamespace(size_t index) in GetNamespace()
125 void AST::AddInterfaceDef(const AutoPtr<ASTInterfaceType> &interface) in AddInterfaceDef()
135 void AST::AddSequenceableDef(const AutoPtr<ASTSequenceableType> &sequenceable) in AddSequenceableDef()
145 void AST::AddType(const AutoPtr<ASTType> &type) in AddType()
154 AutoPtr<ASTTyp
[all...]
H A Dast_interface_type.h37 void SetNamespace(const AutoPtr<ASTNamespace> &nspace) override;
49 void SetAttribute(const AutoPtr<ASTAttr> &attr) in SetAttribute()
59 inline AutoPtr<ASTAttr> GetAttribute() const in GetAttribute()
99 void AddMethod(const AutoPtr<ASTMethod> &method);
101 AutoPtr<ASTMethod> GetMethod(size_t index);
103 std::vector<AutoPtr<ASTMethod>> GetMethodsBySystem(SystemLevel system) const;
110 void AddVersionMethod(const AutoPtr<ASTMethod> &method) in AddVersionMethod()
115 AutoPtr<ASTMethod> GetVersionMethod() in GetVersionMethod()
120 bool AddExtendsInterface(AutoPtr<ASTInterfaceType> interface);
122 AutoPtr<ASTInterfaceTyp
[all...]
H A Dast_parameter.h21 ASTParameter(const std::string &name, ParamAttr attribute, const AutoPtr<ASTType> &type) in ASTParameter()
26 ASTParameter(const std::string &name, const AutoPtr<ASTParamAttr> &attribute, const AutoPtr<ASTType> &type) in ASTParameter()
36 inline AutoPtr<ASTType> GetType() in GetType()
76 AutoPtr<ASTParamAttr> attr_;
77 AutoPtr<ASTType> type_;
H A Dast_struct_type.h35 inline void SetAttribute(const AutoPtr<ASTAttr> &attr) in SetAttribute()
52 void SetParentType(const AutoPtr<ASTStructType> &parentType);
54 void AddMember(const AutoPtr<ASTType> &typeName, std::string name);
56 inline std::vector<std::tuple<std::string, AutoPtr<ASTType>>> GetMembers() in GetMembers()
74 inline AutoPtr<ASTType> GetMemberType(size_t index) in GetMemberType()
131 AutoPtr<ASTAttr> attr_;
132 std::vector<std::tuple<std::string, AutoPtr<ASTType>>> members_;
133 AutoPtr<ASTStructType> parentType_; // used to dump parent type when using struct extension identify in idl
H A Dast_map_type.h21 inline void SetKeyType(const AutoPtr<ASTType> &keyType) in SetKeyType()
26 inline AutoPtr<ASTType> GetKeyType() in GetKeyType()
31 inline void SetValueType(const AutoPtr<ASTType> &valueType) in SetValueType()
36 inline AutoPtr<ASTType> GetValueType() in GetValueType()
81 AutoPtr<ASTType> keyType_;
82 AutoPtr<ASTType> valueType_;
/drivers/hdf_core/framework/tools/hdi-gen/codegen/
H A Dcode_generator.h20 using CodeEmitMap = std::unordered_map<std::string, AutoPtr<CodeEmitter>>;
21 using CodeGenFunc = std::function<void(const AutoPtr<AST>&, const std::string&)>;
26 using StrAstMap = std::unordered_map<std::string, AutoPtr<AST>>;
33 static void GenIpcCCode(const AutoPtr<AST> &ast, const std::string &outDir);
35 static void GenIpcCppCode(const AutoPtr<AST> &ast, const std::string &outDir);
37 static void GenIpcJavaCode(const AutoPtr<AST> &ast, const std::string &outDir);
39 static void GenPassthroughCCode(const AutoPtr<AST> &ast, const std::string &outDir);
41 static void GenPassthroughCppCode(const AutoPtr<AST> &ast, const std::string &outDir);
43 static void GenKernelCode(const AutoPtr<AST> &ast, const std::string &outDir);
45 static void GenLowCCode(const AutoPtr<AS
[all...]
H A Dc_custom_types_code_emitter.h41 void EmitCustomTypeDecl(StringBuilder &sb, const AutoPtr<ASTType> &type) const;
45 void EmitCustomTypeMarshallingDecl(StringBuilder &sb, const AutoPtr<ASTStructType> &type) const;
47 void EmitCustomTypeUnmarshallingDecl(StringBuilder &sb, const AutoPtr<ASTStructType> &type) const;
49 void EmitCustomTypeFreeDecl(StringBuilder &sb, const AutoPtr<ASTStructType> &type) const;
59 void EmitCustomTypeMarshallingImpl(StringBuilder &sb, const AutoPtr<ASTStructType> &type);
61 void EmitCustomTypeUnmarshallingImpl(StringBuilder &sb, const AutoPtr<ASTStructType> &type);
63 void EmitMarshallingVarDecl(const AutoPtr<ASTStructType> &type,
66 void EmitUnmarshallingVarDecl(const AutoPtr<ASTStructType> &type,
71 void EmitPodTypeUnmarshalling(const AutoPtr<ASTStructType> &type,
74 void EmitMemberUnmarshalling(const AutoPtr<ASTTyp
[all...]
H A Dcpp_client_proxy_code_emitter.h50 const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
55 const AutoPtr<ASTParameter> &param, StringBuilder &sb, const std::string &prefix) const;
77 void EmitProxyMethodImpl(const AutoPtr<ASTInterfaceType> interface, const AutoPtr<ASTMethod> &method,
80 void EmitProxyMethodBody(const AutoPtr<ASTInterfaceType> interface, const AutoPtr<ASTMethod> &method,
85 void EmitWriteFlagOfNeedSetMem(const AutoPtr<ASTMethod> &method, const std::string &dataBufName, StringBuilder &sb,
91 const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
93 void EmitProxyStaticMethodImpl(const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix);
95 void EmitProxyStaticMethodBody(const AutoPtr<ASTMetho
[all...]
H A Dc_service_stub_code_emitter.h54 void EmitServiceStubMethodImpl(const AutoPtr<ASTMethod> &method, StringBuilder &sb,
59 void EmitStubLocalVariable(const AutoPtr<ASTParameter> &param, StringBuilder &sb, const std::string &prefix) const;
61 void EmitReadStubMethodParameter(const AutoPtr<ASTParameter> &param, const std::string &parcelName,
64 void EmitReadCStringStubMethodParameter(const AutoPtr<ASTParameter> &param, const std::string &parcelName,
65 const std::string &gotoLabel, StringBuilder &sb, const std::string &prefix, AutoPtr<ASTType> &type) const;
67 void EmitOutVarMemInitialize(const AutoPtr<ASTParameter> &param, const std::string &parcelName,
70 void EmitStubCallMethod(const AutoPtr<ASTMethod> &method,
74 StringBuilder &sb, const AutoPtr<ASTType> &type, ParamAttr attribute, const std::string &name) const;
77 const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
H A Djava_client_proxy_code_emitter.h46 void EmitProxyMethodImpl(const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
49 const AutoPtr<ASTParameter> &param, StringBuilder &sb, const std::string &prefix) const;
51 void EmitProxyMethodBody(const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
53 void EmitReadMethodParameter(const AutoPtr<ASTParameter> &param, const std::string &parcelName, StringBuilder &sb,
56 void EmitReadVariable(const std::string &parcelName, const std::string &name, const AutoPtr<ASTType> &type,
60 const AutoPtr<ASTArrayType> &arrayType, ParamAttr attribute, StringBuilder &sb,
64 const AutoPtr<ASTArrayType> &arrayType, StringBuilder &sb, const std::string &prefix);
66 void EmitReadOutVariable(const std::string &parcelName, const std::string &name, const AutoPtr<ASTType> &type,
69 void EmitLocalVariable(const AutoPtr<ASTParameter> &param, StringBuilder &sb, const std::string &prefix) const;
H A Dc_code_emitter.cpp18 AutoPtr<ASTType> type = pair.second; in GetStdlibInclusions()
28 AutoPtr<AST> importAst = importPair.second; in GetImportInclusions()
35 const AutoPtr<ASTParameter> &parameter, StringBuilder &sb, const std::string &prefix) const in EmitInterfaceMethodParameter()
41 const AutoPtr<ASTMethod> &method, bool needRW, bool needFree, StringBuilder &sb, const std::string &prefix) const in EmitMethodNeedLoopVar()
48 AutoPtr<ASTParameter> param = method->GetParameter(i); in EmitMethodNeedLoopVar()
56 bool CCodeEmitter::EmitNeedLoopVar(const AutoPtr<ASTType> &type, bool needRW, bool needFree) const in EmitNeedLoopVar()
62 auto rwNeedLoopVar = [needRW](const AutoPtr<ASTType> &elementType) -> bool { in EmitNeedLoopVar()
74 auto freeNeedLoopVar = [needFree](const AutoPtr<ASTType> &elementType) -> bool { in EmitNeedLoopVar()
82 AutoPtr<ASTArrayType> arrType = dynamic_cast<ASTArrayType *>(type.Get()); in EmitNeedLoopVar()
87 AutoPtr<ASTListTyp in EmitNeedLoopVar()
[all...]
H A Dcpp_custom_types_code_emitter.h41 void EmitCustomTypeDecl(StringBuilder &sb, const AutoPtr<ASTType> &type) const;
45 void EmitCustomTypeMarshallingDecl(StringBuilder &sb, const AutoPtr<ASTStructType> &type) const;
47 void EmitCustomTypeUnmarshallingDecl(StringBuilder &sb, const AutoPtr<ASTStructType> &type) const;
57 void EmitCustomTypeMarshallingImpl(StringBuilder &sb, const AutoPtr<ASTStructType> &type) const;
59 void EmitCustomTypeUnmarshallingImpl(StringBuilder &sb, const AutoPtr<ASTStructType> &type) const;
H A Dcpp_service_stub_code_emitter.h46 void EmitStubMethodDecl(const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
71 void EmitStubMethodImpl(AutoPtr<ASTInterfaceType> interface, const AutoPtr<ASTMethod> &method, StringBuilder &sb,
74 void EmitStubStaticMethodImpl(const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
76 void EmitStubCallMethod(const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
80 void EmitStubReadMemFlag(const AutoPtr<ASTMethod> &method, const std::string &parcelName, StringBuilder &sb,
83 void EmitLocalVariable(const AutoPtr<ASTParameter> &param, const std::string &parcelName, StringBuilder &sb,
88 void EmitStubStaticMethodDecl(const AutoPtr<ASTMethod> &method, StringBuilder &sb, const std::string &prefix) const;
H A Dcpp_code_emitter.h23 bool OutPut(const AutoPtr<AST> &ast, const std::string &targetDirectory);
31 const AutoPtr<ASTParameter> &param, StringBuilder &sb, const std::string &prefix) const;
59 void EmitWriteMethodParameter(const AutoPtr<ASTParameter> &param, const std::string &parcelName, StringBuilder &sb,
62 void EmitReadMethodParameter(const AutoPtr<ASTParameter> &param, const std::string &parcelName, bool initVariable,
69 std::string EmitHeaderNameByInterface(AutoPtr<ASTInterfaceType> interface, const std::string &name);
71 std::string EmitDefinitionByInterface(AutoPtr<ASTInterfaceType> interface, const std::string &name) const;
73 std::string GetNameSpaceByInterface(AutoPtr<ASTInterfaceType> interface, const std::string &name);
H A Dc_code_emitter.h29 const AutoPtr<ASTParameter> &parameter, StringBuilder &sb, const std::string &prefix) const;
31 void EmitMethodNeedLoopVar(const AutoPtr<ASTMethod> &method,
34 bool EmitNeedLoopVar(const AutoPtr<ASTType> &type, bool needRW, bool needFree) const;
36 void EmitErrorHandle(const AutoPtr<ASTMethod> &method, const std::string &gotoLabel, bool isClient,
H A Dcpp_code_emitter.cpp24 AutoPtr<ASTType> type = pair.second; in GetStdlibInclusions()
60 AutoPtr<AST> importAst = importPair.second; in GetImportInclusions()
69 const AutoPtr<ASTParameter> &param, StringBuilder &sb, const std::string &prefix) const in EmitInterfaceMethodParameter()
204 AutoPtr<AST> import = importPair.second; in EmitImportUsingNamespace()
214 AutoPtr<ASTType> type = pair.second; in EmitImportUsingNamespace()
227 void CppCodeEmitter::EmitWriteMethodParameter(const AutoPtr<ASTParameter> &param, in EmitWriteMethodParameter()
230 AutoPtr<ASTType> type = param->GetType(); in EmitWriteMethodParameter()
234 void CppCodeEmitter::EmitReadMethodParameter(const AutoPtr<ASTParameter> &param, const std::string &parcelName, in EmitReadMethodParameter()
237 AutoPtr<ASTType> type = param->GetType(); in EmitReadMethodParameter()
273 std::string CppCodeEmitter::EmitHeaderNameByInterface(AutoPtr<ASTInterfaceTyp
[all...]
H A Dc_custom_types_code_emitter.cpp139 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeDecls()
147 void CCustomTypesCodeEmitter::EmitCustomTypeDecl(StringBuilder &sb, const AutoPtr<ASTType> &type) const in EmitCustomTypeDecl()
151 AutoPtr<ASTEnumType> enumType = dynamic_cast<ASTEnumType *>(type.Get()); in EmitCustomTypeDecl()
156 AutoPtr<ASTStructType> structType = dynamic_cast<ASTStructType *>(type.Get()); in EmitCustomTypeDecl()
161 AutoPtr<ASTUnionType> unionType = dynamic_cast<ASTUnionType *>(type.Get()); in EmitCustomTypeDecl()
173 AutoPtr<ASTType> type = ast_->GetTypeDefintion(i); in EmitCustomTypeFuncDecl()
175 AutoPtr<ASTStructType> structType = dynamic_cast<ASTStructType *>(type.Get()); in EmitCustomTypeFuncDecl()
189 StringBuilder &sb, const AutoPtr<ASTStructType> &type) const in EmitCustomTypeMarshallingDecl()
197 StringBuilder &sb, const AutoPtr<ASTStructType> &type) const in EmitCustomTypeUnmarshallingDecl()
204 void CCustomTypesCodeEmitter::EmitCustomTypeFreeDecl(StringBuilder &sb, const AutoPtr<ASTStructTyp
[all...]

Completed in 12 milliseconds

123