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

#include <cpp_file.h>

Classes

struct  CrossFileReferences
 
class  ForwardDeclarations
 

Public Member Functions

 FileGenerator (const FileDescriptor *file, const Options &options)
 
 FileGenerator (const FileDescriptor *file, const Options &options)
 
void GenerateGlobalSource (io::Printer *printer)
 
void GenerateGlobalSource (io::Printer *printer)
 
void GenerateHeader (io::Printer *printer)
 
void GenerateHeader (io::Printer *printer)
 
void GeneratePBHeader (io::Printer *printer, const std::string &info_path)
 
void GeneratePBHeader (io::Printer *printer, const std::string &info_path)
 
void GenerateProtoHeader (io::Printer *printer, const std::string &info_path)
 
void GenerateProtoHeader (io::Printer *printer, const std::string &info_path)
 
void GenerateSource (io::Printer *printer)
 
void GenerateSource (io::Printer *printer)
 
void GenerateSourceForExtension (int idx, io::Printer *printer)
 
void GenerateSourceForMessage (int idx, io::Printer *printer)
 
void GenerateSourceForMessage (int idx, io::Printer *printer)
 
int NumExtensions () const
 
int NumMessages () const
 
int NumMessages () const
 
 ~FileGenerator ()
 
 ~FileGenerator ()
 

Private Member Functions

std::string CreateHeaderInclude (const std::string &basename, const FileDescriptor *file)
 
std::string CreateHeaderInclude (const std::string &basename, const FileDescriptor *file)
 
void DoIncludeFile (const std::string &google3_name, bool do_export, io::Printer *printer)
 
void DoIncludeFile (const std::string &google3_name, bool do_export, io::Printer *printer)
 
void GenerateBottomHeaderGuard (io::Printer *printer, bool pb_h)
 
void GenerateBottomHeaderGuard (io::Printer *printer, bool pb_h)
 
void GenerateDependencyIncludes (io::Printer *printer)
 
void GenerateDependencyIncludes (io::Printer *printer)
 
void GenerateEnumDefinitions (io::Printer *printer)
 
void GenerateEnumDefinitions (io::Printer *printer)
 
void GenerateExtensionIdentifiers (io::Printer *printer)
 
void GenerateExtensionIdentifiers (io::Printer *printer)
 
void GenerateForwardDeclarations (io::Printer *printer)
 
void GenerateForwardDeclarations (io::Printer *printer)
 
void GenerateGlobalStateFunctionDeclarations (io::Printer *printer)
 
void GenerateGlobalStateFunctionDeclarations (io::Printer *printer)
 
void GenerateInitForSCC (const SCC *scc, const CrossFileReferences &refs, io::Printer *printer)
 
void GenerateInitForSCC (const SCC *scc, const CrossFileReferences &refs, io::Printer *printer)
 
void GenerateInlineFunctionDefinitions (io::Printer *printer)
 
void GenerateInlineFunctionDefinitions (io::Printer *printer)
 
void GenerateInternalForwardDeclarations (const CrossFileReferences &refs, io::Printer *printer)
 
void GenerateInternalForwardDeclarations (const CrossFileReferences &refs, io::Printer *printer)
 
void GenerateLibraryIncludes (io::Printer *printer)
 
void GenerateLibraryIncludes (io::Printer *printer)
 
void GenerateMacroUndefs (io::Printer *printer)
 
void GenerateMacroUndefs (io::Printer *printer)
 
void GenerateMessageDefinitions (io::Printer *printer)
 
void GenerateMessageDefinitions (io::Printer *printer)
 
void GenerateMetadataPragma (io::Printer *printer, const std::string &info_path)
 
void GenerateMetadataPragma (io::Printer *printer, const std::string &info_path)
 
void GenerateProto2NamespaceEnumSpecializations (io::Printer *printer)
 
void GenerateProto2NamespaceEnumSpecializations (io::Printer *printer)
 
void GenerateReflectionInitializationCode (io::Printer *printer)
 
void GenerateReflectionInitializationCode (io::Printer *printer)
 
void GenerateServiceDefinitions (io::Printer *printer)
 
void GenerateServiceDefinitions (io::Printer *printer)
 
void GenerateSourceDefaultInstance (int idx, io::Printer *printer)
 
void GenerateSourceDefaultInstance (int idx, io::Printer *printer)
 
void GenerateSourceIncludes (io::Printer *printer)
 
void GenerateSourceIncludes (io::Printer *printer)
 
void GenerateTables (io::Printer *printer)
 
