41 RaveValue_Type_List = 7
struct _RaveList_t RaveList_t
Defines a list.
Definition rave_list.h:33
Generic implementation of an object that is used within rave.
struct _raveobjecttype RaveCoreObjectType
The rave object type definition.
RaveCoreObjectType RaveValue_TYPE
Type definition to use when creating a rave object.
Definition rave_value.c:1406
void RaveValueHash_clear(RaveValue_t *self)
If rave value is hash, then this provides same functionality as RaveObjectHashTable_clear.
Definition rave_value.c:1004
void RaveValueList_release(RaveValue_t *self, int index)
If rave value is list, then this provides same functionality as RaveObjectList_release.
Definition rave_value.c:1142
int RaveValue_setString(RaveValue_t *self, const char *value)
Sets a string value in self.
Definition rave_value.c:205
RaveValue_t * RaveValueHash_get(RaveValue_t *self, const char *key)
If rave value is hash, then this provides same functionality as RaveObjectHashTable_get.
Definition rave_value.c:960
int RaveValue_getString(RaveValue_t *self, char **value)
Returns the value as a string.
Definition rave_value.c:228
int RaveValue_getLongArray(RaveValue_t *self, long **value, int *len)
Returns the value as a long array.
Definition rave_value.c:726
int RaveValue_getList(RaveValue_t *self, RaveObjectList_t **rlist)
Returns the rave list if possible.
Definition rave_value.c:1055
int RaveValueHash_size(RaveValue_t *self)
If rave value is hash, then this provides same functionality as RaveObjectHashTable_size.
Definition rave_value.c:974
RaveValue_t * RaveValue_createString(const char *value)
Creates a string rave value.
Definition rave_value.c:177
void RaveValue_setBoolean(RaveValue_t *self, int value)
Sets the value as a boolean.
Definition rave_value.c:499
int RaveValue_getHashTable(RaveValue_t *self, RaveObjectHashTable_t **table)
Returns the hash table if possible.
Definition rave_value.c:933
char * RaveValue_toJSON(RaveValue_t *self)
Translates self to a json representation.
Definition rave_value.c:1237
RaveValue_t * RaveValueString_tokenize(RaveValue_t *self, int delim)
Tokenizes a string into a string array of tokens.
Definition rave_value.c:349
RaveValue_t * RaveValue_loadJSON(const char *filename)
Loads a JSON object from a file.
Definition rave_value.c:1388
RaveValue_t * RaveValue_createList(RaveObjectList_t *rlist)
Creates a rave value list.
Definition rave_value.c:1022
RaveValue_Type RaveValue_type(RaveValue_t *self)
Returns the format for this attribute.
Definition rave_value.c:157
int RaveValueHash_exists(RaveValue_t *self, const char *key)
If rave value is hash, then this provides same functionality as RaveObjectHashTable_exists.
Definition rave_value.c:983
int RaveValue_setStringArray(RaveValue_t *self, const char **value, int len)
Sets the value as a simple 1-dimensional string array.
Definition rave_value.c:582
int RaveValue_isStringArray(RaveValue_t *self)
Returns if the rave value can be represented as a string array (list of strings only)
Definition rave_value.c:549
int RaveValue_toBoolean(RaveValue_t *self)
Returns the boolean value.
Definition rave_value.c:519
int RaveValue_getStringArray(RaveValue_t *self, char ***value, int *len)
Returns the value as a string array.
Definition rave_value.c:615
RaveList_t * RaveValueHash_keys(RaveValue_t *self)
If rave value is hash, then this provides same functionality as RaveObjectHashTable_keys.
Definition rave_value.c:1012
const char * RaveValue_toString(RaveValue_t *self)
Returns the string value.
Definition rave_value.c:240
int RaveValueList_add(RaveValue_t *self, RaveValue_t *value)
If rave value is list, then this provides same functionality as RaveObjectList_add.
Definition rave_value.c:1072
RaveValue_t * RaveValue_createLongArray(long *value, int len)
Creates a long array rave value.
Definition rave_value.c:687
RaveValue_t * RaveValueList_get(RaveValue_t *self, int index)
If rave value is list, then this provides same functionality as RaveObjectList_get.
Definition rave_value.c:1133
void RaveValue_setLong(RaveValue_t *self, long value)
Sets the value as a long.
Definition rave_value.c:424
RaveValue_t * RaveValue_createNull()
Creates a null rave value.
Definition rave_value.c:525
RaveValue_t * RaveValue_createStringArray(const char **value, int len)
Creates a string array rave value.
Definition rave_value.c:571
int RaveValue_setHashTable(RaveValue_t *self, RaveObjectHashTable_t *table)
Sets the value as a hash table.
Definition rave_value.c:922
void RaveValueHash_remove(RaveValue_t *self, const char *key)
If rave value is hash, then this provides same functionality as RaveObjectHashTable_remove except tha...
Definition rave_value.c:995
int RaveValue_setLongArray(RaveValue_t *self, long *value, int len)
Sets the value as a simple 1-dimensional long array.
Definition rave_value.c:698
RaveObjectList_t * RaveValue_toList(RaveValue_t *self)
NOTE!
Definition rave_value.c:1066
int RaveValue_setList(RaveValue_t *self, RaveObjectList_t *rlist)
Sets the value as a rave list.
Definition rave_value.c:1043
RaveValue_t * RaveValue_createBoolean(int value)
Creates a boolean rave value.
Definition rave_value.c:488
int RaveValue_isLongArray(RaveValue_t *self)
Returns if the rave value can be represented as a long array (list of long only)
Definition rave_value.c:666
RaveValue_t * RaveValue_createStringFmt(const char *fmt,...)
Creates a string rave value from a varargs list.
Definition rave_value.c:188
RaveValue_t * RaveValueList_join(RaveValue_t *self, const char *sep)
Creates a rave value string from the list of strings and adds the separator between each entry.
Definition rave_value.c:1092
RaveObjectHashTable_t * RaveValue_toHashTable(RaveValue_t *self)
NOTE!
Definition rave_value.c:944
int RaveValueList_insert(RaveValue_t *self, int index, RaveValue_t *value)
If rave value is list, then this provides same functionality as RaveObjectList_insert.
Definition rave_value.c:1082
RaveValue_t * RaveValueString_substring(RaveValue_t *self, int start, int len)
Creates a substring from self.
Definition rave_value.c:306
int RaveValue_getDouble(RaveValue_t *self, double *value)
Returns the value as a double.
Definition rave_value.c:470
int RaveValue_getLong(RaveValue_t *self, long *value)
Returns the value as a long.
Definition rave_value.c:432
struct _RaveValue_t RaveValue_t
Defines a rave value.
Definition rave_value.h:47
void RaveValue_reset(RaveValue_t *self)
Resets the value object.
Definition rave_value.c:163
long RaveValue_toLong(RaveValue_t *self)
Returns the long value.
Definition rave_value.c:444
RaveValue_t * RaveValue_createDoubleArray(double *value, int len)
Creates a double array rave value.
Definition rave_value.c:789
int RaveValueHash_put(RaveValue_t *self, const char *key, RaveValue_t *value)
If rave value is hash, then this provides same functionality as RaveObjectHashTable_put.
Definition rave_value.c:950
int RaveValue_isDoubleArray(RaveValue_t *self)
Returns if the rave value can be represented as a double array (list of double only)
Definition rave_value.c:768
RaveValue_t * RaveValue_createDouble(double value)
Creates a double rave value.
Definition rave_value.c:450
RaveValue_t * RaveValue_createLong(long value)
Creates a long rave value.
Definition rave_value.c:413
int RaveValue_isNull(RaveValue_t *self)
Returns if the value is null or not.
Definition rave_value.c:543
double RaveValue_toDouble(RaveValue_t *self)
Returns the double value.
Definition rave_value.c:482
RaveValue_Type
Definition rave_value.h:32
@ RaveValue_Type_String
String.
Definition rave_value.h:34
@ RaveValue_Type_Long
Long.
Definition rave_value.h:35
@ RaveValue_Type_Boolean
Boolean.
Definition rave_value.h:37
@ RaveValue_Type_Hashtable
Hash table.
Definition rave_value.h:40
@ RaveValue_Type_Data2D
2D array
Definition rave_value.h:39
@ RaveValue_Type_Undefined
Undefined.
Definition rave_value.h:33
@ RaveValue_Type_Null
Null.
Definition rave_value.h:38
@ RaveValue_Type_Double
Double.
Definition rave_value.h:36
int RaveValueList_size(RaveValue_t *self)
If rave value is list, then this provides same functionality as RaveObjectList_size.
Definition rave_value.c:1124
RaveValue_t * RaveValue_fromJSON(const char *json)
Support function for translating a json structure to a rave value.
Definition rave_value.c:1366
int RaveValue_setDoubleArray(RaveValue_t *self, double *value, int len)
Sets the value as a simple 1-dimensional double array.
Definition rave_value.c:800
void RaveValue_setDouble(RaveValue_t *self, double value)
Sets the value as a double.
Definition rave_value.c:462
RaveValue_t * RaveValue_createHashTable(RaveObjectHashTable_t *hashtable)
Creates a rave value hash table.
Definition rave_value.c:874
int RaveValue_getBoolean(RaveValue_t *self, int *value)
Returns the value as a boolean.
Definition rave_value.c:507
int RaveValue_getDoubleArray(RaveValue_t *self, double **value, int *len)
Returns the value as a double array.
Definition rave_value.c:828
void RaveValueList_clear(RaveValue_t *self)
If rave value is list, then this provides same functionality as RaveObjectList_clear.
Definition rave_value.c:1150
void RaveValue_setNull(RaveValue_t *self)
Sets the value as a null value.
Definition rave_value.c:536
Implementation of a rave object hashtable that maps between strings and rave core objects.
struct _RaveObjectHashTable_t RaveObjectHashTable_t
Defines a hash table.
Definition raveobject_hashtable.h:38
struct _RaveObjectList_t RaveObjectList_t
Defines a list.
Definition raveobject_list.h:38
Represents one scan in a volume.
Definition rave_value.c:47
RaveObjectHashTable_t * hashtable
the hash table
Definition rave_value.c:54