Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
google::protobuf::TextFormat::Printer Class Reference

#include <text_format.h>

Public Member Functions

bool IsInSingleLineMode () const
 
bool Print (const Message &message, io::ZeroCopyOutputStream *output) const
 
 Printer ()
 
void PrintFieldValueToString (const Message &message, const FieldDescriptor *field, int index, std::string *output) const
 
bool PrintToString (const Message &message, std::string *output) const
 
bool PrintUnknownFields (const UnknownFieldSet &unknown_fields, io::ZeroCopyOutputStream *output) const
 
bool PrintUnknownFieldsToString (const UnknownFieldSet &unknown_fields, std::string *output) const
 
bool RegisterFieldValuePrinter (const FieldDescriptor *field, const FastFieldValuePrinter *printer)
 
bool RegisterFieldValuePrinter (const FieldDescriptor *field, const FieldValuePrinter *printer)
 
bool RegisterMessagePrinter (const Descriptor *descriptor, const MessagePrinter *printer)
 
void SetDefaultFieldValuePrinter (const FastFieldValuePrinter *printer)
 
void SetDefaultFieldValuePrinter (const FieldValuePrinter *printer)
 
void SetExpandAny (bool expand)
 
void SetFinder (const Finder *finder)
 
void SetHideUnknownFields (bool hide)
 
void SetInitialIndentLevel (int indent_level)
 
void SetPrintMessageFieldsInIndexOrder (bool print_message_fields_in_index_order)
 
void SetSingleLineMode (bool single_line_mode)
 
void SetTruncateStringFieldLongerThan (const int64 truncate_string_field_longer_than)
 
void SetUseFieldNumber (bool use_field_number)
 
void SetUseShortRepeatedPrimitives (bool use_short_repeated_primitives)
 
void SetUseUtf8StringEscaping (bool as_utf8)
 
 ~Printer ()
 

Private Types

typedef std::map< const Descriptor *, const MessagePrinter * > CustomMessagePrinterMap
 
typedef std::map< const FieldDescriptor *, const FastFieldValuePrinter * > CustomPrinterMap
 

Private Member Functions

void Print (const Message &message, TextGenerator *generator) const
 
bool PrintAny (const Message &message, TextGenerator *generator) const
 
void PrintField (const Message &message, const Reflection *reflection, const FieldDescriptor *field, TextGenerator *generator) const
 
void PrintFieldName (const Message &message, int field_index, int field_count, const Reflection *reflection, const FieldDescriptor *field, TextGenerator *generator) const
 
void PrintFieldValue (const Message &message, const Reflection *reflection, const FieldDescriptor *field, int index, TextGenerator *generator) const
 
void PrintShortRepeatedField (const Message &message, const Reflection *reflection, const FieldDescriptor *field, TextGenerator *generator) const
 
void PrintUnknownFields (const UnknownFieldSet &unknown_fields, TextGenerator *generator) const
 

Private Attributes

CustomMessagePrinterMap custom_message_printers_
 
CustomPrinterMap custom_printers_
 
std::unique_ptr< const FastFieldValuePrinterdefault_field_value_printer_
 
bool expand_any_
 
const Finderfinder_
 
bool hide_unknown_fields_
 
int initial_indent_level_
 
bool print_message_fields_in_index_order_
 
bool single_line_mode_
 
int64 truncate_string_field_longer_than_
 
bool use_field_number_
 
bool use_short_repeated_primitives_
 

Detailed Description

Definition at line 234 of file text_format.h.

Member Typedef Documentation

◆ CustomMessagePrinterMap

Definition at line 417 of file text_format.h.

◆ CustomPrinterMap

Definition at line 413 of file text_format.h.

Constructor & Destructor Documentation

◆ Printer()

google::protobuf::TextFormat::Printer::Printer ( )

Definition at line 1797 of file text_format.cc.

◆ ~Printer()

google::protobuf::TextFormat::Printer::~Printer ( )

Definition at line 1810 of file text_format.cc.

Member Function Documentation

◆ IsInSingleLineMode()

bool google::protobuf::TextFormat::Printer::IsInSingleLineMode ( ) const
inline

