File Information
Library: CodeGeneration
Package: CodeGeneration
Header: Poco/CodeGeneration/CppGenerator.h
Description
Cpp implementation of the code generator
Inheritance
Direct Base Classes: CodeGenerator
All Base Classes: CodeGenerator
Member Summary
Member Functions: enableAttributes, enableTimestamps, endFile, methodEnd, methodStart, registerConstructorHint, structEnd, structStart, variable, variablesEnd, variablesStart, writeDefaultHeader, writeFwdDecls, writeImplementation, writeInclude, writeMethodImplementation, writeNameSpaceBegin, writeNameSpaceEnd, writeSrcInclude, writeSystemInclude, writeToHeader, writeTypeDef, writeUsing
Inherited Functions: addFwdDecl, addIncludeFile, addSrcIncludeFile, addSystemIncludeFile, copyright, endFile, includes, libraryName, methodEnd, methodStart, nameSpace, structEnd, structStart, systemIncludes, usePocoIncludeStyle, variable, variablesEnd, variablesStart, writeDefaultHeader, writeFwdDecls, writeImplementation, writeInclude, writeIncludes, writeMethodImplementation, writeNameSpaceBegin, writeNameSpaceEnd, writeSystemInclude, writeTypeDef, writeUsing
Constructors
CppGenerator
CppGenerator(
const std::string & nameSpace,
const std::string & libraryName,
bool usePocoIncludeStyle,
const std::string & copyright,
std::ostream & hOut,
std::ostream & cppOut
);
Creates the CppGenerator.
Destructor
~CppGenerator
~CppGenerator();
Destroys the CppGenerator.
Member Functions
enableAttributes
void enableAttributes(
bool enable = true
);
Enable or disable (default) writing of attributes.
enableTimestamps
void enableTimestamps(
bool enable = true
);
Enable (default) or disable timestamps in file headers.
endFile
void endFile();
Closes the include guard
methodEnd
void methodEnd(
const Poco::CppParser::Function * pFunc,
const CodeGenerator::Properties & properties
);
methodStart
void methodStart(
const Poco::CppParser::Function * pFunc,
const CodeGenerator::Properties & properties
);
registerConstructorHint
void registerConstructorHint(
const Poco::CppParser::Variable * pVar,
const Poco::CppParser::Parameter * pParam
);
Register a hint which tells us which parameter of the constructor should be used to init a given member variable
registerConstructorHint
void registerConstructorHint(
const Poco::CppParser::Variable * pVar,
const std::string & val
);
Register a hint which tells us which constant value should be used to init a given member variable.
structEnd
void structEnd();
structStart
void structStart(
const Poco::CppParser::Struct * pStruct,
const CodeGenerator::Properties & properties
);
variable
void variable(
const Poco::CppParser::Variable * pVar
);
variablesEnd
void variablesEnd();
variablesStart
void variablesStart();
writeDefaultHeader
void writeDefaultHeader(
const Poco::CppParser::Struct * pStruct,
const std::string & className,
const std::string & libraryName,
const std::string & package
);
Writes the default header, plus include guard
writeFwdDecls
void writeFwdDecls(
const CodeGenerator::FwdDecls & decl
);
writeImplementation
void writeImplementation(
const std::string & code
);
writeInclude
void writeInclude(
const std::string & include,
bool toHeader
);
writeMethodImplementation
void writeMethodImplementation(
const std::string & code
);
writeNameSpaceBegin
void writeNameSpaceBegin(
const std::string & fullNameSpace
);
writeNameSpaceEnd
void writeNameSpaceEnd(
const std::string & fullNameSpace
);
writeSrcInclude
void writeSrcInclude(
const std::string & include
);
writeSystemInclude
void writeSystemInclude(
const std::string & include
);
writeToHeader
void writeToHeader(
const std::string & jsCode
);
writeTypeDef
void writeTypeDef(
const Poco::CppParser::TypeDef * pType
);
writeUsing
void writeUsing(
const Poco::CppParser::TypeAlias * pType
);