|
gwenhywfar 5.10.1
|
#include "tm_builder_p.h"#include "tm_member.h"#include <gwenhywfar/debug.h>#include <gwenhywfar/misc.h>#include <assert.h>#include <errno.h>#include <string.h>#include <ctype.h>
Go to the source code of this file.
Macros | |
| #define | INVOKE_FN(macro_var1) |
| #define INVOKE_FN | ( | macro_var1 | ) |
Definition at line 657 of file tm_builder.c.
| void addMemberInfoToCallDb | ( | GWEN_UNUSED TYPEMAKER2_BUILDER * | tb, |
| GWEN_UNUSED TYPEMAKER2_TYPE * | ty, | ||
| TYPEMAKER2_MEMBER * | tm, | ||
| GWEN_DB_NODE * | db, | ||
| int | withTypePrefix | ||
| ) |
Definition at line 448 of file tm_builder.c.
References GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), NULL, setCharValueWithTypePrefix(), Typemaker2_Enum_GetFromStringFn(), Typemaker2_Enum_GetToStringFn(), TYPEMAKER2_FLAGS_ENUM, TYPEMAKER2_FLAGS_VOLATILE, Typemaker2_Member_GetDefaultValue(), Typemaker2_Member_GetElementName(), Typemaker2_Member_GetEnumPtr(), Typemaker2_Member_GetFieldId(), Typemaker2_Member_GetFlags(), Typemaker2_Member_GetMaxLen(), Typemaker2_Member_GetName(), Typemaker2_Member_GetPresetValue(), Typemaker2_Member_GetTypePtr(), Typemaker2_Type_GetBaseTypePtr(), Typemaker2_Type_GetIdentifier(), and Typemaker2_Type_GetPrefix().

|
static |
| INVOKE_FN | ( | Assign | ) |
| INVOKE_FN | ( | Compare | ) |
| INVOKE_FN | ( | Construct | ) |
| INVOKE_FN | ( | Destruct | ) |
| INVOKE_FN | ( | Dup | ) |
| INVOKE_FN | ( | FromDb | ) |
| INVOKE_FN | ( | FromObject | ) |
| INVOKE_FN | ( | FromXml | ) |
| INVOKE_FN | ( | ToDb | ) |
| INVOKE_FN | ( | ToHashString | ) |
| INVOKE_FN | ( | ToObject | ) |
| INVOKE_FN | ( | ToXml | ) |
|
static |
Definition at line 527 of file tm_builder.c.
References GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DB_FLAGS_OVERWRITE_VARS, and GWEN_DB_SetCharValue().
Referenced by addMemberInfoToCallDb().


| void Typemaker2_Builder_AddCode | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 204 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _addCompareMemberImplementation(), _addFlagFnsImplementation(), _addGetByMemberImplementation(), _addImplementation(), _addListDupImplementation(), _addMemberImplementation(), _addSetterImplementation(), _addSignalObjects(), _addSortByMemberImplementation(), _buildAttach(), _buildCacheFunctions(), _buildImplementation(), _buildInlines(), _buildMemberInlines(), _buildToHashString(), TM2C_BuildCodeVirtualFns(), TM2C_BuildCreateColumnList(), TM2C_BuildCreateObject(), TM2C_BuildCreateTable(), TM2C_BuildEnumFromString(), TM2C_BuildEnumToString(), TM2C_BuildFromDb(), TM2C_BuildFromObject(), TM2C_BuildFromXml(), TM2C_BuildGetterVirtualFns(), TM2C_BuildMacroFunctions(), TM2C_BuildSetterVirtualFns(), TM2C_BuildSignalFunctions(), TM2C_BuildSlotFunctions(), TM2C_BuildToDb(), TM2C_BuildToObject(), and TM2C_BuildToXml().


