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)
 
void GenerateGlobalSource (io::Printer *printer)
 
void GenerateHeader (io::Printer *printer)
 
void GeneratePBHeader (io::Printer *printer, const std::string &info_path)
 
void GenerateProtoHeader (io::Printer *printer, const std::string &info_path)
 
void GenerateSource (io::Printer *printer)
 
void GenerateSourceForMessage (int idx, io::Printer *printer)
 
int NumMessages () const
 
 ~FileGenerator ()
 

Private Member Functions

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

Detailed Description

Definition at line 68 of file cpp_file.h.

Constructor & Destructor Documentation

◆ FileGenerator()

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

Definition at line 94 of file cpp_file.cc.

◆ ~FileGenerator()

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

Member Function Documentation

◆ CreateHeaderInclude()

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

Definition at line 357 of file cpp_file.cc.

◆ DoIncludeFile()

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

Definition at line 328 of file cpp_file.cc.

◆ GenerateBottomHeaderGuard()

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

Definition at line 1205 of file cpp_file.cc.

◆ GenerateDependencyIncludes()

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

Definition at line 1335 of file cpp_file.cc.

◆ GenerateEnumDefinitions()

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

Definition at line 1400 of file cpp_file.cc.

◆ GenerateExtensionIdentifiers()

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

Definition at line 1426 of file cpp_file.cc.

◆ GenerateForwardDeclarations()

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

Definition at line 1134 of file cpp_file.cc.

◆ GenerateGlobalSource()

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

Definition at line 592 of file cpp_file.cc.

◆ GenerateGlobalStateFunctionDeclarations()

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

Definition at line 1352 of file cpp_file.cc.

◆ GenerateHeader()

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

Definition at line 182 of file cpp_file.cc.

◆ GenerateInitForSCC()

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

Definition at line 909 of file cpp_file.cc.

◆ GenerateInlineFunctionDefinitions()

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

Definition at line 1435 of file cpp_file.cc.

◆ GenerateInternalForwardDeclarations()

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

Definition at line 507 of file cpp_file.cc.

◆ GenerateLibraryIncludes()

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

Definition at line 1211 of file cpp_file.cc.

◆ GenerateMacroUndefs()

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

Definition at line 151 of file cpp_file.cc.

◆ GenerateMessageDefinitions()

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

Definition at line 1387 of file cpp_file.cc.

◆ GenerateMetadataPragma()

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

Definition at line 1320 of file cpp_file.cc.

◆ GeneratePBHeader()

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

Definition at line 283 of file cpp_file.cc.

◆ GenerateProto2NamespaceEnumSpecializations()

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

Definition at line 1465 of file cpp_file.cc.

◆ GenerateProtoHeader()

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

Definition at line 245 of file cpp_file.cc.

◆ GenerateReflectionInitializationCode()

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

Definition at line 716 of file cpp_file.cc.

◆ GenerateServiceDefinitions()

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

Definition at line 1407 of file cpp_file.cc.

◆ GenerateSource()

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

Definition at line 629 of file cpp_file.cc.

◆ GenerateSourceDefaultInstance()

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

Definition at line 442 of file cpp_file.cc.

◆ GenerateSourceForMessage()

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

Definition at line 542 of file cpp_file.cc.

◆ GenerateSourceIncludes()

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

Definition at line 381 of file cpp_file.cc.

◆ GenerateTables()

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

Definition at line 972 of file cpp_file.cc.

◆ GenerateTopHeaderGuard()

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

Definition at line 1185 of file cpp_file.cc.

◆ GetCrossFileReferencesForField()

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

Definition at line 471 of file cpp_file.cc.

◆ GetCrossFileReferencesForFile()

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

Definition at line 488 of file cpp_file.cc.

◆ GetSCC()

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

Definition at line 170 of file cpp_file.h.

◆ GetSCCRepresentative()

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

Definition at line 167 of file cpp_file.h.

◆ GOOGLE_DISALLOW_EVIL_CONSTRUCTORS()

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

◆ IncludeFile()

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

Definition at line 95 of file cpp_file.h.

◆ IncludeFileAndExport()

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

Definition at line 98 of file cpp_file.h.

◆ IsDepWeak()

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

Definition at line 172 of file cpp_file.h.

◆ IsSCCRepresentative()

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

Definition at line 164 of file cpp_file.h.

◆ NumMessages()

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

Definition at line 85 of file cpp_file.h.

Member Data Documentation

◆ enum_generators_

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

Definition at line 193 of file cpp_file.h.

◆ extension_generators_

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

Definition at line 195 of file cpp_file.h.

◆ file_

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

Definition at line 183 of file cpp_file.h.

◆ message_generators_

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

Definition at line 192 of file cpp_file.h.

◆ options_

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

Definition at line 184 of file cpp_file.h.

◆ scc_analyzer_

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

Definition at line 186 of file cpp_file.h.

◆ sccs_

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

Definition at line 181 of file cpp_file.h.

◆ service_generators_

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

Definition at line 194 of file cpp_file.h.

◆ variables_

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

Definition at line 188 of file cpp_file.h.

◆ weak_deps_

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

Definition at line 180 of file cpp_file.h.


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


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