Classes | Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
google::protobuf::compiler::cpp::Formatter Class Reference

#include <cpp_helpers.h>

Classes

class  SaveState
 

Public Member Functions

void AddMap (const std::map< std::string, std::string > &vars)
 
 Formatter (io::Printer *printer)
 
 Formatter (io::Printer *printer, const std::map< std::string, std::string > &vars)
 
void Indent () const
 
template<typename... Args>
void operator() (const char *format, const Args &... args) const
 
void Outdent () const
 
io::Printerprinter () const
 
template<typename T >
void Set (const std::string &key, const T &value)
 

Static Private Member Functions

template<typename Descriptor >
static std::string Payload (const Descriptor *descriptor)
 
static std::string ToString (const Descriptor *d)
 
static std::string ToString (const EnumDescriptor *d)
 
static std::string ToString (const EnumValueDescriptor *d)
 
static std::string ToString (const FieldDescriptor *d)
 
static std::string ToString (const OneofDescriptor *d)
 
static std::string ToString (const std::string &s)
 
template<typename I , typename = typename std::enable_if< std::is_integral<I>::value>::type>
static std::string ToString (I x)
 
static std::string ToString (strings::Hex x)
 

Private Attributes

io::Printerprinter_
 
std::map< std::string, std::stringvars_
 

Detailed Description

Definition at line 637 of file cpp_helpers.h.

Constructor & Destructor Documentation

◆ Formatter() [1/2]

google::protobuf::compiler::cpp::Formatter::Formatter ( io::Printer printer)
inlineexplicit

Definition at line 639 of file cpp_helpers.h.

◆ Formatter() [2/2]

google::protobuf::compiler::cpp::Formatter::Formatter ( io::Printer printer,
const std::map< std::string, std::string > &  vars 
)
inline

Definition at line 640 of file cpp_helpers.h.

Member Function Documentation

◆ AddMap()

void google::protobuf::compiler::cpp::Formatter::AddMap ( const std::map< std::string, std::string > &  vars)
inline

Definition at line 649 of file cpp_helpers.h.

◆ Indent()

void google::protobuf::compiler::cpp::Formatter::Indent ( ) const
inline

Definition at line 658 of file cpp_helpers.h.

◆ operator()()

template<typename... Args>
void google::protobuf::compiler::cpp::Formatter::operator() ( const char *  format,
const Args &...  args 
) const
inline

Definition at line 654 of file cpp_helpers.h.

◆ Outdent()

void google::protobuf::compiler::cpp::Formatter::Outdent ( ) const
inline

Definition at line 659 of file cpp_helpers.h.

◆ Payload()

template<typename Descriptor >
static std::string google::protobuf::compiler::cpp::Formatter::Payload ( const Descriptor descriptor)
inlinestaticprivate

Definition at line 694 of file cpp_helpers.h.

◆ printer()

io::Printer* google::protobuf::compiler::cpp::Formatter::printer ( ) const
inline

Definition at line 660 of file cpp_helpers.h.

◆ Set()

template<typename T >
void google::protobuf::compiler::cpp::Formatter::Set ( const std::string key,
const T value 
)
inline

Definition at line 645 of file cpp_helpers.h.

◆ ToString() [1/8]

static std::string google::protobuf::compiler::cpp::Formatter::ToString ( const Descriptor d)
inlinestaticprivate

Definition at line 686 of file cpp_helpers.h.

◆ ToString() [2/8]

static std::string google::protobuf::compiler::cpp::Formatter::ToString ( const EnumDescriptor d)
inlinestaticprivate

Definition at line 687 of file cpp_helpers.h.

◆ ToString() [3/8]

static std::string google::protobuf::compiler::cpp::Formatter::ToString ( const EnumValueDescriptor d)
inlinestaticprivate

Definition at line 688 of file cpp_helpers.h.

◆ ToString() [4/8]

static std::string google::protobuf::compiler::cpp::Formatter::ToString ( const FieldDescriptor d)
inlinestaticprivate

Definition at line 685 of file cpp_helpers.h.

◆ ToString() [5/8]

static std::string google::protobuf::compiler::cpp::Formatter::ToString ( const OneofDescriptor d)
inlinestaticprivate

Definition at line 691 of file cpp_helpers.h.

◆ ToString() [6/8]

static std::string google::protobuf::compiler::cpp::Formatter::ToString ( const std::string s)
inlinestaticprivate

Definition at line 678 of file cpp_helpers.h.

◆ ToString() [7/8]

template<typename I , typename = typename std::enable_if< std::is_integral<I>::value>::type>
static std::string google::protobuf::compiler::cpp::Formatter::ToString ( x)
inlinestaticprivate

Definition at line 681 of file cpp_helpers.h.

◆ ToString() [8/8]

static std::string google::protobuf::compiler::cpp::Formatter::ToString ( strings::Hex  x)
inlinestaticprivate

Definition at line 684 of file cpp_helpers.h.

Member Data Documentation

◆ printer_

io::Printer* google::protobuf::compiler::cpp::Formatter::printer_
private

Definition at line 674 of file cpp_helpers.h.

◆ vars_

std::map<std::string, std::string> google::protobuf::compiler::cpp::Formatter::vars_
private

Definition at line 675 of file cpp_helpers.h.


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


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