/system/tools/aidl/ |
D | code_writer.cpp | 32 CodeWriter::CodeWriter(std::unique_ptr<std::ostream> ostream) : ostream_(std::move(ostream)) {} in CodeWriter() function in android::aidl::CodeWriter 34 std::string CodeWriter::ApplyIndent(const std::string& str) { in ApplyIndent() 45 bool CodeWriter::Write(const char* format, ...) { in Write() 75 void CodeWriter::Indent() { in Indent() 78 void CodeWriter::Dedent() { in Dedent() 84 bool CodeWriter::Close() { in Close() 93 CodeWriter& CodeWriter::operator<<(const char* s) { in operator <<() 98 CodeWriter& CodeWriter::operator<<(const std::string& str) { in operator <<() 103 CodeWriterPtr CodeWriter::ForFile(const std::string& filename) { in ForFile() 111 return CodeWriterPtr(new CodeWriter(std::move(stream))); in ForFile() [all …]
|
D | code_writer.h | 30 class CodeWriter; variable 31 using CodeWriterPtr = std::unique_ptr<CodeWriter>; 33 class CodeWriter { 48 virtual ~CodeWriter() = default; 49 CodeWriter() = default; 51 CodeWriter& operator<<(const char* s); 52 CodeWriter& operator<<(const std::string& str); 55 CodeWriter(std::unique_ptr<std::ostream> ostream);
|
D | code_writer_unittest.cpp | 22 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() 52 CodeWriterPtr ptr = CodeWriter::ForString(&str); in TEST() 53 CodeWriter& writer = *ptr; in TEST()
|
D | aidl_to_cpp_common.h | 62 void EnterNamespace(CodeWriter& out, const AidlDefinedType& defined_type); 63 void LeaveNamespace(CodeWriter& out, const AidlDefinedType& defined_type); 89 void GenerateEnumClassDecl(CodeWriter& out, const AidlEnumDeclaration& enum_decl, 97 void GenerateParcelableComparisonOperators(CodeWriter& out, const AidlParcelable& parcelable); 99 void GenerateToString(CodeWriter& out, const AidlStructuredParcelable& parcelable); 100 void GenerateToString(CodeWriter& out, const AidlUnionDecl& parcelable); 115 std::function<void(CodeWriter& out, const std::string& var, const AidlTypeSpecifier& type)> 117 std::function<void(CodeWriter& out, const std::string& value, const AidlTypeSpecifier& type)> 129 void PrivateFields(CodeWriter& out) const; 130 void PublicFields(CodeWriter& out) const; [all …]
|
D | ast_java.h | 45 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 …]
|
D | ast_java.cpp | 36 Write(CodeWriter::ForString(&str).get()); in ToString() 40 void WriteComment(CodeWriter* to, const std::string& comment) { in WriteComment() 45 void WriteModifiers(CodeWriter* to, int mod, int mask) { in WriteModifiers() 73 void WriteArgumentList(CodeWriter* to, const vector<std::shared_ptr<Expression>>& arguments) { in WriteArgumentList() 85 void Field::Write(CodeWriter* to) const { in Write() 101 void LiteralExpression::Write(CodeWriter* to) const { in Write() 107 void StringLiteralExpression::Write(CodeWriter* to) const { in Write() 113 void Variable::WriteDeclaration(CodeWriter* to) const { in WriteDeclaration() 120 void Variable::Write(CodeWriter* to) const { to->Write("%s", name.c_str()); } in Write() 127 void FieldVariable::Write(CodeWriter* to) const { in Write() [all …]
|
D | generate_ndk.cpp | 40 void GenerateHeader(CodeWriter& out, const AidlTypenames& types, 42 void GenerateClientHeader(CodeWriter& out, const AidlTypenames& types, 44 void GenerateServerHeader(CodeWriter& out, const AidlTypenames& types, 46 void GenerateSource(CodeWriter& out, const AidlTypenames& types, 50 void GenerateInterfaceClassDecl(CodeWriter& out, const AidlTypenames& types, 52 void GenerateParcelClassDecl(CodeWriter& out, const AidlTypenames& types, 54 void GenerateParcelClassDecl(CodeWriter& out, const AidlTypenames& types, 56 void GenerateEnumClassDecl(CodeWriter& out, const AidlTypenames& types, 60 void GenerateClientHeader(CodeWriter& out, const AidlTypenames& types, 62 void GenerateServerHeader(CodeWriter& out, const AidlTypenames& types, [all …]
|
D | generate_cpp.cpp | 79 void GenerateBreakOnStatusNotOk(CodeWriter& out) { in GenerateBreakOnStatusNotOk() 85 void GenerateGotoErrorOnBadStatus(CodeWriter& out) { in GenerateGotoErrorOnBadStatus() 160 void GenerateMethodDecl(CodeWriter& out, const AidlTypenames& types, const AidlMethod& method, in GenerateMethodDecl() 167 void GenerateClientTransaction(CodeWriter& out, const AidlTypenames& typenames, in GenerateClientTransaction() 310 void GenerateClientMetaTransaction(CodeWriter& out, const AidlInterface& interface, in GenerateClientMetaTransaction() 363 void GenerateClientSource(CodeWriter& out, const AidlInterface& interface, in GenerateClientSource() 413 void GenerateConstantDefinitions(CodeWriter& out, const AidlDefinedType& type, in GenerateConstantDefinitions() 430 void GenerateConstantDeclarations(CodeWriter& out, const AidlDefinedType& type, in GenerateConstantDeclarations() 451 void GenerateServerTransaction(CodeWriter& out, const AidlInterface& interface, in GenerateServerTransaction() 553 void GenerateServerMetaTransaction(CodeWriter& out, const AidlInterface& interface, in GenerateServerMetaTransaction() [all …]
|
D | generate_rust.cpp | 52 CodeWriter& out; 53 MangledAliasVisitor(CodeWriter& out) : out(out) {} in MangledAliasVisitor() 95 void GenerateMangledAliases(CodeWriter& out, const AidlDefinedType& type) { in GenerateMangledAliases() 171 void GenerateClientMethodHelpers(CodeWriter& out, const AidlInterface& iface, in GenerateClientMethodHelpers() 281 void GenerateClientMethod(CodeWriter& out, const AidlInterface& iface, const AidlMethod& method, in GenerateClientMethod() 406 void GenerateServerTransaction(CodeWriter& out, const AidlInterface& interface, in GenerateServerTransaction() 485 void GenerateServerItems(CodeWriter& out, const AidlInterface* iface, in GenerateServerItems() 530 void GenerateDeprecated(CodeWriter& out, const AidlCommentable& type) { in GenerateDeprecated() 541 void GenerateConstantDeclarations(CodeWriter& out, const TypeWithConstants& type, in GenerateConstantDeclarations() 564 void GenerateRustInterface(CodeWriter* code_writer, const AidlInterface* iface, in GenerateRustInterface() [all …]
|
D | generate_cpp_analyzer.cpp | 39 void GenerateAnalyzerTransaction(CodeWriter& out, const AidlInterface& interface, in GenerateAnalyzerTransaction() 128 void GenerateAnalyzerSource(CodeWriter& out, const AidlDefinedType& defined_type, in GenerateAnalyzerSource() 184 void GenerateAnalyzerPlaceholder(CodeWriter& out, const AidlDefinedType& /*defined_type*/, in GenerateAnalyzerPlaceholder() 198 using GenFn = void (*)(CodeWriter & out, const AidlDefinedType& defined_type, in GenerateCppAnalyzer() 201 unique_ptr<CodeWriter> writer(io_delegate.GetCodeWriter(file)); in GenerateCppAnalyzer()
|
D | ast_java_unittest.cpp | 49 a_class.Write(CodeWriter::ForString(&actual_output).get()); in TEST() 60 ce.Write(CodeWriter::ForString(&written).get()); in TEST()
|
D | generate_java.h | 35 void GenerateClass(CodeWriter& out, const AidlDefinedType& defined_type, const AidlTypenames& types, 42 void GenerateConstantDeclarations(CodeWriter& out, const AidlDefinedType& type);
|
D | aidl_to_cpp_common.cpp | 128 void EnterNamespace(CodeWriter& out, const AidlDefinedType& defined_type) { in EnterNamespace() 134 void LeaveNamespace(CodeWriter& out, const AidlDefinedType& defined_type) { in LeaveNamespace() 149 void WriteLogForArgument(CodeWriter& w, const AidlArgument& a, bool is_server, in WriteLogForArgument() 161 CodeWriterPtr writer = CodeWriter::ForString(&code); in GenLogBeforeExecute() 183 CodeWriterPtr writer = CodeWriter::ForString(&code); in GenLogAfterExecute() 245 void GenerateEnumClassDecl(CodeWriter& out, const AidlEnumDeclaration& enum_decl, in GenerateEnumClassDecl() 346 void GenerateParcelableComparisonOperators(CodeWriter& out, const AidlParcelable& parcelable) { in GenerateParcelableComparisonOperators() 419 void GenerateToString(CodeWriter& out, const AidlStructuredParcelable& parcelable) { in GenerateToString() 451 void GenerateToString(CodeWriter& out, const AidlUnionDecl& parcelable) { in GenerateToString() 522 void UnionWriter::PrivateFields(CodeWriter& out) const { in PrivateFields() [all …]
|
D | generate_java.cpp | 82 void GenerateDescribeContentsHelper(CodeWriter& out, const set<string>& describers) { in GenerateDescribeContentsHelper() 141 void GenerateParcelableDescribeContents(CodeWriter& out, const AidlStructuredParcelable& decl, in GenerateParcelableDescribeContents() 162 void GenerateParcelableDescribeContents(CodeWriter& out, const AidlUnionDecl& decl, in GenerateParcelableDescribeContents() 189 void GenerateToString(CodeWriter& out, const AidlStructuredParcelable& parcel, in GenerateToString() 213 void GenerateToString(CodeWriter& out, const AidlUnionDecl& parcel, const AidlTypenames& typenames, in GenerateToString() 238 void GenerateEqualsAndHashCode(CodeWriter& out, const AidlStructuredParcelable& parcel, in GenerateEqualsAndHashCode() 268 void GenerateEqualsAndHashCode(CodeWriter& out, const AidlUnionDecl& decl, in GenerateEqualsAndHashCode() 431 CodeWriterPtr writer = CodeWriter::ForString(&code); in GenerateParcelableClass() 531 CodeWriterPtr writer = CodeWriter::ForString(&code); in GenerateParcelableClass() 572 GenerateConstantDeclarations(*CodeWriter::ForString(&constants), *parcel); in GenerateParcelableClass() [all …]
|
D | aidl_dumpapi.h | 24 CodeWriter& out; 26 DumpVisitor(CodeWriter& out, bool inline_constants) in DumpVisitor()
|
D | aidl_to_java.h | 64 CodeWriter& writer; // CodeWriter::Write() is mutable 110 void GenerateParcelHelpers(CodeWriter& out, const AidlDefinedType& defined_type,
|
D | preprocess.cpp | 34 CodeWriter& out; 35 PreprocessVisitor(CodeWriter& out) : out(out) {} in PreprocessVisitor() 133 unique_ptr<CodeWriter> writer = io_delegate.GetCodeWriter(options.OutputFile()); in Preprocess()
|
D | io_delegate.h | 57 virtual std::unique_ptr<CodeWriter> GetCodeWriter(
|
/system/tools/sysprop/include/ |
D | CodeWriter.h | 21 class CodeWriter { 23 explicit CodeWriter(std::string indent); 35 CodeWriter(const CodeWriter&) = delete; 36 CodeWriter& operator=(const CodeWriter&) = delete;
|
/system/tools/sysprop/ |
D | CodeWriter.cpp | 30 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/aidl/tests/ |
D | fake_io_delegate.cpp | 38 class BrokenCodeWriter : public CodeWriter { 64 std::unique_ptr<CodeWriter> FakeIoDelegate::GetCodeWriter( in GetCodeWriter() 67 return unique_ptr<CodeWriter>(new BrokenCodeWriter); in GetCodeWriter() 70 return CodeWriter::ForString(&written_file_contents_[file_path]); in GetCodeWriter()
|
/system/tools/xsdc/src/main/java/com/android/xsdc/ |
D | CodeWriter.java | 22 public class CodeWriter implements Closeable { class 27 public CodeWriter() { in CodeWriter() method in CodeWriter 31 public CodeWriter(PrintWriter printWriter) { in CodeWriter() method in CodeWriter
|
/system/tools/sysprop/tests/ |
D | CodeWriterUnitTest.cpp | 39 CodeWriter writer(kIndent); in TEST() 61 CodeWriter writer(kIndent); in TEST()
|
/system/tools/xsdc/src/main/java/com/android/xsdc/java/ |
D | JavaCodeGenerator.java | 19 import com.android.xsdc.CodeWriter; 103 try (CodeWriter out = new CodeWriter(fs.getPrintWriter(name + ".java"))) { in print() 111 try (CodeWriter out = new CodeWriter(fs.getPrintWriter(name + ".java"))) { in print() 122 try (CodeWriter out = new CodeWriter(fs.getPrintWriter(name + ".java"))) { in print() 128 try (CodeWriter out = new CodeWriter(fs.getPrintWriter("XmlParser.java"))) { in print() 132 try (CodeWriter out = new CodeWriter(fs.getPrintWriter("XmlWriter.java"))) { in print() 137 try (CodeWriter out = new CodeWriter(fs.getPrintWriter("HexBinaryHelper.java"))) { in print() 143 private void printEnumClass(CodeWriter out, String name, XsdRestriction restrictionType) in printEnumClass() 186 private void printClass(CodeWriter out, String name, XsdComplexType complexType, in printClass() 292 private void printParser(CodeWriter out, String name, XsdComplexType complexType) in printParser() [all …]
|
/system/tools/xsdc/src/main/java/com/android/xsdc/cpp/ |
D | CppCodeGenerator.java | 19 import com.android.xsdc.CodeWriter; 45 private CodeWriter enumsCppFile; 46 private CodeWriter enumsHeaderFile; 47 private CodeWriter parserCppFile; 48 private CodeWriter parserHeaderFile; 121 enumsCppFile = new CodeWriter(fs.getPrintWriter(enumsCppFileName)); in print() 122 enumsHeaderFile = new CodeWriter(fs.getPrintWriter("include/" + enumsHeaderFileName)); in print() 124 enumsCppFile = new CodeWriter(); in print() 125 enumsHeaderFile = new CodeWriter(); in print() 128 parserCppFile = new CodeWriter(fs.getPrintWriter(parserCppFileName)); in print() [all …]
|