File DataNode.h

FileList > engine > include > DataNode.h

Go to the source code of this file

Provides an abstraction layer between widget constructors and the data they need which can come from either an xml node or from the lua table on the top of the lua stack (global for now)

  • #include <stdbool.h>
  • #include <stdlib.h>

Classes

Type Name
struct DataNode

Public Types

Type Name
enum DNPropValType
typedef bool(* GetDNBoolFn
typedef float(* GetDNFloatFn
typedef int(* GetDNIntFn
typedef enum DNPropValType(* GetDNPropTypeFn
typedef bool(* GetDNStrCmpContentFn
typedef bool(* GetDNStrCmpFn
returns true if the property named propName on pNode is a string and matches cmpTo
typedef void(* GetDNStrcpyContentFn
typedef void(* GetDNStrcpyFn
typedef size_t(* GetDNStrlenContentFn
For the XML node implementation, these functions operate on the content of the node itself. For the lua one they operatoe on a property called "content".
typedef size_t(* GetDNStrlenFn
typedef struct _xmlNode xmlNode

Public Functions

Type Name
void DN_InitForLuaTableOnTopOfStack (struct DataNode * pOutNode)
void DN_InitForXMLNode (struct DataNode * pOutNode, xmlNode * pXMLNode)

Public Types Documentation

enum DNPropValType

enum DNPropValType {
    DN_Int,
    DN_Float,
    DN_Bool,
    DN_String,
    DN_UNKNOWN,
    DN_PROP_NOT_FOUND
};

typedef GetDNBoolFn

typedef bool(* GetDNBoolFn) (struct DataNode *pNode, const char *propName);

typedef GetDNFloatFn

typedef float(* GetDNFloatFn) (struct DataNode *pNode, const char *propName);

typedef GetDNIntFn

typedef int(* GetDNIntFn) (struct DataNode *pNode, const char *propName);

typedef GetDNPropTypeFn

typedef enum DNPropValType(* GetDNPropTypeFn) (struct DataNode *pNode, const char *propName);

typedef GetDNStrCmpContentFn

typedef bool(* GetDNStrCmpContentFn) (struct DataNode *pNode, const char *cmpTo);

typedef GetDNStrCmpFn

returns true if the property named propName on pNode is a string and matches cmpTo

typedef bool(* GetDNStrCmpFn) (struct DataNode *pNode, const char *propName, const char *cmpTo);

typedef GetDNStrcpyContentFn

typedef void(* GetDNStrcpyContentFn) (struct DataNode *pNode, char *dest);

typedef GetDNStrcpyFn

typedef void(* GetDNStrcpyFn) (struct DataNode *pNode, const char *propName, char *dest);

typedef GetDNStrlenContentFn

For the XML node implementation, these functions operate on the content of the node itself. For the lua one they operatoe on a property called "content".

typedef size_t(* GetDNStrlenContentFn) (struct DataNode *pNode);

typedef GetDNStrlenFn

typedef size_t(* GetDNStrlenFn) (struct DataNode *pNode, const char *propName);

typedef xmlNode

typedef struct _xmlNode xmlNode;

Public Functions Documentation

function DN_InitForLuaTableOnTopOfStack

void DN_InitForLuaTableOnTopOfStack (
    struct DataNode * pOutNode
) 

function DN_InitForXMLNode

void DN_InitForXMLNode (
    struct DataNode * pOutNode,
    xmlNode * pXMLNode
) 


The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/engine/include/DataNode.h