| void Typemaker2_Builder_AddDeclaration | ( | TYPEMAKER2_BUILDER * | tb, |
| int | access, | ||
| const char * | s | ||
| ) |
Definition at line 149 of file tm_builder.c.
References DBG_ERROR, GWEN_LOGDOMAIN, TypeMaker2_Access_Library, TypeMaker2_Access_Private, TypeMaker2_Access_Protected, TypeMaker2_Access_Public, Typemaker2_Builder_AddLibraryDeclaration(), Typemaker2_Builder_AddPrivateDeclaration(), Typemaker2_Builder_AddProtectedDeclaration(), and Typemaker2_Builder_AddPublicDeclaration().
Referenced by _buildInlines(), _buildMemberInlines(), TM2C_BuildDefineVirtualFns(), TM2C_BuildProtoGetterVirtualFns(), and TM2C_BuildProtoVirtualFns().


| void Typemaker2_Builder_AddLibraryDeclaration | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 180 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _addFlagFnsPrototype(), _addMemberProtoTypes(), _addSetterPrototype(), _buildDefineDefines(), TM2C_BuildDefineEnums(), TM2C_BuildEnumFromString(), TM2C_BuildEnumToString(), TM2C_BuildProtoSetterVirtualFns(), and Typemaker2_Builder_AddDeclaration().


| void Typemaker2_Builder_AddPrivateDeclaration | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 196 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _addCompareMemberProtoType(), _addFlagFnsPrototype(), _addFreeHookPrototype(), _addMemberProtoTypes(), _addSetterPrototype(), _buildDefineDefines(), _buildFieldIds(), _buildPrototypes(), TM2C_BuildDefineEnums(), TM2C_BuildEnumFromString(), TM2C_BuildEnumToString(), TM2C_BuildProtoSetterVirtualFns(), TM2C_BuildSlotFunctions(), TM2C_BuildStruct(), and Typemaker2_Builder_AddDeclaration().


| void Typemaker2_Builder_AddProtectedDeclaration | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 188 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _addFlagFnsPrototype(), _addMemberProtoTypes(), _addSetterPrototype(), _buildDefineDefines(), TM2C_BuildDefineEnums(), TM2C_BuildEnumFromString(), TM2C_BuildEnumToString(), TM2C_BuildProtoSetterVirtualFns(), and Typemaker2_Builder_AddDeclaration().


| void Typemaker2_Builder_AddPublicDeclaration | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 172 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _addFlagFnsPrototype(), _addGetByMemberProtoType(), _addListDupProtoType(), _addMemberProtoTypes(), _addPrototype(), _addPrototypes(), _addSetterPrototype(), _addSignalObjects(), _addSortByMemberProtoType(), _buildApiDoc(), _buildAttach(), _buildCacheFunctions(), _buildDefineDefines(), _buildEndHeaders(), _buildPostHeaders(), _buildPrototypes(), _buildToHashString(), TM2C_BuildCreateColumnList(), TM2C_BuildCreateObject(), TM2C_BuildCreateTable(), TM2C_BuildDefineEnums(), TM2C_BuildEnumFromString(), TM2C_BuildEnumToString(), TM2C_BuildFromDb(), TM2C_BuildFromObject(), TM2C_BuildFromXml(), TM2C_BuildProtoSetterVirtualFns(), TM2C_BuildSignalFunctions(), TM2C_BuildSlotFunctions(), TM2C_BuildToDb(), TM2C_BuildToObject(), TM2C_BuildToXml(), TM2C_BuildTypedef(), and Typemaker2_Builder_AddDeclaration().


| int Typemaker2_Builder_Build | ( | TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty | ||
| ) |
Definition at line 360 of file tm_builder.c.
References GWEN_ERROR_NOT_SUPPORTED.
Referenced by buildFile2().

| GWEN_DB_NODE * Typemaker2_Builder_CreateDbForCall | ( | TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty, | ||
| TYPEMAKER2_MEMBER * | tm, | ||
| const char * | src, | ||
| const char * | dst | ||
| ) |
Definition at line 371 of file tm_builder.c.
References addMemberInfoToCallDb(), GWEN_DB_FLAGS_OVERWRITE_VARS, GWEN_DB_Group_new(), GWEN_DB_SetCharValue(), Typemaker2_Type_GetBaseTypePtr(), Typemaker2_Type_GetIdentifier(), Typemaker2_Type_GetMembers(), Typemaker2_Type_GetPrefix(), and Typemaker2_TypeManager_GetApiDeclaration().
Referenced by _buildGroupApiDoc(), _buildInlines(), and _buildMemberInlines().


