Code generator part of the message compiler.
Public Types | |
typedef std::vector< std::string > | StringVector |
typedef MsgTypeTable::Properties | Properties |
typedef MsgTypeTable::FieldInfo | FieldInfo |
typedef MsgTypeTable::ClassInfo | ClassInfo |
typedef MsgTypeTable::EnumItem | EnumItem |
typedef MsgTypeTable::EnumInfo | EnumInfo |
Public Member Functions | |
MsgCodeGenerator (ErrorStore *errors) | |
void | openFiles (const char *hFile, const char *ccFile) |
void | closeFiles () |
void | deleteFiles () |
void | generateProlog (const std::string &msgFileName, const std::string &firstNamespace, const std::string &exportDef) |
void | generateEpilog () |
void | generateClass (const ClassInfo &classInfo, const std::string &exportDef) |
void | generateStruct (const ClassInfo &classInfo, const std::string &exportDef) |
void | generateToAnyPtr (const ClassInfo &a) |
void | generateFromAnyPtr (const ClassInfo &a, const std::string &exportDef) |
void | generateDescriptorClass (const ClassInfo &a) |
void | generateEnum (const EnumInfo &enumInfo) |
void | generateImport (const std::string &importName) |
void | generateNamespaceBegin (const std::string &namespaceName, bool intoCcFile=true) |
void | generateNamespaceEnd (const std::string &namespaceName, bool intoCcFile=true) |
void | generateTypeAnnouncement (const ClassInfo &classInfo) |
std::string | generatePreComment (ASTNode *nedElement) |
void | generateHeaderCplusplusBlock (const std::string &body) |
void | generateImplCplusplusBlock (const std::string &body) |
Protected Member Functions | |
std::string | prefixWithNamespace (const std::string &name, const std::string &namespaceName) |
std::string | makeFuncall (const std::string &var, bool isPointer, const std::string &funcTemplate, bool withIndex=false, const std::string &value="") |
void | generateOwnershipOp (const FieldInfo &field, const std::string &var, const std::string &op) |
void | generateClassDecl (const ClassInfo &classInfo, const std::string &exportDef) |
void | generateClassImpl (const ClassInfo &classInfo) |
void | generateStructDecl (const ClassInfo &classInfo, const std::string &exportDef) |
void | generateStructImpl (const ClassInfo &classInfo) |
void | generateCplusplusBlock (std::ofstream &out, const std::string &body) |
void | generateMethodCplusplusBlock (const ClassInfo &classInfo, const std::string &method) |
void | reportUnusedMethodCplusplusBlocks (const ClassInfo &classInfo) |
void | generateDelegationForBaseClassFields (const std::string &code) |
Protected Attributes | |
std::string | hFilename |
std::string | ccFilename |
std::ofstream | hStream |
std::ofstream | ccStream |
std::string | headerGuard |
ErrorStore * | errors |
typedef std::vector<std::string> StringVector |
typedef MsgTypeTable::Properties Properties |
typedef MsgTypeTable::FieldInfo FieldInfo |
typedef MsgTypeTable::ClassInfo ClassInfo |
typedef MsgTypeTable::EnumItem EnumItem |
typedef MsgTypeTable::EnumInfo EnumInfo |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void openFiles | ( | const char * | hFile, |
const char * | ccFile | ||
) |
void closeFiles | ( | ) |
void deleteFiles | ( | ) |
void generateProlog | ( | const std::string & | msgFileName, |
const std::string & | firstNamespace, | ||
const std::string & | exportDef | ||
) |
void generateEpilog | ( | ) |
void generateClass | ( | const ClassInfo & | classInfo, |
const std::string & | exportDef | ||
) |
void generateStruct | ( | const ClassInfo & | classInfo, |
const std::string & | exportDef | ||
) |
void generateToAnyPtr | ( | const ClassInfo & | a | ) |
void generateFromAnyPtr | ( | const ClassInfo & | a, |
const std::string & | exportDef | ||
) |
void generateDescriptorClass | ( | const ClassInfo & | a | ) |
void generateEnum | ( | const EnumInfo & | enumInfo | ) |
void generateImport | ( | const std::string & | importName | ) |
void generateNamespaceBegin | ( | const std::string & | namespaceName, |
bool | intoCcFile = true |
||
) |
void generateNamespaceEnd | ( | const std::string & | namespaceName, |
bool | intoCcFile = true |
||
) |
void generateTypeAnnouncement | ( | const ClassInfo & | classInfo | ) |
std::string generatePreComment | ( | ASTNode * | nedElement | ) |
void generateHeaderCplusplusBlock | ( | const std::string & | body | ) |
void generateImplCplusplusBlock | ( | const std::string & | body | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |