Home
last modified time | relevance | path

Searched refs:CodeWriter (Results 1 – 25 of 35) sorted by relevance

12

/system/tools/aidl/
Dgenerate_ndk.h33 void GenerateSource(CodeWriter& out, const AidlTypenames& types, const AidlInterface& defined_type,
35 void GenerateClassSource(CodeWriter& out, const AidlTypenames& types,
37 void GenerateClientSource(CodeWriter& out, const AidlTypenames& types,
39 void GenerateServerSource(CodeWriter& out, const AidlTypenames& types,
41 void GenerateInterfaceSource(CodeWriter& out, const AidlTypenames& types,
43 void GenerateClientHeader(CodeWriter& out, const AidlTypenames& types,
45 void GenerateServerHeader(CodeWriter& out, const AidlTypenames& types,
47 void GenerateInterfaceHeader(CodeWriter& out, const AidlTypenames& types,
50 void GenerateParcelHeader(CodeWriter& out, const AidlTypenames& types,
52 void GenerateParcelSource(CodeWriter& out, const AidlTypenames& types,
[all …]
Dcode_writer.cpp30 CodeWriter::CodeWriter(std::unique_ptr<std::ostream> ostream) : ostream_(std::move(ostream)) {} in CodeWriter() function in android::aidl::CodeWriter
32 std::string CodeWriter::ApplyIndent(const std::string& str) { in ApplyIndent()
43 bool CodeWriter::Write(const char* format, ...) { in Write()
73 void CodeWriter::Indent() { in Indent()
76 void CodeWriter::Dedent() { in Dedent()
82 bool CodeWriter::Close() { in Close()
91 CodeWriter& CodeWriter::operator<<(const char* s) { in operator <<()
96 CodeWriter& CodeWriter::operator<<(const std::string& str) { in operator <<()
101 CodeWriterPtr CodeWriter::ForFile(const std::string& filename) { in ForFile()
109 return CodeWriterPtr(new CodeWriter(std::move(stream))); in ForFile()
[all …]
Dcode_writer.h28 class CodeWriter; variable
29 using CodeWriterPtr = std::unique_ptr<CodeWriter>;
31 class CodeWriter {
46 virtual ~CodeWriter() = default;
47 CodeWriter() = default;
49 CodeWriter& operator<<(const char* s);
50 CodeWriter& operator<<(const std::string& str);
53 CodeWriter(std::unique_ptr<std::ostream> ostream);
Dast_java.h45 class CodeWriter; variable
54 void WriteModifiers(CodeWriter* to, int mod, int mask);
59 virtual void Write(CodeWriter* to) const = 0;
77 void Write(CodeWriter* to) const override;
85 void Write(CodeWriter* to) const override;
97 void WriteDeclaration(CodeWriter* to) const;
98 void Write(CodeWriter* to) const;
109 void Write(CodeWriter* to) const;
123 void Write(CodeWriter* to) const override;
134 void Write(CodeWriter* to) const override;
[all …]
Dcode_writer_unittest.cpp22 using android::aidl::CodeWriter;
31 CodeWriterPtr ptr = CodeWriter::ForString(&str); in TEST()
32 CodeWriter& writer = *ptr; in TEST()
40 CodeWriterPtr ptr = CodeWriter::ForString(&str); in TEST()
41 CodeWriter& writer = *ptr; in TEST()
Dast_java.cpp36 Write(CodeWriter::ForString(&str).get()); in ToString()
40 void WriteModifiers(CodeWriter* to, int mod, int mask) { in WriteModifiers()
68 void WriteArgumentList(CodeWriter* to, const vector<std::shared_ptr<Expression>>& arguments) { in WriteArgumentList()
80 void Field::Write(CodeWriter* to) const { in Write()
98 void LiteralExpression::Write(CodeWriter* to) const { in Write()
104 void StringLiteralExpression::Write(CodeWriter* to) const { in Write()
110 void Variable::WriteDeclaration(CodeWriter* to) const { in WriteDeclaration()
117 void Variable::Write(CodeWriter* to) const { to->Write("%s", name.c_str()); } in Write()
124 void FieldVariable::Write(CodeWriter* to) const { in Write()
134 void LiteralStatement::Write(CodeWriter* to) const { in Write()
[all …]
Dast_cpp.h25 class CodeWriter; variable
44 virtual void Write(CodeWriter* to) const = 0;
58 void Write(CodeWriter* to) const override;
74 void Write(CodeWriter* to) const override;
92 void Write(CodeWriter* to) const override;
118 void Write(CodeWriter* to) const override;
140 void Write(CodeWriter* to) const override;
153 void Write(CodeWriter* to) const override;
180 void Write(CodeWriter* to) const override;
204 void Write(CodeWriter* to) const override;
[all …]
Daidl_to_cpp_common.cpp72 void EnterNamespace(CodeWriter& out, const AidlDefinedType& defined_type) { in EnterNamespace()
78 void LeaveNamespace(CodeWriter& out, const AidlDefinedType& defined_type) { in LeaveNamespace()
99 std::function<void(CodeWriter& w, const string& var_name, bool isNdk)> toJsonValueExpr;
107 [](CodeWriter& c, const string& var_name, bool) { in __anon158e6ed30102()
114 [](CodeWriter& c, const string& var_name, bool) { in __anon158e6ed30202()
121 [](CodeWriter& c, const string& var_name, bool isNdk) { in __anon158e6ed30302()
132 [](CodeWriter& c, const string& var_name, bool) { in __anon158e6ed30402()
139 [](CodeWriter& c, const string& var_name, bool) { in __anon158e6ed30502()
146 [](CodeWriter& c, const string& var_name, bool) { in __anon158e6ed30602()
153 [](CodeWriter& c, const string& var_name, bool) { in __anon158e6ed30702()
[all …]
Dast_cpp.cpp34 Write(CodeWriter::ForString(&str).get()); in ToString()
40 void LiteralDecl::Write(CodeWriter* to) const { in Write()
56 void ClassDecl::Write(CodeWriter* to) const { in Write()
98 void Enum::Write(CodeWriter* to) const { in Write()
138 void ArgList::Write(CodeWriter* to) const { in Write()
162 void ConstructorDecl::Write(CodeWriter* to) const { in Write()
183 void MacroDecl::Write(CodeWriter* to) const { in Write()
206 void MethodDecl::Write(CodeWriter* to) const { in Write()
249 void StatementBlock::Write(CodeWriter* to) const { in Write()
270 void ConstructorImpl::Write(CodeWriter* to) const { in Write()
[all …]
Dgenerate_ndk.cpp44 unique_ptr<CodeWriter> i_writer(io_delegate.GetCodeWriter(i_header)); in GenerateNdkInterface()
50 unique_ptr<CodeWriter> bp_writer(io_delegate.GetCodeWriter(bp_header)); in GenerateNdkInterface()
56 unique_ptr<CodeWriter> bn_writer(io_delegate.GetCodeWriter(bn_header)); in GenerateNdkInterface()
60 unique_ptr<CodeWriter> source_writer = io_delegate.GetCodeWriter(output_file); in GenerateNdkInterface()
70 unique_ptr<CodeWriter> header_writer(io_delegate.GetCodeWriter(header_path)); in GenerateNdkParcel()
76 unique_ptr<CodeWriter> bp_writer(io_delegate.GetCodeWriter(bp_header)); in GenerateNdkParcel()
82 unique_ptr<CodeWriter> bn_writer(io_delegate.GetCodeWriter(bn_header)); in GenerateNdkParcel()
86 unique_ptr<CodeWriter> source_writer = io_delegate.GetCodeWriter(output_file); in GenerateNdkParcel()
103 unique_ptr<CodeWriter> header_writer(io_delegate.GetCodeWriter(header_path)); in GenerateNdkEnumDeclaration()
109 unique_ptr<CodeWriter> bp_writer(io_delegate.GetCodeWriter(bp_header)); in GenerateNdkEnumDeclaration()
[all …]
Dast_java_unittest.cpp49 a_class.Write(CodeWriter::ForString(&actual_output).get()); in TEST()
60 ce.Write(CodeWriter::ForString(&written).get()); in TEST()
Daidl_to_cpp_common.h49 void EnterNamespace(CodeWriter& out, const AidlDefinedType& defined_type);
50 void LeaveNamespace(CodeWriter& out, const AidlDefinedType& defined_type);
Daidl_to_java.h58 CodeWriter& writer; // CodeWriter::Write() is mutable
Dio_delegate.h56 virtual std::unique_ptr<CodeWriter> GetCodeWriter(
Daidl_to_cpp.h29 CodeWriter& writer;
Dgenerate_cpp.cpp504 CodeWriterPtr writer = CodeWriter::ForString(&code); in BuildClientSource()
773 CodeWriterPtr writer = CodeWriter::ForString(&code); in BuildServerSource()
1286 unique_ptr<CodeWriter> code_writer(io_delegate.GetCodeWriter(header_path)); in WriteHeader()
1318 unique_ptr<CodeWriter> writer = io_delegate.GetCodeWriter(output_file); in GenerateCppInterface()
1342 unique_ptr<CodeWriter> header_writer(io_delegate.GetCodeWriter(header_path)); in GenerateCppParcel()
1348 unique_ptr<CodeWriter> bp_writer(io_delegate.GetCodeWriter(bp_header)); in GenerateCppParcel()
1352 unique_ptr<CodeWriter> bn_writer(io_delegate.GetCodeWriter(bn_header)); in GenerateCppParcel()
1356 unique_ptr<CodeWriter> source_writer = io_delegate.GetCodeWriter(output_file); in GenerateCppParcel()
1372 unique_ptr<CodeWriter> header_writer(io_delegate.GetCodeWriter(header_path)); in GenerateCppParcelDeclaration()
1376 unique_ptr<CodeWriter> bp_writer(io_delegate.GetCodeWriter(bp_header)); in GenerateCppParcelDeclaration()
[all …]
Dio_delegate.cpp179 unique_ptr<CodeWriter> IoDelegate::GetCodeWriter( in GetCodeWriter()
182 return CodeWriter::ForFile(file_path); in GetCodeWriter()
Dast_cpp_unittest.cpp91 node.Write(CodeWriter::ForString(&actual_output).get()); in CompareGeneratedCode()
267 decl.Write(CodeWriter::ForString(&written).get()); in TEST_F()
Daidl_to_ndk.h44 CodeWriter& writer;
/system/tools/sysprop/include/
DCodeWriter.h21 class CodeWriter {
23 explicit CodeWriter(std::string indent);
35 CodeWriter(const CodeWriter&) = delete;
36 CodeWriter& operator=(const CodeWriter&) = delete;
/system/tools/sysprop/
DCodeWriter.cpp30 CodeWriter::CodeWriter(std::string indent) : indent_(std::move(indent)) { in CodeWriter() function in CodeWriter
33 void CodeWriter::Write(const char* format, ...) { in Write()
69 void CodeWriter::Indent() { in Indent()
73 void CodeWriter::Dedent() { in Dedent()
/system/tools/sysprop/tests/
DCodeWriterUnitTest.cpp39 CodeWriter writer(kIndent); in TEST()
61 CodeWriter writer(kIndent); in TEST()
/system/tools/xsdc/src/com/android/xsdc/java/
DJavaCodeGenerator.java19 import com.android.xsdc.CodeWriter;
90 try (CodeWriter out = new CodeWriter(fs.getPrintWriter(name + ".java"))) { in print()
98 try (CodeWriter out = new CodeWriter(fs.getPrintWriter(name + ".java"))) { in print()
109 try (CodeWriter out = new CodeWriter(fs.getPrintWriter(name + ".java"))) { in print()
115 try (CodeWriter out = new CodeWriter(fs.getPrintWriter("XmlParser.java"))) { in print()
119 try (CodeWriter out = new CodeWriter(fs.getPrintWriter("XmlWriter.java"))) { in print()
125 private void printEnumClass(CodeWriter out, String name, XsdRestriction restrictionType) in printEnumClass()
161 private void printClass(CodeWriter out, String name, XsdComplexType complexType, in printClass()
267 private void printParser(CodeWriter out, String name, XsdComplexType complexType) in printParser()
352 private void printWriter(CodeWriter out, String name, XsdComplexType complexType) in printWriter()
[all …]
/system/tools/xsdc/src/com/android/xsdc/
DCodeWriter.java22 public class CodeWriter implements Closeable { class
27 public CodeWriter(PrintWriter printWriter) { in CodeWriter() method in CodeWriter
/system/tools/aidl/tests/
Dfake_io_delegate.cpp37 class BrokenCodeWriter : public CodeWriter {
73 std::unique_ptr<CodeWriter> FakeIoDelegate::GetCodeWriter( in GetCodeWriter()
76 return unique_ptr<CodeWriter>(new BrokenCodeWriter); in GetCodeWriter()
80 return CodeWriter::ForString(&written_file_contents_[file_path]); in GetCodeWriter()

12