Home
last modified time | relevance | path

Searched refs:writer (Results 1 – 25 of 93) sorted by relevance

1234

/system/tools/sysprop/
DCppGen.cpp241 CodeWriter writer(kIndent); in GenerateHeader() local
243 writer.Write("%s", kGeneratedFileFooterComments); in GenerateHeader()
245 writer.Write("#pragma once\n\n"); in GenerateHeader()
246 writer.Write("%s", kCppHeaderIncludes); in GenerateHeader()
249 writer.Write("namespace %s {\n\n", cpp_namespace.c_str()); in GenerateHeader()
260 writer.Write("\n"); in GenerateHeader()
269 writer.Write("enum class %s {\n", GetCppEnumName(prop).c_str()); in GenerateHeader()
270 writer.Indent(); in GenerateHeader()
273 writer.Write("%s,\n", ToUpper(name).c_str()); in GenerateHeader()
275 writer.Dedent(); in GenerateHeader()
[all …]
DJavaGen.cpp155 void WriteJavaAnnotation(CodeWriter& writer, sysprop::Scope scope);
276 void WriteJavaAnnotation(CodeWriter& writer, sysprop::Scope scope) { in WriteJavaAnnotation() argument
279 writer.Write("/** @hide */\n"); in WriteJavaAnnotation()
280 writer.Write("@SystemApi\n"); in WriteJavaAnnotation()
283 writer.Write("/** @hide */\n"); in WriteJavaAnnotation()
305 CodeWriter writer(kIndent); in GenerateJavaClass() local
306 writer.Write("%s", kGeneratedFileFooterComments); in GenerateJavaClass()
307 writer.Write("package %s;\n\n", package_name.c_str()); in GenerateJavaClass()
308 writer.Write("%s", kJavaFileImports); in GenerateJavaClass()
309 WriteJavaAnnotation(writer, classScope); in GenerateJavaClass()
[all …]
/system/tools/aidl/
Daidl_to_java.cpp171 c.writer << c.parcel << ".writeInt(((" << c.var << ")?(1):(0)));\n"; in WriteToParcelFor()
175 c.writer << c.parcel << ".writeBooleanArray(" << c.var << ");\n"; in WriteToParcelFor()
179 c.writer << c.parcel << ".writeByte(" << c.var << ");\n"; in WriteToParcelFor()
183 c.writer << c.parcel << ".writeByteArray(" << c.var << ");\n"; in WriteToParcelFor()
187 c.writer << c.parcel << ".writeInt(((int)" << c.var << "));\n"; in WriteToParcelFor()
191 c.writer << c.parcel << ".writeCharArray(" << c.var << ");\n"; in WriteToParcelFor()
195 c.writer << c.parcel << ".writeInt(" << c.var << ");\n"; in WriteToParcelFor()
199 c.writer << c.parcel << ".writeIntArray(" << c.var << ");\n"; in WriteToParcelFor()
203 c.writer << c.parcel << ".writeLong(" << c.var << ");\n"; in WriteToParcelFor()
207 c.writer << c.parcel << ".writeLongArray(" << c.var << ");\n"; in WriteToParcelFor()
[all …]
Daidl_to_cpp_common.cpp186 void WriteLogFor(CodeWriter& writer, const AidlTypeSpecifier& type, const std::string& name, in WriteLogFor() argument
195 writer << log << " = Json::Value(Json::arrayValue);\n"; in WriteLogFor()
196 writer << "for (const auto& v: " << var_object_expr << ") " << log << ".append("; in WriteLogFor()
197 info.toJsonValueExpr(writer, "v", isNdk); in WriteLogFor()
198 writer << ");"; in WriteLogFor()
200 writer << log << " = "; in WriteLogFor()
201 info.toJsonValueExpr(writer, var_object_expr, isNdk); in WriteLogFor()
202 writer << ";"; in WriteLogFor()
204 writer << "\n"; in WriteLogFor()
207 void WriteLogForArguments(CodeWriterPtr& writer, const AidlArgument& a, bool isServer, in WriteLogForArguments() argument
[all …]
Dcode_writer_unittest.cpp32 CodeWriter& writer = *ptr; in TEST() local
33 writer << "Write this"; in TEST()
34 writer.Close(); in TEST()
41 CodeWriter& writer = *ptr; in TEST() local
42 writer << "Write this " << "and that"; in TEST()
43 writer.Close(); in TEST()
/system/linkerconfig/modules/tests/
Dconfigwriter_test.cc37 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
39 writer.WriteLine(kSampleContent); in TEST()
41 ASSERT_EQ(writer.ToString(), "Lorem ipsum dolor sit amet\n"); in TEST()
45 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
46 writer.WriteLine("Sample text(%d) : %s", 10, kSampleContent); in TEST()
47 ASSERT_EQ(writer.ToString(), in TEST()
52 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
53 writer.WriteLine(kSampleContent); in TEST()
54 writer.SetPrefix("SAMPLE.TEST."); in TEST()
55 writer.WriteLine("Text : %s", kSampleContent); in TEST()
[all …]
Dsection_test.cc102 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
117 section.WriteConfig(writer); in TEST()
118 auto config = writer.ToString(); in TEST()
123 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
128 section.WriteConfig(writer); in TEST()
129 auto config = writer.ToString(); in TEST()
134 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
138 section.WriteBinaryPaths(writer); in TEST()
139 auto binary_paths = writer.ToString(); in TEST()
Dlink_test.cc29 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
34 link->WriteConfig(writer); in TEST()
35 auto config_text = writer.ToString(); in TEST()
43 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
48 link->WriteConfig(writer); in TEST()
49 auto config_text = writer.ToString(); in TEST()
Dnamespace_test.cc61 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
66 ns->WriteConfig(writer); in TEST()
67 auto config = writer.ToString(); in TEST()
73 android::linkerconfig::modules::ConfigWriter writer; in TEST() local
80 ns->WriteConfig(writer); in TEST()
81 auto config = writer.ToString(); in TEST()
/system/tools/sysprop/tests/
DCodeWriterUnitTest.cpp39 CodeWriter writer(kIndent); in TEST() local
40 writer.Write("test1\ntest2\n"); in TEST()
41 writer.Indent(); in TEST()
42 writer.Write("test3\ntest4\n"); in TEST()
43 writer.Indent(); in TEST()
44 writer.Write("test5\ntest6\n"); in TEST()
45 writer.Dedent(); in TEST()
46 writer.Dedent(); in TEST()
47 writer.Write("test7\ntest8\n"); in TEST()
49 ASSERT_EQ(writer.Code(), in TEST()
[all …]
/system/core/libziparchive/
Dzip_writer_test.cc49 ZipWriter writer(file_); in TEST_F() local
53 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F()
54 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F()
55 ASSERT_EQ(0, writer.WriteBytes("llo", 3)); in TEST_F()
56 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
57 ASSERT_EQ(0, writer.Finish()); in TEST_F()
76 ZipWriter writer(file_); in TEST_F() local
78 ASSERT_EQ(0, writer.StartEntry("file.txt", 0)); in TEST_F()
79 ASSERT_EQ(0, writer.WriteBytes("he", 2)); in TEST_F()
80 ASSERT_EQ(0, writer.FinishEntry()); in TEST_F()
[all …]
Dzip_archive_benchmark.cpp35 ZipWriter writer(fp); in CreateZip() local
40 writer.StartEntry(lastName.c_str(), ZipWriter::kCompress); in CreateZip()
41 writer.WriteBytes("helo", 4); in CreateZip()
42 writer.FinishEntry(); in CreateZip()
44 writer.Finish(); in CreateZip()
/system/libufdt/utils/src/
Dmkdtimg_core.c243 struct dt_image_writer *writer = NULL; in dt_image_writer_start() local
246 writer = malloc(sizeof(struct dt_image_writer)); in dt_image_writer_start()
247 if (!writer) goto error; in dt_image_writer_start()
252 writer->img_fp = img_fp; in dt_image_writer_start()
253 init_dt_global_options(&writer->global_options); in dt_image_writer_start()
254 init_dt_options(&writer->entry_options); in dt_image_writer_start()
255 writer->entry_filename[0] = '\0'; in dt_image_writer_start()
256 writer->entry_count = entry_count; in dt_image_writer_start()
257 writer->entry_offset = sizeof(struct dt_table_header); in dt_image_writer_start()
258 writer->dt_offset = in dt_image_writer_start()
[all …]
/system/timezone/tzlookup_generator/src/main/java/com/android/libcore/timezone/tzlookup/
DTzLookupFile.java90 StringWriter writer = new StringWriter(); in write() local
91 writeRaw(timeZones, writer); in write()
92 String rawXml = writer.getBuffer().toString(); in write()
133 static void writeXml(TimeZones timeZones, XMLStreamWriter writer) in writeXml() argument
135 writer.writeStartElement(TIMEZONES_ELEMENT); in writeXml()
136 writer.writeAttribute(IANA_VERSION_ATTRIBUTE, timeZones.ianaVersion); in writeXml()
137 CountryZones.writeXml(timeZones.countryZones, writer); in writeXml()
138 writer.writeEndElement(); in writeXml()
149 static void writeXml(CountryZones countryZones, XMLStreamWriter writer) in writeXml() argument
151 writer.writeStartElement(COUNTRY_ZONES_ELEMENT); in writeXml()
[all …]
/system/linkerconfig/modules/
Dnamespace.cc29 void Namespace::WritePathString(ConfigWriter& writer, in WritePathString() argument
35 writer.WriteLine(prefix + (is_first ? "= " : "+= ") + path); in WritePathString()
54 void Namespace::WriteConfig(ConfigWriter& writer) { in WriteConfig() argument
55 writer.SetPrefix("namespace." + name_ + "."); in WriteConfig()
57 writer.WriteLine("isolated = %s", is_isolated_ ? "true" : "false"); in WriteConfig()
60 writer.WriteLine("visible = true"); in WriteConfig()
63 WritePathString(writer, "search", search_paths_); in WriteConfig()
64 WritePathString(writer, "permitted", permitted_paths_); in WriteConfig()
65 WritePathString(writer, "asan.search", asan_search_paths_); in WriteConfig()
66 WritePathString(writer, "asan.permitted", asan_permitted_paths_); in WriteConfig()
[all …]
Dsection.cc40 void Section::WriteConfig(ConfigWriter& writer) { in WriteConfig() argument
41 writer.WriteLine("[%s]", name_.c_str()); in WriteConfig()
58 writer.WriteLine("additional.namespaces = " + additional_namespaces); in WriteConfig()
62 ns.second->WriteConfig(writer); in WriteConfig()
66 void Section::WriteBinaryPaths(ConfigWriter& writer) { in WriteBinaryPaths() argument
67 writer.SetPrefix("dir." + name_ + " = "); in WriteBinaryPaths()
70 writer.WriteLine(path); in WriteBinaryPaths()
73 writer.ResetPrefix(); in WriteBinaryPaths()
Dlink.cc22 void Link::WriteConfig(ConfigWriter& writer) { in WriteConfig() argument
23 writer.SetPrefix("namespace." + origin_namespace_ + ".link." + in WriteConfig()
26 writer.WriteLine(".allow_all_shared_libs = true"); in WriteConfig()
31 writer.WriteLine(".shared_libs %s %s", in WriteConfig()
36 writer.ResetPrefix(); in WriteConfig()
/system/extras/simpleperf/
Drecord_file_test.cpp56 std::unique_ptr<RecordFileWriter> writer = RecordFileWriter::CreateInstance(tmpfile_.path); in TEST_F() local
57 ASSERT_TRUE(writer != nullptr); in TEST_F()
61 ASSERT_TRUE(writer->WriteAttrSection(attr_ids_)); in TEST_F()
66 ASSERT_TRUE(writer->WriteRecord(mmap_record)); in TEST_F()
69 ASSERT_TRUE(writer->BeginWriteFeatures(1)); in TEST_F()
77 ASSERT_TRUE(writer->WriteBuildIdFeature(build_id_records)); in TEST_F()
78 ASSERT_TRUE(writer->EndWriteFeatures()); in TEST_F()
79 ASSERT_TRUE(writer->Close()); in TEST_F()
104 std::unique_ptr<RecordFileWriter> writer = RecordFileWriter::CreateInstance(tmpfile_.path); in TEST_F() local
105 ASSERT_TRUE(writer != nullptr); in TEST_F()
[all …]
/system/core/fs_mgr/libfiemap_writer/
Dutility.cpp31 auto writer = FiemapWriter::Open(file_path, 1); in DetermineMaximumFileSize() local
32 if (!writer) { in DetermineMaximumFileSize()
37 switch (writer->fs_type()) { in DetermineMaximumFileSize()
51 result -= (result % writer->block_size()); in DetermineMaximumFileSize()
54 LOG(ERROR) << "Unknown file system type: " << writer->fs_type(); in DetermineMaximumFileSize()
59 writer = nullptr; in DetermineMaximumFileSize()
/system/nvram/messages/
Dmessage_codec.cpp30 ProtoWriter* writer, in Encode() argument
34 return encoder.Encode(writer); in Encode()
39 ProtoWriter writer(&counting_stream); in GetSize() local
40 return EncodeData(&writer) ? counting_stream.bytes_written() : 0; in GetSize()
43 bool MessageEncoderBase::Encode(ProtoWriter* writer) { in Encode() argument
67 return writer->WriteLengthHeader(GetSize()) && EncodeData(writer); in Encode()
70 bool MessageEncoderBase::EncodeData(ProtoWriter* writer) { in EncodeData() argument
73 writer->set_field_number(desc.field_number); in EncodeData()
74 if (!desc.encode_function(object_, writer)) { in EncodeData()
/system/tools/hidl/docs/src/
Dmain.kt24 import writer.files.*
41 val (parser, writer) = parseAndGetWriter(tokens) in main() constant
47 if (writer.writeToFile()) println("$LOG_NAME Wrote file: ${writer.path}") in main()
58 if (config.verbose) writer.printInfo() in main()
75 val writer: AbstractParserFileWriter in parseAndGetWriter() constant
78 writer = InterfaceFileWriter(parser) in parseAndGetWriter()
81 writer = TypesFileWriter(parser) in parseAndGetWriter()
83 return Pair(parser, writer) in parseAndGetWriter()
/system/nvram/messages/include/nvram/messages/
Dproto.hpp134 NVRAM_NOINLINE bool EncodeField(const Type& value, ProtoWriter* writer) { in EncodeField() argument
135 return Codec::Encode(value, writer); in EncodeField()
153 static bool Encode(const Blob& blob, ProtoWriter* writer) { in Encode()
154 return writer->WriteLengthDelimited(blob.data(), blob.size()); in Encode()
189 static bool Encode(const Type& value, ProtoWriter* writer) { in Encode()
190 return writer->WriteVarint(static_cast<uint64_t>(value)); in Encode()
209 static bool Encode(const Vector<ElementType>& vector, ProtoWriter* writer) { in Encode()
211 if (!EncodeField<ElementCodec>(elem, writer)) { in Encode()
230 static bool Encode(const Optional<ValueType>& value, ProtoWriter* writer) { in Encode()
231 return !value.valid() || EncodeField<ValueCodec>(value.value(), writer); in Encode()
[all …]
/system/tools/hidl/docs/
DAndroid.bp23 "src/writer/formatutils.kt",
24 "src/writer/elements/TypedefElement.kt",
25 "src/writer/elements/EnumElement.kt",
26 "src/writer/elements/AbstractElement.kt",
27 "src/writer/elements/CompoundElement.kt",
28 "src/writer/elements/MethodElement.kt",
29 "src/writer/files/AbstractFileWriter.kt",
30 "src/writer/files/InterfaceFileWriter.kt",
31 "src/writer/files/IndexFileWriter.kt",
32 "src/writer/files/TypesFileWriter.kt",
[all …]
/system/update_engine/payload_consumer/
Dfile_descriptor_utils.cc40 DirectExtentWriter* writer, in CommonHashExtents() argument
61 if (writer) { in CommonHashExtents()
63 writer->Write(buf.data(), read_blocks * block_size)); in CommonHashExtents()
85 DirectExtentWriter writer; in CopyAndHashExtents() local
86 TEST_AND_RETURN_FALSE(writer.Init(target, tgt_extents, block_size)); in CopyAndHashExtents()
90 CommonHashExtents(source, src_extents, &writer, block_size, hash_out)); in CopyAndHashExtents()
/system/tools/hidl/docs/src/writer/files/
DAbstractParserFileWriter.kt17 package writer.files
21 import writer.elements.CompoundElement
22 import writer.elements.EnumElement
23 import writer.elements.TypedefElement
24 import writer.getOutPath

1234