void GenerateTables (io::Printer *printer)
 
void GenerateTopHeaderGuard (io::Printer *printer, bool pb_h)
 
void GenerateTopHeaderGuard (io::Printer *printer, bool pb_h)
 
void GetCrossFileReferencesForField (const FieldDescriptor *field, CrossFileReferences *refs)
 
void GetCrossFileReferencesForField (const FieldDescriptor *field, CrossFileReferences *refs)
 
void GetCrossFileReferencesForFile (const FileDescriptor *file, CrossFileReferences *refs)
 
void GetCrossFileReferencesForFile (const FileDescriptor *file, CrossFileReferences *refs)
 
const SCCGetSCC (const Descriptor *d)
 
const DescriptorGetSCCRepresentative (const Descriptor *d)
 
 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS (FileGenerator)
 
 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS (FileGenerator)
 
void IncludeFile (const std::string &google3_name, io::Printer *printer)
 
void IncludeFile (const std::string &google3_name, io::Printer *printer)
 
void IncludeFileAndExport (const std::string &google3_name, io::Printer *printer)
 
void IncludeFileAndExport (const std::string &google3_name, io::Printer *printer)
 
bool IsDepWeak (const FileDescriptor *dep) const
 
bool IsDepWeak (const FileDescriptor *dep) const
 
bool IsSCCRepresentative (const Descriptor *d)
 

Private Attributes

std::vector< std::unique_ptr< EnumGenerator > > enum_generators_
 
std::vector< std::unique_ptr< ExtensionGenerator > > extension_generators_
 
const FileDescriptorfile_
 
std::vector< std::unique_ptr< MessageGenerator > > message_generators_
 
const Options options_
 
MessageSCCAnalyzer scc_analyzer_
 
std::vector< const SCC * > sccs_
 
std::vector< std::unique_ptr< ServiceGenerator > > service_generators_
 
std::map< std::string, std::string > variables_
 
std::set< const FileDescriptor * > weak_deps_
 

Detailed Description

Definition at line 68 of file bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h.

Constructor & Destructor Documentation

◆ FileGenerator() [1/2]

google::protobuf::compiler::cpp::FileGenerator::FileGenerator ( const FileDescriptor file,
const Options options 
)

◆ ~FileGenerator() [1/2]

google::protobuf::compiler::cpp::FileGenerator::~FileGenerator ( )
default

◆ FileGenerator() [2/2]

google::protobuf::compiler::cpp::FileGenerator::FileGenerator ( const FileDescriptor file,
const Options options 
)

◆ ~FileGenerator() [2/2]

google::protobuf::compiler::cpp::FileGenerator::~FileGenerator ( )

Member Function Documentation

◆ CreateHeaderInclude() [1/2]

std::string google::protobuf::compiler::cpp::FileGenerator::CreateHeaderInclude ( const std::string &  basename,
const FileDescriptor file 
)
private

◆ CreateHeaderInclude() [2/2]

std::string google::protobuf::compiler::cpp::FileGenerator::CreateHeaderInclude ( const std::string &  basename,
const FileDescriptor file 
)
private

◆ DoIncludeFile() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::DoIncludeFile ( const std::string &  google3_name,
bool  do_export,
io::Printer printer 
)
private

◆ DoIncludeFile() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::DoIncludeFile ( const std::string &  google3_name,
bool  do_export,
io::Printer printer 
)
private

◆ GenerateBottomHeaderGuard() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateBottomHeaderGuard ( io::Printer printer,
bool  pb_h 
)
private

◆ GenerateBottomHeaderGuard() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateBottomHeaderGuard ( io::Printer printer,
bool  pb_h 
)
private

◆ GenerateDependencyIncludes() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateDependencyIncludes ( io::Printer printer)
private

◆ GenerateDependencyIncludes() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateDependencyIncludes ( io::Printer printer)
private

◆ GenerateEnumDefinitions() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateEnumDefinitions ( io::Printer printer)
private

◆ GenerateEnumDefinitions() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateEnumDefinitions ( io::Printer printer)
private

◆ GenerateExtensionIdentifiers() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateExtensionIdentifiers ( io::Printer printer)
private

◆ GenerateExtensionIdentifiers() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateExtensionIdentifiers ( io::Printer printer)
private

◆ GenerateForwardDeclarations() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateForwardDeclarations ( io::Printer printer)
private

◆ GenerateForwardDeclarations() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateForwardDeclarations ( io::Printer printer)
private

