Stardew Engine
Loading...
Searching...
No Matches
DataNode.h File Reference

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) More...

#include <stdbool.h>
#include <stdlib.h>
Include dependency graph for DataNode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  DataNode
 

Typedefs

typedef struct _xmlNode xmlNode
 
typedef enum DNPropValType(* GetDNPropTypeFn) (struct DataNode *pNode, const char *propName)
 
typedef float(* GetDNFloatFn) (struct DataNode *pNode, const char *propName)
 
typedef int(* GetDNIntFn) (struct DataNode *pNode, const char *propName)
 
typedef bool(* GetDNBoolFn) (struct DataNode *pNode, const char *propName)
 
typedef size_t(* GetDNStrlenFn) (struct DataNode *pNode, const char *propName)
 
typedef void(* GetDNStrcpyFn) (struct DataNode *pNode, const char *propName, char *dest)
 
typedef 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
 
typedef size_t(* GetDNStrlenContentFn) (struct DataNode *pNode)
 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 void(* GetDNStrcpyContentFn) (struct DataNode *pNode, char *dest)
 
typedef bool(* GetDNStrCmpContentFn) (struct DataNode *pNode, const char *cmpTo)
 

Enumerations

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

Functions

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

Detailed Description

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)

Typedef Documentation

◆ GetDNBoolFn

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

◆ GetDNFloatFn

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

◆ GetDNIntFn

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

◆ GetDNPropTypeFn

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

◆ GetDNStrCmpContentFn

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

◆ GetDNStrCmpFn

typedef 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

◆ GetDNStrcpyContentFn

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

◆ GetDNStrcpyFn

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

◆ GetDNStrlenContentFn

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

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".

◆ GetDNStrlenFn

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

◆ xmlNode

typedef struct _xmlNode xmlNode

Enumeration Type Documentation

◆ DNPropValType

Enumerator
DN_Int 
DN_Float 
DN_Bool 
DN_String 
DN_UNKNOWN 
DN_PROP_NOT_FOUND 

Function Documentation

◆ DN_InitForLuaTableOnTopOfStack()

void DN_InitForLuaTableOnTopOfStack ( struct DataNode pOutNode)

◆ DN_InitForXMLNode()

void DN_InitForXMLNode ( struct DataNode pOutNode,
xmlNode pXMLNode 
)