Definition at line 266 of file text_format.h.

◆ Print() [1/2]

bool google::protobuf::TextFormat::Printer::Print ( const Message message,
io::ZeroCopyOutputStream output 
) const

Definition at line 1878 of file text_format.cc.

◆ Print() [2/2]

void google::protobuf::TextFormat::Printer::Print ( const Message message,
TextGenerator *  generator 
) const
private

Definition at line 1967 of file text_format.cc.

◆ PrintAny()

bool google::protobuf::TextFormat::Printer::PrintAny ( const Message message,
TextGenerator *  generator 
) const
private

Definition at line 1919 of file text_format.cc.

◆ PrintField()

void google::protobuf::TextFormat::Printer::PrintField ( const Message message,
const Reflection reflection,
const FieldDescriptor field,
TextGenerator *  generator 
) const
private

Definition at line 2198 of file text_format.cc.

◆ PrintFieldName()

void google::protobuf::TextFormat::Printer::PrintFieldName ( const Message message,
int  field_index,
int  field_count,
const Reflection reflection,
const FieldDescriptor field,
TextGenerator *  generator 
) const
private

Definition at line 2285 of file text_format.cc.

◆ PrintFieldValue()

void google::protobuf::TextFormat::Printer::PrintFieldValue ( const Message message,
const Reflection reflection,
const FieldDescriptor field,
int  index,
TextGenerator *  generator 
) const
private

Definition at line 2303 of file text_format.cc.

◆ PrintFieldValueToString()

void google::protobuf::TextFormat::Printer::PrintFieldValueToString ( const Message message,
const FieldDescriptor field,
int  index,
std::string output 
) const

Definition at line 2011 of file text_format.cc.

◆ PrintShortRepeatedField()

void google::protobuf::TextFormat::Printer::PrintShortRepeatedField ( const Message message,
const Reflection reflection,
const FieldDescriptor field,
TextGenerator *  generator 
) const
private

Definition at line 2266 of file text_format.cc.

◆ PrintToString()

bool google::protobuf::TextFormat::Printer::PrintToString ( const Message message,
std::string output 
) const

Definition at line 1859 of file text_format.cc.

◆ PrintUnknownFields() [1/2]

bool google::protobuf::TextFormat::Printer::PrintUnknownFields ( const UnknownFieldSet unknown_fields,
io::ZeroCopyOutputStream output 
) const

Definition at line 1888 of file text_format.cc.

◆ PrintUnknownFields() [2/2]

void google::protobuf::TextFormat::Printer::PrintUnknownFields ( const UnknownFieldSet unknown_fields,
TextGenerator *  generator 
) const
private

Definition at line 2419 of file text_format.cc.

◆ PrintUnknownFieldsToString()

bool google::protobuf::TextFormat::Printer::PrintUnknownFieldsToString ( const UnknownFieldSet unknown_fields,
std::string output 
) const

Definition at line 1869 of file text_format.cc.

◆ RegisterFieldValuePrinter() [1/2]

bool google::protobuf::TextFormat::Printer::RegisterFieldValuePrinter ( const FieldDescriptor field,
const FastFieldValuePrinter printer 
)

Definition at line 1846 of file text_format.cc.

◆ RegisterFieldValuePrinter() [2/2]

bool google::protobuf::TextFormat::Printer::RegisterFieldValuePrinter ( const FieldDescriptor field,
const FieldValuePrinter *  printer 
)

Definition at line 1830 of file text_format.cc.

◆ RegisterMessagePrinter()

bool google::protobuf::TextFormat::Printer::RegisterMessagePrinter ( const Descriptor descriptor,
const MessagePrinter printer 
)

Definition at line 1852 of file text_format.cc.

◆ SetDefaultFieldValuePrinter() [1/2]

void google::protobuf::TextFormat::Printer::SetDefaultFieldValuePrinter ( const FastFieldValuePrinter printer)

Definition at line 1825 of file text_format.cc.

◆ SetDefaultFieldValuePrinter() [2/2]

void google::protobuf::TextFormat::Printer::SetDefaultFieldValuePrinter ( const FieldValuePrinter *  printer)