| int Typemaker2_Builder_DetermineOutFileNames | ( | TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty | ||
| ) |
Definition at line 1167 of file tm_builder.c.
References DBG_ERROR, GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DIR_SEPARATOR_S, GWEN_ERROR_BAD_DATA, GWEN_LOGDOMAIN, GWEN_StringList_Count(), NULL, Typemaker2_Builder_SetFileNameCode(), Typemaker2_Builder_SetFileNameLibrary(), Typemaker2_Builder_SetFileNamePrivate(), Typemaker2_Builder_SetFileNameProtected(), Typemaker2_Builder_SetFileNamePublic(), Typemaker2_Type_GetBaseFileName(), and Typemaker2_Type_GetName().
Referenced by Typemaker2_Builder_PrintFileNames(), and Typemaker2_Builder_WriteFiles().


| void Typemaker2_Builder_free | ( | TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 71 of file tm_builder.c.
References GWEN_FREE_OBJECT, GWEN_INHERIT_FINI, and GWEN_StringList_free().

| GWEN_STRINGLIST * Typemaker2_Builder_GetCode | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 125 of file tm_builder.c.
| const char * Typemaker2_Builder_GetDestFolderName | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 332 of file tm_builder.c.
| const char * Typemaker2_Builder_GetFileNameCode | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 292 of file tm_builder.c.
| const char * Typemaker2_Builder_GetFileNameLibrary | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 232 of file tm_builder.c.
| const char * Typemaker2_Builder_GetFileNamePrivate | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 272 of file tm_builder.c.
| const char * Typemaker2_Builder_GetFileNameProtected | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 252 of file tm_builder.c.
| const char * Typemaker2_Builder_GetFileNamePublic | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 212 of file tm_builder.c.
| GWEN_STRINGLIST * Typemaker2_Builder_GetLibraryDeclarations | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 101 of file tm_builder.c.
| GWEN_STRINGLIST * Typemaker2_Builder_GetPrivateDeclarations | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 117 of file tm_builder.c.
| GWEN_STRINGLIST * Typemaker2_Builder_GetProtectedDeclarations | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 109 of file tm_builder.c.
| GWEN_STRINGLIST * Typemaker2_Builder_GetPublicDeclarations | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 93 of file tm_builder.c.
| const char * Typemaker2_Builder_GetSourceFileName | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 312 of file tm_builder.c.
Referenced by Typemaker2_Builder_WriteFile().

| TYPEMAKER2_TYPEMANAGER * Typemaker2_Builder_GetTypeManager | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 133 of file tm_builder.c.
Referenced by _addFlagFnsPrototype(), _addGetByMemberProtoType(), _addListDupProtoType(), _addMemberProtoTypes(), _addPrototype(), _addPrototypes(), _addSetterPrototype(), _addSignalObjects(), _addSortByMemberProtoType(), _addTypeSpecificDefs(), _buildAttach(), _buildCacheFunctions(), _buildEndHeaders(), _buildPostHeaders(), _buildPrototypes(), _buildToHashString(), TM2C_BuildCreateColumnList(), TM2C_BuildCreateObject(), TM2C_BuildCreateTable(), TM2C_BuildEnumFromString(), TM2C_BuildEnumToString(), TM2C_BuildFromDb(), TM2C_BuildFromObject(), TM2C_BuildFromXml(), TM2C_BuildProtoGetterVirtualFns(), TM2C_BuildProtoSetterVirtualFns(), TM2C_BuildProtoVirtualFns(), TM2C_BuildSignalFunctions(), TM2C_BuildSlotFunctions(), TM2C_BuildToDb(), TM2C_BuildToObject(), and TM2C_BuildToXml().

| TYPEMAKER2_BUILDER * Typemaker2_Builder_new | ( | ) |
Definition at line 53 of file tm_builder.c.
References GWEN_INHERIT_INIT, GWEN_NEW_OBJECT, and GWEN_StringList_new().
Referenced by Typemaker2_Builder_C_new().


| int Typemaker2_Builder_PrintFileNames | ( | TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty | ||
| ) |
Definition at line 1613 of file tm_builder.c.
References DBG_INFO, GWEN_LOGDOMAIN, GWEN_StringList_Count(), and Typemaker2_Builder_DetermineOutFileNames().

| int Typemaker2_Builder_ReplaceVars | ( | const char * | s, |
| GWEN_DB_NODE * | db, | ||
| GWEN_BUFFER * | dbuf | ||
| ) |
Definition at line 548 of file tm_builder.c.
References DBG_ERROR, GWEN_Buffer_AppendByte(), GWEN_Buffer_AppendString(), GWEN_DB_GetCharValue(), GWEN_ERROR_BAD_DATA, GWEN_LOGDOMAIN, and NULL.
Referenced by _buildGroupApiDoc(), _buildInlines(), and _buildMemberInlines().


| void Typemaker2_Builder_SetBuildFn | ( | TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_BUILDER_BUILD_FN | fn | ||
| ) |
Definition at line 352 of file tm_builder.c.
Referenced by Typemaker2_Builder_C_new().

| void Typemaker2_Builder_SetDestFolderName | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 340 of file tm_builder.c.
References NULL.
Referenced by buildFile2(), and doBuildDefs().

| void Typemaker2_Builder_SetFileNameCode | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 300 of file tm_builder.c.
References NULL.
Referenced by buildFile2(), and Typemaker2_Builder_DetermineOutFileNames().

| void Typemaker2_Builder_SetFileNameLibrary | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 240 of file tm_builder.c.
References NULL.
Referenced by buildFile2(), and Typemaker2_Builder_DetermineOutFileNames().

| void Typemaker2_Builder_SetFileNamePrivate | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 280 of file tm_builder.c.
References NULL.
Referenced by buildFile2(), and Typemaker2_Builder_DetermineOutFileNames().

| void Typemaker2_Builder_SetFileNameProtected | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 260 of file tm_builder.c.
References NULL.
Referenced by buildFile2(), and Typemaker2_Builder_DetermineOutFileNames().

| void Typemaker2_Builder_SetFileNamePublic | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 220 of file tm_builder.c.
References NULL.
Referenced by buildFile2(), and Typemaker2_Builder_DetermineOutFileNames().

| void Typemaker2_Builder_SetSourceFileName | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 320 of file tm_builder.c.
References NULL.
Referenced by buildFile2(), and doBuildDefs().

| void Typemaker2_Builder_SetTypeManager | ( | TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPEMANAGER * | tm | ||
| ) |
Definition at line 141 of file tm_builder.c.
Referenced by buildFile2(), and doBuildDefs().

| int Typemaker2_Builder_WriteFile | ( | TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty, | ||
| const char * | fileName, | ||
| GWEN_STRINGLIST * | sl, | ||
| int | acc | ||
| ) |
Definition at line 731 of file tm_builder.c.
References DBG_ERROR, GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DIR_SEPARATOR, GWEN_ERROR_IO, GWEN_LOGDOMAIN, GWEN_StringList_FirstEntry(), GWEN_StringListEntry_Data(), GWEN_StringListEntry_Next(), NULL, TypeMaker2_Access_Library, TypeMaker2_Access_Private, TypeMaker2_Access_Protected, TypeMaker2_Access_Unknown, Typemaker2_Builder_GetSourceFileName(), Typemaker2_Header_GetFileName(), Typemaker2_Header_GetLocation(), Typemaker2_Header_GetType(), Typemaker2_HeaderLocation_Code, Typemaker2_HeaderLocation_CodeEnd, Typemaker2_HeaderType_System, Typemaker2_Type_GetHeaders(), and Typemaker2_Type_GetName().
Referenced by Typemaker2_Builder_WriteFiles().


| int Typemaker2_Builder_WriteFiles | ( | TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty, | ||
| uint32_t | writeFlags | ||
| ) |
Definition at line 1341 of file tm_builder.c.
References DBG_ERROR, DBG_INFO, GWEN_Buffer_AppendString(), GWEN_Buffer_free(), GWEN_Buffer_GetStart(), GWEN_Buffer_new(), GWEN_DIR_SEPARATOR_S, GWEN_ERROR_BAD_DATA, GWEN_LOGDOMAIN, GWEN_StringList_Count(), NULL, TypeMaker2_Access_Library, TypeMaker2_Access_Private, TypeMaker2_Access_Protected, TypeMaker2_Access_Public, TypeMaker2_Access_Unknown, Typemaker2_Builder_DetermineOutFileNames(), Typemaker2_Builder_WriteFile(), TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_DEFS, TYPEMAKER2_BUILDER_WRITEFILE_FLAGS_WRITE_TYPE, Typemaker2_Builder_WriteTypedefFile(), Typemaker2_Builder_WriteTypedefFile_IdMap(), Typemaker2_Builder_WriteTypedefFile_List1(), Typemaker2_Builder_WriteTypedefFile_List2(), Typemaker2_Builder_WriteTypedefFile_Tree(), Typemaker2_Builder_WriteTypedefFile_Tree2(), Typemaker2_Type_GetFlags(), Typemaker2_Type_GetName(), TYPEMAKER2_TYPEFLAGS_WITH_IDMAP, TYPEMAKER2_TYPEFLAGS_WITH_LIST1, TYPEMAKER2_TYPEFLAGS_WITH_LIST2, TYPEMAKER2_TYPEFLAGS_WITH_TREE, and TYPEMAKER2_TYPEFLAGS_WITH_TREE2.
Referenced by buildFile2(), and doBuildDefs().


| int Typemaker2_Builder_WriteTypedefFile | ( | GWEN_UNUSED TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty, | ||
| const char * | fileName | ||
| ) |
Definition at line 909 of file tm_builder.c.
References DBG_ERROR, GWEN_ERROR_IO, GWEN_LOGDOMAIN, NULL, Typemaker2_Type_GetName(), and Typemaker2_Type_GetPrefix().
Referenced by Typemaker2_Builder_WriteFiles().


| int Typemaker2_Builder_WriteTypedefFile_IdMap | ( | GWEN_UNUSED TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty, | ||
| const char * | fileName | ||
| ) |
Definition at line 1122 of file tm_builder.c.
References DBG_ERROR, GWEN_ERROR_IO, GWEN_LOGDOMAIN, NULL, Typemaker2_Type_GetName(), and Typemaker2_Type_GetPrefix().
Referenced by Typemaker2_Builder_WriteFiles().


| int Typemaker2_Builder_WriteTypedefFile_List1 | ( | GWEN_UNUSED TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty, | ||
| const char * | fileName | ||
| ) |
Definition at line 950 of file tm_builder.c.
References DBG_ERROR, GWEN_ERROR_IO, GWEN_LOGDOMAIN, NULL, Typemaker2_Type_GetName(), and Typemaker2_Type_GetPrefix().
Referenced by Typemaker2_Builder_WriteFiles().


| int Typemaker2_Builder_WriteTypedefFile_List2 | ( | GWEN_UNUSED TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty, | ||
| const char * | fileName | ||
| ) |
Definition at line 993 of file tm_builder.c.
References DBG_ERROR, GWEN_ERROR_IO, GWEN_LOGDOMAIN, NULL, Typemaker2_Type_GetName(), and Typemaker2_Type_GetPrefix().
Referenced by Typemaker2_Builder_WriteFiles().


| int Typemaker2_Builder_WriteTypedefFile_Tree | ( | GWEN_UNUSED TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty, | ||
| const char * | fileName | ||
| ) |
Definition at line 1036 of file tm_builder.c.
References DBG_ERROR, GWEN_ERROR_IO, GWEN_LOGDOMAIN, NULL, Typemaker2_Type_GetName(), and Typemaker2_Type_GetPrefix().
Referenced by Typemaker2_Builder_WriteFiles().


| int Typemaker2_Builder_WriteTypedefFile_Tree2 | ( | GWEN_UNUSED TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty, | ||
| const char * | fileName | ||
| ) |
Definition at line 1079 of file tm_builder.c.
References DBG_ERROR, GWEN_ERROR_IO, GWEN_LOGDOMAIN, NULL, Typemaker2_Type_GetName(), and Typemaker2_Type_GetPrefix().
Referenced by Typemaker2_Builder_WriteFiles().

