Home
last modified time | relevance | path

Searched refs:Formatter (Results 1 – 25 of 83) sorted by relevance

1234

/system/tools/hidl/host_utils/include/hidl-util/
DFormatter.h27 struct Formatter;
53 void print(Formatter& out, bool wrapped) const;
61 friend struct Formatter;
69 struct Formatter { struct
70 static Formatter invalid() { return Formatter(); } in invalid() argument
73 Formatter(FILE* file, size_t spacesPerIndent = 4);
74 Formatter(Formatter&&) = default;
75 ~Formatter();
84 Formatter& indent(size_t level, const std::function<void(void)>& func);
90 Formatter& indent(const std::function<void(void)>& func);
[all …]
/system/tools/hidl/host_utils/
DFormatter.cpp28 Formatter::Formatter() : mFile(nullptr /* invalid */), mIndentDepth(0), mCurrentPosition(0) {} in Formatter() function in android::Formatter
30 Formatter::Formatter(FILE* file, size_t spacesPerIndent) in Formatter() function in android::Formatter
36 Formatter::~Formatter() { in ~Formatter()
43 void Formatter::indent(size_t level) { in indent()
47 void Formatter::unindent(size_t level) { in unindent()
52 Formatter& Formatter::indent(size_t level, const std::function<void(void)>& func) { in indent()
59 Formatter& Formatter::indent(const std::function<void(void)>& func) { in indent()
63 Formatter& Formatter::block(const std::function<void(void)>& func) { in block()
69 void Formatter::pushLinePrefix(const std::string& prefix) { in pushLinePrefix()
73 void Formatter::popLinePrefix() { in popLinePrefix()
[all …]
/system/tools/hidl/
DAST.h39 struct Formatter;
142 void generateCppSource(Formatter& out) const;
144 void generateInterfaceHeader(Formatter& out) const;
145 void generateHwBinderHeader(Formatter& out) const;
146 void generateStubHeader(Formatter& out) const;
147 void generateProxyHeader(Formatter& out) const;
148 void generatePassthroughHeader(Formatter& out) const;
150 void generateCppImplHeader(Formatter& out) const;
151 void generateCppImplSource(Formatter& out) const;
153 void generateCppAdapterHeader(Formatter& out) const;
[all …]
DCompoundType.h64 Formatter &out,
72 Formatter &out,
85 Formatter &out,
91 Formatter &out, const std::string &fieldName) const override;
94 Formatter &out, const std::string &declaredFieldName) const override;
97 Formatter &out,
105 void emitHidlDefinition(Formatter& out) const override;
106 void emitTypeDeclarations(Formatter& out) const override;
107 void emitTypeForwardDeclaration(Formatter& out) const override;
108 void emitPackageTypeDeclarations(Formatter& out) const override;
[all …]
DEnumType.h79 void emitJavaFieldInitializer(Formatter&, const std::string&) const override;
81 void emitJavaFieldDefaultInitialValue(Formatter&, const std::string&) const override;
84 Formatter &out,
92 Formatter &out,
100 void emitHidlDefinition(Formatter& out) const override;
101 void emitTypeDeclarations(Formatter& out) const override;
102 void emitTypeForwardDeclaration(Formatter& out) const override;
103 void emitGlobalTypeDeclarations(Formatter& out) const override;
104 void emitPackageTypeDeclarations(Formatter& out) const override;
105 void emitPackageTypeHeaderDefinitions(Formatter& out) const override;
[all …]
DType.h35 struct Formatter;
203 Formatter &out,
211 Formatter &out,
224 Formatter &out,
229 Formatter &out,
234 Formatter &out,
240 Formatter &out,
244 Formatter &out,
248 Formatter &out,
256 virtual void emitHidlDefinition(Formatter& out) const;
[all …]
DMethod.h39 struct Formatter;
52 using MethodImpl = std::map<MethodImplType, std::function<void(Formatter &)>>;
65 void cppImpl(MethodImplType type, Formatter &out) const;
66 void javaImpl(MethodImplType type, Formatter &out) const;
90 void generateCppReturnType(Formatter &out, bool specifyNamespaces = true) const;
91 void generateCppSignature(Formatter &out,
96 void emitCppArgSignature(Formatter &out, bool specifyNamespaces = true) const;
97 void emitCppResultSignature(Formatter &out, bool specifyNamespaces = true) const;
99 void emitJavaArgSignature(Formatter &out) const;
100 void emitJavaResultSignature(Formatter &out) const;
[all …]
DScope.h32 struct Formatter;
67 void emitTypeDeclarations(Formatter& out) const override;
68 void emitGlobalTypeDeclarations(Formatter& out) const override;
69 void emitPackageTypeDeclarations(Formatter& out) const override;
70 void emitPackageTypeHeaderDefinitions(Formatter& out) const override;
71 void emitPackageHwDeclarations(Formatter& out) const override;
73 void emitHidlDefinition(Formatter& out) const override;
75 void emitJavaTypeDeclarations(Formatter& out, bool atTopLevel) const override;
77 void emitTypeDefinitions(Formatter& out, const std::string& prefix) const override;
81 void emitVtsTypeDeclarations(Formatter& out) const override;
DScalarType.h64 void emitJavaFieldInitializer(Formatter&, const std::string&) const override;
66 void emitJavaFieldDefaultInitialValue(Formatter&, const std::string&) const override;
69 Formatter &out,
77 Formatter &out,
86 Formatter &out,
91 Formatter &out,
95 Formatter &out,
103 void emitVtsTypeDeclarations(Formatter& out) const override;
DMemoryType.h41 Formatter &out,
49 Formatter &out,
61 void emitJavaReaderWriter(Formatter& out,
67 Formatter &out, const std::string &fieldName) const override;
70 Formatter &out, const std::string &declaredFieldName) const override;
73 Formatter& out,
90 void emitVtsTypeDeclarations(Formatter& out) const override;
DStringType.h45 Formatter &out,
53 Formatter &out,
66 Formatter &out, const std::string &fieldName) const override;
69 Formatter &out, const std::string &declaredFieldName) const override;
72 Formatter &out,
83 void emitVtsTypeDeclarations(Formatter& out) const override;
DHandleType.h43 Formatter &out,
51 Formatter &out,
64 Formatter &out, const std::string &fieldName) const override;
67 Formatter &out, const std::string &declaredFieldName) const override;
70 Formatter &out,
84 void emitVtsTypeDeclarations(Formatter& out) const override;
DArrayType.h62 Formatter &out,
70 Formatter &out,
83 Formatter &out,
91 Formatter &out,
97 Formatter &out, const std::string &fieldName) const override;
100 Formatter &out, const std::string &declaredFieldName) const override;
103 Formatter &out,
111 void emitVtsTypeDeclarations(Formatter& out) const override;
DVectorType.h52 Formatter &out,
60 Formatter &out,
73 Formatter &out,
79 Formatter &out, const std::string &fieldName) const override;
82 Formatter &out, const std::string &declaredFieldName) const override;
85 Formatter &out,
94 Formatter &out,
114 Formatter &out,
DInterface.h109 Formatter &out,
116 void emitHidlDefinition(Formatter& out) const override;
118 void emitPackageTypeDeclarations(Formatter& out) const override;
119 void emitPackageTypeHeaderDefinitions(Formatter& out) const override;
120 void emitTypeDefinitions(Formatter& out, const std::string& prefix) const override;
124 Formatter &out,
129 void emitVtsAttributeType(Formatter& out) const override;
131 void emitVtsAttributeDeclaration(Formatter& out) const;
132 void emitVtsMethodDeclaration(Formatter& out, bool isInherited) const;
158 Formatter& out, const std::string& prefix, const std::vector<const Interface*>& chain,
DType.cpp421 Formatter &, in emitReaderWriter() argument
431 Formatter &out, in emitDump()
438 Formatter &out, in emitDumpWithMethod()
451 Formatter &out, in emitJavaDump()
458 Formatter &, in emitReaderWriterEmbedded() argument
473 Formatter &out, in emitJavaReaderWriter()
487 Formatter &out, in emitJavaFieldInitializer()
495 void Type::emitJavaFieldDefaultInitialValue(Formatter &, const std::string &) const {} in emitJavaFieldDefaultInitialValue() argument
498 Formatter &, in emitJavaFieldReaderWriter() argument
508 void Type::handleError(Formatter &out, ErrorMode mode) { in handleError()
[all …]
DScalarType.cpp149 void ScalarType::emitJavaFieldInitializer(Formatter& out, const std::string& fieldName) const { in emitJavaFieldInitializer()
156 void ScalarType::emitJavaFieldDefaultInitialValue(Formatter& out, in emitJavaFieldDefaultInitialValue()
176 Formatter &out, in emitReaderWriter()
193 Formatter &out, in emitReaderWriterWithCast()
240 Formatter &out, in emitHexDump()
247 Formatter &out, in emitConvertToJavaHexString()
281 Formatter &out, in emitJavaFieldReaderWriter()
311 void ScalarType::emitVtsTypeDeclarations(Formatter& out) const { in emitVtsTypeDeclarations()
DHandleType.cpp67 Formatter &out, in emitReaderWriter()
101 Formatter &out, in emitReaderWriterEmbedded()
128 Formatter &out, const std::string &fieldName) const { in emitJavaFieldInitializer()
134 Formatter &out, const std::string &declaredFieldName) const { in emitJavaFieldDefaultInitialValue()
142 Formatter &out, in emitJavaFieldReaderWriter()
187 void HandleType::emitVtsTypeDeclarations(Formatter& out) const { in emitVtsTypeDeclarations()
DMemoryType.cpp63 Formatter &out, const std::string &fieldName) const { in emitJavaFieldInitializer()
69 Formatter &out, const std::string &declaredFieldName) const { in emitJavaFieldDefaultInitialValue()
74 void MemoryType::emitJavaFieldReaderWriter(Formatter& out, in emitJavaFieldReaderWriter()
111 void MemoryType::emitJavaReaderWriter(Formatter& out, in emitJavaReaderWriter()
141 Formatter &out, in emitReaderWriter()
196 Formatter &out, in emitReaderWriterEmbedded()
244 void MemoryType::emitVtsTypeDeclarations(Formatter& out) const { in emitVtsTypeDeclarations()
DStringType.cpp70 Formatter &out, in emitReaderWriter()
125 Formatter &out, in emitReaderWriterEmbedded()
152 Formatter &out, const std::string &fieldName) const { in emitJavaFieldInitializer()
157 Formatter &out, const std::string &declaredFieldName) const { in emitJavaFieldDefaultInitialValue()
162 Formatter &out, in emitJavaFieldReaderWriter()
215 void StringType::emitVtsTypeDeclarations(Formatter& out) const { in emitVtsTypeDeclarations()
DMethod.cpp110 void Method::cppImpl(MethodImplType type, Formatter &out) const { in cppImpl()
120 void Method::javaImpl(MethodImplType type, Formatter &out) const { in javaImpl()
159 void Method::generateCppReturnType(Formatter &out, bool specifyNamespaces) const { in generateCppReturnType()
173 void Method::generateCppSignature(Formatter &out, in generateCppSignature()
188 static void emitCppArgResultSignature(Formatter& out, in emitCppArgResultSignature()
198 static void emitJavaArgResultSignature(Formatter& out, in emitJavaArgResultSignature()
207 void Method::emitCppArgSignature(Formatter &out, bool specifyNamespaces) const { in emitCppArgSignature()
220 void Method::emitCppResultSignature(Formatter &out, bool specifyNamespaces) const { in emitCppResultSignature()
223 void Method::emitJavaArgSignature(Formatter &out) const { in emitJavaArgSignature()
226 void Method::emitJavaResultSignature(Formatter &out) const { in emitJavaResultSignature()
[all …]
/system/tools/hidl/hidl2aidl/
DAidlHelper.h26 struct Formatter;
48 static void emitFileHeader(Formatter& out, const NamedType& type);
50 static Formatter getFileWithHeader(const NamedType& namedType, const Coordinator& coordinator);
66 static Formatter& notes();
67 static void setNotes(Formatter* formatter);
71 static Formatter* notesFormatter;
DAidlHelper.cpp37 Formatter* AidlHelper::notesFormatter = nullptr;
39 Formatter& AidlHelper::notes() { in notes()
44 void AidlHelper::setNotes(Formatter* formatter) { in setNotes()
91 void AidlHelper::emitFileHeader(Formatter& out, const NamedType& type) { in emitFileHeader()
135 Formatter AidlHelper::getFileWithHeader(const NamedType& namedType, in getFileWithHeader()
138 Formatter out = coordinator.getFormatter(namedType.fqName(), Coordinator::Location::DIRECT, in getFileWithHeader()
/system/tools/hidl/c2hal/
DFunctionDeclaration.h42 void generateSource(Formatter &out) const override;
43 void generateParameterSource(Formatter &out) const override;
50 void generateParams(Formatter &out) const;
DDeclaration.h46 void generateCommentText(Formatter &out) const;
51 virtual void generateSource(Formatter &out) const = 0;
54 virtual void generateParameterSource(Formatter &out) const;

1234