|
gwenhywfar
5.4.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 634 of file tm_builder.c.
|
static |
| void addMemberInfoToCallDb | ( | GWEN_UNUSED TYPEMAKER2_BUILDER * | tb, |
| GWEN_UNUSED TYPEMAKER2_TYPE * | ty, | ||
| TYPEMAKER2_MEMBER * | tm, | ||
| GWEN_DB_NODE * | db, | ||
| int | withTypePrefix | ||
| ) |
Definition at line 425 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().

| INVOKE_FN | ( | Construct | ) |
| INVOKE_FN | ( | Destruct | ) |
| INVOKE_FN | ( | Assign | ) |
| INVOKE_FN | ( | Dup | ) |
| INVOKE_FN | ( | Compare | ) |
| INVOKE_FN | ( | ToDb | ) |
| INVOKE_FN | ( | FromDb | ) |
| INVOKE_FN | ( | ToXml | ) |
| INVOKE_FN | ( | FromXml | ) |
| INVOKE_FN | ( | ToObject | ) |
| INVOKE_FN | ( | FromObject | ) |
| INVOKE_FN | ( | ToHashString | ) |
|
static |
Definition at line 504 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 181 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _buildAttach(), _buildCacheFunctions(), _buildCodeVirtualFns(), _buildConstructor(), _buildCopy(), _buildCreateColumnList(), _buildCreateObject(), _buildCreateTable(), _buildDestructor(), _buildDup(), _buildEnumFromString(), _buildEnumToString(), _buildFromDb(), _buildFromObject(), _buildFromXml(), _buildGetter(), _buildInlines(), _buildList1Dup(), _buildList1GetByMember(), _buildList1SortByMember(), _buildMacroFunctions(), _buildMemberInlines(), _buildReadDb(), _buildReadObject(), _buildReadXml(), _buildSetter(), _buildSetterVirtualFns(), _buildSignalFunctions(), _buildSlotFunctions(), _buildToDb(), _buildToHashString(), _buildToObject(), _buildToXml(), _buildTree2GetByMember(), _buildTreeGetByMember(), _buildWriteDb(), _buildWriteObject(), and _buildWriteXml().


| void Typemaker2_Builder_AddLibraryDeclaration | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 157 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _buildDefineDefines(), _buildDefineEnums(), _buildDefineVirtualFns(), _buildEnumFromString(), _buildEnumToString(), _buildGetter(), _buildInlines(), _buildMemberInlines(), _buildProtoSetterVirtualFns(), _buildProtoVirtualFns(), and _buildSetter().


| void Typemaker2_Builder_AddPrivateDeclaration | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 173 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _buildConstructor(), _buildDefineDefines(), _buildDefineEnums(), _buildDefineVirtualFns(), _buildDestructor(), _buildEnumFromString(), _buildEnumToString(), _buildFieldIds(), _buildGetter(), _buildInlines(), _buildList1SortByMember(), _buildMemberInlines(), _buildProtoSetterVirtualFns(), _buildProtoVirtualFns(), _buildSetter(), _buildSlotFunctions(), and _buildStruct().


| void Typemaker2_Builder_AddProtectedDeclaration | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 165 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _buildDefineDefines(), _buildDefineEnums(), _buildDefineVirtualFns(), _buildEnumFromString(), _buildEnumToString(), _buildGetter(), _buildInlines(), _buildMemberInlines(), _buildProtoSetterVirtualFns(), _buildProtoVirtualFns(), and _buildSetter().


| void Typemaker2_Builder_AddPublicDeclaration | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 149 of file tm_builder.c.
References GWEN_StringList_AppendString().
Referenced by _buildApiDoc(), _buildAttach(), _buildCacheFunctions(), _buildConstructor(), _buildCopy(), _buildCreateColumnList(), _buildCreateObject(), _buildCreateTable(), _buildDefineDefines(), _buildDefineEnums(), _buildDefineVirtualFns(), _buildDestructor(), _buildDup(), _buildEndHeaders(), _buildEnumFromString(), _buildEnumToString(), _buildFromDb(), _buildFromObject(), _buildFromXml(), _buildGetter(), _buildInlines(), _buildList1Dup(), _buildList1GetByMember(), _buildList1SortByMember(), _buildMemberInlines(), _buildPostHeaders(), _buildProtoSetterVirtualFns(), _buildProtoVirtualFns(), _buildReadDb(), _buildReadObject(), _buildReadXml(), _buildSetter(), _buildSignalFunctions(), _buildSlotFunctions(), _buildToDb(), _buildToHashString(), _buildToObject(), _buildToXml(), _buildTree2GetByMember(), _buildTreeGetByMember(), _buildTypedef(), _buildWriteDb(), _buildWriteObject(), and _buildWriteXml().


| int Typemaker2_Builder_Build | ( | TYPEMAKER2_BUILDER * | tb, |
| TYPEMAKER2_TYPE * | ty | ||
| ) |
Definition at line 337 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 348 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 1144 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_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 309 of file tm_builder.c.
| const char* Typemaker2_Builder_GetFileNameCode | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 269 of file tm_builder.c.
| const char* Typemaker2_Builder_GetFileNameLibrary | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 209 of file tm_builder.c.
| const char* Typemaker2_Builder_GetFileNamePrivate | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 249 of file tm_builder.c.
| const char* Typemaker2_Builder_GetFileNameProtected | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 229 of file tm_builder.c.
| const char* Typemaker2_Builder_GetFileNamePublic | ( | const TYPEMAKER2_BUILDER * | tb | ) |
Definition at line 189 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 289 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 _buildAttach(), _buildCacheFunctions(), _buildConstructor(), _buildCopy(), _buildCreateColumnList(), _buildCreateObject(), _buildCreateTable(), _buildDestructor(), _buildDup(), _buildEndHeaders(), _buildEnumFromString(), _buildEnumToString(), _buildFromDb(), _buildFromObject(), _buildFromXml(), _buildGetter(), _buildList1Dup(), _buildList1GetByMember(), _buildList1SortByMember(), _buildPostHeaders(), _buildProtoSetterVirtualFns(), _buildProtoVirtualFns(), _buildReadDb(), _buildReadObject(), _buildReadXml(), _buildSetter(), _buildSignalFunctions(), _buildSlotFunctions(), _buildToDb(), _buildToHashString(), _buildToObject(), _buildToXml(), _buildTree2GetByMember(), _buildTreeGetByMember(), _buildTypedef(), _buildWriteDb(), _buildWriteObject(), and _buildWriteXml().

| 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_ReplaceVars | ( | const char * | s, |
| GWEN_DB_NODE * | db, | ||
| GWEN_BUFFER * | dbuf | ||
| ) |
Definition at line 525 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 329 of file tm_builder.c.
Referenced by Typemaker2_Builder_C_new().

| void Typemaker2_Builder_SetDestFolderName | ( | TYPEMAKER2_BUILDER * | tb, |
| const char * | s | ||
| ) |
Definition at line 317 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 277 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 217 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 257 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 237 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 197 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 297 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 708 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 1318 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 886 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 1099 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 927 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 970 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 1013 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 1056 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().


1.8.14