Definition at line 1820 of file text_format.cc.

◆ SetExpandAny()

void google::protobuf::TextFormat::Printer::SetExpandAny ( bool  expand)
inline

Definition at line 320 of file text_format.h.

◆ SetFinder()

void google::protobuf::TextFormat::Printer::SetFinder ( const Finder finder)
inline

Definition at line 323 of file text_format.h.

◆ SetHideUnknownFields()

void google::protobuf::TextFormat::Printer::SetHideUnknownFields ( bool  hide)
inline

Definition at line 300 of file text_format.h.

◆ SetInitialIndentLevel()

void google::protobuf::TextFormat::Printer::SetInitialIndentLevel ( int  indent_level)
inline

Definition at line 256 of file text_format.h.

◆ SetPrintMessageFieldsInIndexOrder()

void google::protobuf::TextFormat::Printer::SetPrintMessageFieldsInIndexOrder ( bool  print_message_fields_in_index_order)
inline

Definition at line 307 of file text_format.h.

◆ SetSingleLineMode()

void google::protobuf::TextFormat::Printer::SetSingleLineMode ( bool  single_line_mode)
inline

Definition at line 262 of file text_format.h.

◆ SetTruncateStringFieldLongerThan()

void google::protobuf::TextFormat::Printer::SetTruncateStringFieldLongerThan ( const int64  truncate_string_field_longer_than)
inline

Definition at line 332 of file text_format.h.

◆ SetUseFieldNumber()

void google::protobuf::TextFormat::Printer::SetUseFieldNumber ( bool  use_field_number)
inline

Definition at line 269 of file text_format.h.

◆ SetUseShortRepeatedPrimitives()

void google::protobuf::TextFormat::Printer::SetUseShortRepeatedPrimitives ( bool  use_short_repeated_primitives)
inline

Definition at line 278 of file text_format.h.

◆ SetUseUtf8StringEscaping()

void google::protobuf::TextFormat::Printer::SetUseUtf8StringEscaping ( bool  as_utf8)

Definition at line 1815 of file text_format.cc.

Member Data Documentation

◆ custom_message_printers_

CustomMessagePrinterMap google::protobuf::TextFormat::Printer::custom_message_printers_
private

Definition at line 418 of file text_format.h.

◆ custom_printers_

CustomPrinterMap google::protobuf::TextFormat::Printer::custom_printers_
private

Definition at line 414 of file text_format.h.

◆ default_field_value_printer_

std::unique_ptr<const FastFieldValuePrinter> google::protobuf::TextFormat::Printer::default_field_value_printer_
private

Definition at line 411 of file text_format.h.

◆ expand_any_

bool google::protobuf::TextFormat::Printer::expand_any_
private

Definition at line 407 of file text_format.h.

◆ finder_

const Finder* google::protobuf::TextFormat::Printer::finder_
private

Definition at line 420 of file text_format.h.

◆ hide_unknown_fields_

bool google::protobuf::TextFormat::Printer::hide_unknown_fields_
private

Definition at line 403 of file text_format.h.

◆ initial_indent_level_

int google::protobuf::TextFormat::Printer::initial_indent_level_
private

Definition at line 395 of file text_format.h.

◆ print_message_fields_in_index_order_

bool google::protobuf::TextFormat::Printer::print_message_fields_in_index_order_
private

Definition at line 405 of file text_format.h.

◆ single_line_mode_

bool google::protobuf::TextFormat::Printer::single_line_mode_
private

Definition at line 397 of file text_format.h.

◆ truncate_string_field_longer_than_

int64 google::protobuf::TextFormat::Printer::truncate_string_field_longer_than_
private

Definition at line 409 of file text_format.h.

◆ use_field_number_

bool google::protobuf::TextFormat::Printer::use_field_number_
private

Definition at line 399 of file text_format.h.

◆ use_short_repeated_primitives_

bool google::protobuf::TextFormat::Printer::use_short_repeated_primitives_
private

Definition at line 401 of file text_format.h.


The documentation for this class was generated from the following files:


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:09