39#include "lang/ytObject.h"
40#include "util/ytKeyValues.h"
52void ytNode_dump(
ytNode *
this, FILE * fp);
58void ytNode_addProperty(
ytNode *
this,
const char * key,
ytObject * value);
69ytType ytNode_getPropertyType(
const ytNode *
this,
size_t i );
73ytNode * ytNode_deserialize(ytByte **
const pptr);
74size_t ytNode_sizeI(
const ytObject * obj);
75ytByte * ytNode_serializeI(
const ytObject * obj, ytByte ** pptr);
76ytObject * ytNode_deserializeI(ytByte **
const pptr);
79int ytNode_test(
int argc,
char * argv[]);
ytType
Types supported by ytLib.
Definition: ytType.h:41
Network node.
Definition: ytNode.h:42
const char * ytNode_getName(const ytNode *this)
Returns the name of this node.
Definition: ytNode.c:143
ytNode * ytNode_clone(const ytNode *this)
Generates a clone of this ytNode instance.
Definition: ytNode.c:108
ytObject * ytNode_getPropertyAt(ytNode *this, size_t i)
Returns a property value at the specified position.
Definition: ytNode.c:187
ytObject * ytNode_obj(ytNode *this)
Returns the pointer to this instance as ytObject.
Definition: ytNode.c:88
ytStrArray * ytNode_getPropertyKeys(ytNode *this, ytStrArray *ar)
Returns all the property keys.
Definition: ytNode.c:225
ytObject * ytNode_getProperty(const ytNode *this, const char *key)
Gets a property associated with the given key.
Definition: ytNode.c:180
void ytNode_setPropertyDouble(ytNode *this, const char *key, double value)
Adds a double precision real value property.
Definition: ytNode.c:165
void ytNode_setPropertyString(ytNode *this, const char *key, const char *value)
Adds a string value property.
Definition: ytNode.c:172
void ytNode_setProperty(ytNode *this, const char *key, ytObject *value)
Adds a property key-value pair.
Definition: ytNode.c:149
void ytNode_setPropertyInt(ytNode *this, const char *key, int value)
Adds an integer value property.
Definition: ytNode.c:158
void ytNode_setName(ytNode *this, const char *name)
Sets the name of this node.
Definition: ytNode.c:132
ytNode * ytNode_newName(const char *name)
Definition: ytNode.c:78
int ytNode_getPropertyInt(ytNode *this, const char *key, int defValue)
Returns the integer property value.
Definition: ytNode.c:194
void ytNode_delete(ytNode *this)
Deletes the ytNode instance.
Definition: ytNode.c:69
const char * ytNode_getPropertyString(const ytNode *this, const char *key)
Returns the string property value.
Definition: ytNode.c:204
size_t ytNode_numProperties(const ytNode *this)
Returns the number of properties set in this node.
Definition: ytNode.c:214
ytByte * ytNode_serialize(const ytNode *this, ytByte **pptr)
Serializes the ytNode instance.
Definition: ytNode.c:258
ytNode * ytNode_from(ytObject *obj)
Returns the pointer to the ytNode instance from ytObject.
Definition: ytNode.c:96
size_t ytNode_size(const ytNode *this)
Returns the serialized size of the instance.
Definition: ytNode.c:241
const char * ytNode_getPropertyKey(const ytNode *this, size_t i)
Returns the property key at the specified position.
Definition: ytNode.c:234