◆ GenerateGlobalSource() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateGlobalSource ( io::Printer printer)

◆ GenerateGlobalSource() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateGlobalSource ( io::Printer printer)

◆ GenerateGlobalStateFunctionDeclarations() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateGlobalStateFunctionDeclarations ( io::Printer printer)
private

◆ GenerateGlobalStateFunctionDeclarations() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateGlobalStateFunctionDeclarations ( io::Printer printer)
private

◆ GenerateHeader() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateHeader ( io::Printer printer)

◆ GenerateHeader() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateHeader ( io::Printer printer)

◆ GenerateInitForSCC() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateInitForSCC ( const SCC scc,
const CrossFileReferences refs,
io::Printer printer 
)
private

◆ GenerateInitForSCC() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateInitForSCC ( const SCC scc,
const CrossFileReferences refs,
io::Printer printer 
)
private

◆ GenerateInlineFunctionDefinitions() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateInlineFunctionDefinitions ( io::Printer printer)
private

◆ GenerateInlineFunctionDefinitions() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateInlineFunctionDefinitions ( io::Printer printer)
private

◆ GenerateInternalForwardDeclarations() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateInternalForwardDeclarations ( const CrossFileReferences refs,
io::Printer printer 
)
private

◆ GenerateInternalForwardDeclarations() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateInternalForwardDeclarations ( const CrossFileReferences refs,
io::Printer printer 
)
private

◆ GenerateLibraryIncludes() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateLibraryIncludes ( io::Printer printer)
private

◆ GenerateLibraryIncludes() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateLibraryIncludes ( io::Printer printer)
private

◆ GenerateMacroUndefs() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateMacroUndefs ( io::Printer printer)
private

◆ GenerateMacroUndefs() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateMacroUndefs ( io::Printer printer)
private

◆ GenerateMessageDefinitions() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateMessageDefinitions ( io::Printer printer)
private

◆ GenerateMessageDefinitions() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateMessageDefinitions ( io::Printer printer)
private

◆ GenerateMetadataPragma() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateMetadataPragma ( io::Printer printer,
const std::string &  info_path 
)
private

◆ GenerateMetadataPragma() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateMetadataPragma ( io::Printer printer,
const std::string &  info_path 
)
private

◆ GeneratePBHeader() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GeneratePBHeader ( io::Printer printer,
const std::string &  info_path 
)

◆ GeneratePBHeader() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GeneratePBHeader ( io::Printer printer,
const std::string &  info_path 
)

◆ GenerateProto2NamespaceEnumSpecializations() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateProto2NamespaceEnumSpecializations ( io::Printer printer)
private

◆ GenerateProto2NamespaceEnumSpecializations() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateProto2NamespaceEnumSpecializations ( io::Printer printer)
private

◆ GenerateProtoHeader() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateProtoHeader ( io::Printer printer,
const std::string &  info_path 
)

◆ GenerateProtoHeader() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateProtoHeader ( io::Printer printer,
const std::string &  info_path 
)

◆ GenerateReflectionInitializationCode() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateReflectionInitializationCode ( io::Printer printer)
private

◆ GenerateReflectionInitializationCode() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateReflectionInitializationCode ( io::Printer printer)
private

◆ GenerateServiceDefinitions() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateServiceDefinitions ( io::Printer printer)
private

◆ GenerateServiceDefinitions() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateServiceDefinitions ( io::Printer printer)
private

◆ GenerateSource() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateSource ( io::Printer printer)

◆ GenerateSource() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateSource ( io::Printer printer)

◆ GenerateSourceDefaultInstance() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateSourceDefaultInstance ( int  idx,
io::Printer printer 
)
private

◆ GenerateSourceDefaultInstance() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateSourceDefaultInstance ( int  idx,
io::Printer printer 
)
private

◆ GenerateSourceForExtension()

void google::protobuf::compiler::cpp::FileGenerator::GenerateSourceForExtension ( int  idx,
io::Printer printer 
)

◆ GenerateSourceForMessage() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateSourceForMessage ( int  idx,
io::Printer printer 
)

◆ GenerateSourceForMessage() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateSourceForMessage ( int  idx,
io::Printer printer 
)

◆ GenerateSourceIncludes() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateSourceIncludes ( io::Printer printer)
private

◆ GenerateSourceIncludes() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateSourceIncludes ( io::Printer printer)
private

