Stardew Engine
Loading...
Searching...
No Matches
DataNode.h
Go to the documentation of this file.
1
8#ifndef DATANODE_H
9#define DATANODE_H
10
11#include <stdbool.h>
12#include <stdlib.h>
13
14typedef struct _xmlNode xmlNode;
15struct DataNode;
16
26
27
28typedef enum DNPropValType (*GetDNPropTypeFn)(struct DataNode* pNode, const char* propName);
29typedef float (*GetDNFloatFn)(struct DataNode* pNode, const char* propName);
30typedef int (*GetDNIntFn)(struct DataNode* pNode, const char* propName);
31typedef bool (*GetDNBoolFn)(struct DataNode* pNode, const char* propName);
32typedef size_t (*GetDNStrlenFn)(struct DataNode* pNode, const char* propName);
33typedef void (*GetDNStrcpyFn)(struct DataNode* pNode, const char* propName, char* dest);
34
38typedef bool (*GetDNStrCmpFn)(struct DataNode* pNode, const char* propName, const char* cmpTo);
39
40
45typedef size_t (*GetDNStrlenContentFn)(struct DataNode* pNode);
46typedef void (*GetDNStrcpyContentFn)(struct DataNode* pNode, char* dest);
47typedef bool (*GetDNStrCmpContentFn)(struct DataNode* pNode, const char* cmpTo);
48
49void DN_InitForXMLNode(struct DataNode* pOutNode, xmlNode* pXMLNode);
50void DN_InitForLuaTableOnTopOfStack(struct DataNode* pOutNode);
51
68
69#endif
struct _xmlNode xmlNode
Definition Atlas.h:11
bool(* GetDNStrCmpContentFn)(struct DataNode *pNode, const char *cmpTo)
Definition DataNode.h:47
DNPropValType
Definition DataNode.h:18
@ DN_UNKNOWN
Definition DataNode.h:23
@ DN_String
Definition DataNode.h:22
@ DN_PROP_NOT_FOUND
Definition DataNode.h:24
@ DN_Int
Definition DataNode.h:19
@ DN_Bool
Definition DataNode.h:21
@ DN_Float
Definition DataNode.h:20
bool(* GetDNBoolFn)(struct DataNode *pNode, const char *propName)
Definition DataNode.h:31
float(* GetDNFloatFn)(struct DataNode *pNode, const char *propName)
Definition DataNode.h:29
bool(* GetDNStrCmpFn)(struct DataNode *pNode, const char *propName, const char *cmpTo)
returns true if the property named propName on pNode is a string and matches cmpTo
Definition DataNode.h:38
enum DNPropValType(* GetDNPropTypeFn)(struct DataNode *pNode, const char *propName)
Definition DataNode.h:28
void(* GetDNStrcpyFn)(struct DataNode *pNode, const char *propName, char *dest)
Definition DataNode.h:33
void DN_InitForLuaTableOnTopOfStack(struct DataNode *pOutNode)
Definition DataNode.c:332
size_t(* GetDNStrlenContentFn)(struct DataNode *pNode)
For the XML node implementation, these functions operate on the content of the node itself....
Definition DataNode.h:45
size_t(* GetDNStrlenFn)(struct DataNode *pNode, const char *propName)
Definition DataNode.h:32
void DN_InitForXMLNode(struct DataNode *pOutNode, xmlNode *pXMLNode)
Definition DataNode.c:201
void(* GetDNStrcpyContentFn)(struct DataNode *pNode, char *dest)
Definition DataNode.h:46
int(* GetDNIntFn)(struct DataNode *pNode, const char *propName)
Definition DataNode.h:30
Definition DataNode.h:53
GetDNFloatFn fnGetFloat
Definition DataNode.h:55
GetDNStrcpyFn fnGetStrcpy
Definition DataNode.h:59
void * pData
xmlNode* or NULL for lua table on top of stack
Definition DataNode.h:66
GetDNIntFn fnGetInt
Definition DataNode.h:56
GetDNStrCmpContentFn fnContentStrCmp
Definition DataNode.h:63
GetDNStrlenFn fnGetStrlen
Definition DataNode.h:58
GetDNStrlenContentFn fnGetContentStrlen
Definition DataNode.h:61
GetDNStrCmpFn fnStrCmp
Definition DataNode.h:60
GetDNStrcpyContentFn fnGetContentStrcpy
Definition DataNode.h:62
GetDNPropTypeFn fnGetPropType
Definition DataNode.h:54
GetDNBoolFn fnGetBool
Definition DataNode.h:57