18#include <gwenhywfar/debug.h>
37 TYPEMAKER2_MEMBER_LIST *tml;
43 tm=Typemaker2_Member_List_First(tml);
77 tm=Typemaker2_Member_List_Next(tm);
102 " * Use this function to set the member \"%s\" (see @ref %s_%s)\n*/\n",
150 "void %s_Set%c%s(%s *p_struct, ",
367 " * Use this function to add flags to member \"%s\" (see @ref %s_%s)\n*/\n",
374 "void %s_Add%c%s(%s *p_struct, %s p_src);\n",
383 " * Use this function to add flags to member \"%s\" (see @ref %s_%s)\n*/\n",
390 "void %s_Sub%c%s(%s *p_struct, %s p_src);\n",
436 "void %s_Add%c%s(%s *p_struct, %s p_src) {\n"
437 " assert(p_struct);\n"
438 " p_struct->%s|=p_src;\n"
449 "void %s_Sub%c%s(%s *p_struct, %s p_src) {\n"
450 " assert(p_struct);\n"
451 " p_struct->%s&=~p_src;\n"
GWEN_BUFFER * GWEN_Buffer_new(char *buffer, uint32_t size, uint32_t used, int take)
int GWEN_Buffer_AppendArgs(GWEN_BUFFER *bf, const char *fmt,...)
void GWEN_Buffer_free(GWEN_BUFFER *bf)
int GWEN_Buffer_AppendString(GWEN_BUFFER *bf, const char *buffer)
char * GWEN_Buffer_GetStart(const GWEN_BUFFER *bf)
#define DBG_INFO(dbg_logger, format,...)
#define DBG_ERROR(dbg_logger, format,...)
#define GWEN_ERROR_BAD_DATA
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
int TM2C_AddReleaseOldValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf)
static int _addDupNewValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf)
int _addReleaseOldValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf)
static void _addFlagFnsImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm)
int TM2C_BuildSetter(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty)
static int _addAssignNewValueCode(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf)
static int _addSetterPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm)
static void _addSetterFnDeclaration(TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, GWEN_BUFFER *tbuf)
static int _addSetterImplementation(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm)
static int _addFlagFnsPrototype(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm)
void Typemaker2_Builder_AddCode(TYPEMAKER2_BUILDER *tb, const char *s)
void Typemaker2_Builder_AddPublicDeclaration(TYPEMAKER2_BUILDER *tb, const char *s)
void Typemaker2_Builder_AddLibraryDeclaration(TYPEMAKER2_BUILDER *tb, const char *s)
void Typemaker2_Builder_AddProtectedDeclaration(TYPEMAKER2_BUILDER *tb, const char *s)
void Typemaker2_Builder_AddPrivateDeclaration(TYPEMAKER2_BUILDER *tb, const char *s)
TYPEMAKER2_TYPEMANAGER * Typemaker2_Builder_GetTypeManager(const TYPEMAKER2_BUILDER *tb)
int Typemaker2_Builder_Invoke_DestructFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf)
int Typemaker2_Builder_Invoke_DupFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf)
struct TYPEMAKER2_BUILDER TYPEMAKER2_BUILDER
int Typemaker2_Builder_Invoke_AssignFn(TYPEMAKER2_BUILDER *tb, TYPEMAKER2_TYPE *ty, TYPEMAKER2_MEMBER *tm, const char *src, const char *dst, GWEN_BUFFER *dbuf)
const char * Typemaker2_Enum_GetType(const TYPEMAKER2_ENUM *p_struct)
struct TYPEMAKER2_ENUM TYPEMAKER2_ENUM
TYPEMAKER2_TYPE * Typemaker2_Member_GetTypePtr(const TYPEMAKER2_MEMBER *tm)
uint32_t Typemaker2_Member_GetSetFlags(const TYPEMAKER2_MEMBER *tm)
TYPEMAKER2_ENUM * Typemaker2_Member_GetEnumPtr(const TYPEMAKER2_MEMBER *tm)
int Typemaker2_Member_GetAccess(const TYPEMAKER2_MEMBER *tm)
uint32_t Typemaker2_Member_GetFlags(const TYPEMAKER2_MEMBER *tm)
const char * Typemaker2_Member_GetName(const TYPEMAKER2_MEMBER *tm)
struct TYPEMAKER2_MEMBER TYPEMAKER2_MEMBER
int Typemaker2_Type_GetType(const TYPEMAKER2_TYPE *ty)
const char * Typemaker2_Type_GetIdentifier(const TYPEMAKER2_TYPE *ty)
const char * Typemaker2_Type_GetPrefix(const TYPEMAKER2_TYPE *ty)
TYPEMAKER2_MEMBER_LIST * Typemaker2_Type_GetMembers(const TYPEMAKER2_TYPE *ty)
#define TYPEMAKER2_FLAGS_DUP
struct TYPEMAKER2_TYPE TYPEMAKER2_TYPE
#define TYPEMAKER2_FLAGS_CONST
#define TYPEMAKER2_FLAGS_ENUM
@ TypeMaker2_Access_Private
@ TypeMaker2_Access_Library
@ TypeMaker2_Access_Protected
@ TypeMaker2_Access_Public
@ TypeMaker2_Type_Pointer
#define TYPEMAKER2_FLAGS_OMIT
#define TYPEMAKER2_FLAGS_WITH_FLAGS
#define TYPEMAKER2_FLAGS_OWN
const char * Typemaker2_TypeManager_GetApiDeclaration(const TYPEMAKER2_TYPEMANAGER *tym)
struct TYPEMAKER2_TYPEMANAGER TYPEMAKER2_TYPEMANAGER