◆ GenerateTables() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateTables ( io::Printer printer)
private

◆ GenerateTables() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateTables ( io::Printer printer)
private

◆ GenerateTopHeaderGuard() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateTopHeaderGuard ( io::Printer printer,
bool  pb_h 
)
private

◆ GenerateTopHeaderGuard() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GenerateTopHeaderGuard ( io::Printer printer,
bool  pb_h 
)
private

◆ GetCrossFileReferencesForField() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForField ( const FieldDescriptor field,
CrossFileReferences refs 
)
private

◆ GetCrossFileReferencesForField() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForField ( const FieldDescriptor field,
CrossFileReferences refs 
)
private

◆ GetCrossFileReferencesForFile() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile ( const FileDescriptor file,
CrossFileReferences refs 
)
private

◆ GetCrossFileReferencesForFile() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::GetCrossFileReferencesForFile ( const FileDescriptor file,
CrossFileReferences refs 
)
private

◆ GetSCC()

const SCC* google::protobuf::compiler::cpp::FileGenerator::GetSCC ( const Descriptor d)
inlineprivate

◆ GetSCCRepresentative()

const Descriptor* google::protobuf::compiler::cpp::FileGenerator::GetSCCRepresentative ( const Descriptor d)
inlineprivate

◆ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS() [1/2]

google::protobuf::compiler::cpp::FileGenerator::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS ( FileGenerator  )
private

◆ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS() [2/2]

google::protobuf::compiler::cpp::FileGenerator::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS ( FileGenerator  )
private

◆ IncludeFile() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::IncludeFile ( const std::string &  google3_name,
io::Printer printer 
)
inlineprivate

◆ IncludeFile() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::IncludeFile ( const std::string &  google3_name,
io::Printer printer 
)
inlineprivate

◆ IncludeFileAndExport() [1/2]

void google::protobuf::compiler::cpp::FileGenerator::IncludeFileAndExport ( const std::string &  google3_name,
io::Printer printer 
)
inlineprivate

◆ IncludeFileAndExport() [2/2]

void google::protobuf::compiler::cpp::FileGenerator::IncludeFileAndExport ( const std::string &  google3_name,
io::Printer printer 
)
inlineprivate

◆ IsDepWeak() [1/2]

bool google::protobuf::compiler::cpp::FileGenerator::IsDepWeak ( const FileDescriptor dep) const
inlineprivate

◆ IsDepWeak() [2/2]

bool google::protobuf::compiler::cpp::FileGenerator::IsDepWeak ( const FileDescriptor dep) const
inlineprivate

◆ IsSCCRepresentative()

bool google::protobuf::compiler::cpp::FileGenerator::IsSCCRepresentative ( const Descriptor d)
inlineprivate

◆ NumExtensions()

int google::protobuf::compiler::cpp::FileGenerator::NumExtensions ( ) const
inline

◆ NumMessages() [1/2]

int google::protobuf::compiler::cpp::FileGenerator::NumMessages ( ) const
inline

◆ NumMessages() [2/2]

int google::protobuf::compiler::cpp::FileGenerator::NumMessages ( ) const
inline

Member Data Documentation

◆ enum_generators_

std::vector< std::unique_ptr< EnumGenerator > > google::protobuf::compiler::cpp::FileGenerator::enum_generators_
private

◆ extension_generators_

std::vector< std::unique_ptr< ExtensionGenerator > > google::protobuf::compiler::cpp::FileGenerator::extension_generators_
private

◆ file_

const FileDescriptor * google::protobuf::compiler::cpp::FileGenerator::file_
private

◆ message_generators_

std::vector< std::unique_ptr< MessageGenerator > > google::protobuf::compiler::cpp::FileGenerator::message_generators_
private

◆ options_

const Options google::protobuf::compiler::cpp::FileGenerator::options_
private

◆ scc_analyzer_

MessageSCCAnalyzer google::protobuf::compiler::cpp::FileGenerator::scc_analyzer_
private

◆ sccs_

std::vector<const SCC*> google::protobuf::compiler::cpp::FileGenerator::sccs_
private

◆ service_generators_

std::vector< std::unique_ptr< ServiceGenerator > > google::protobuf::compiler::cpp::FileGenerator::service_generators_
private

◆ variables_

std::map< std::string, std::string > google::protobuf::compiler::cpp::FileGenerator::variables_
private

◆ weak_deps_

std::set< const FileDescriptor * > google::protobuf::compiler::cpp::FileGenerator::weak_deps_
private

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


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:22