Vuo
0.4.8
|
Functions to serialize, unserialize, and summarize values of the type.
Functions | |
MyType | MyType_valueFromJson (json_object *js) |
Creates a new MyType value by unserializing a JSON-C object. | |
json_object * | MyType_jsonFromValue (const MyType value) |
Serializes a MyType value to a JSON-C object. | |
struct json_object * | MyType_interprocessJsonFromValue (const MyType value) |
Serializes a MyType value to a JSON-formatted string, in a format that will allow another process to unserialize it. | |
char * | MyType_summaryFromValue (const MyType value) |
Returns a brief description of a value. | |
MyType | MyType_valueFromString (const char *str) |
Creates a new MyType value by unserializing a JSON-formatted string. | |
char * | MyType_stringFromValue (const MyType value) |
Serializes a MyType value to a JSON-formatted string. | |
char * | MyType_interprocessStringFromValue (const MyType value) |
Serializes a MyType value to a JSON-formatted string, in a format that will allow another process to unserialize it. | |
void | MyType_retain (const MyType value) |
Increments the reference count of a value or its fields, if needed. | |
void | MyType_release (const MyType value) |
Decrements the reference count of a value or its fields, if needed. | |
|
read |
Serializes a MyType
value to a JSON-formatted string, in a format that will allow another process to unserialize it.
If this function is implemented, then MyType_valueFromJson
needs to handle both the format returned by this function and the format returned by MyType_jsonFromValue
.
This function is optional.
value | The value to serialize. May be null. |
MyType_valueFromJson
.char* MyType_interprocessStringFromValue | ( | const MyType | value | ) |
Serializes a MyType
value to a JSON-formatted string, in a format that will allow another process to unserialize it.
Calls MyType_interprocessJsonFromValue
.
This function is automatically generated by the Vuo compiler (but only if MyType_interprocessJsonFromValue
exists). Do not implement it. If this function needs to be called by MyType
or other code, then declare it in MyType
.
value | The value to serialize. |
json_object* MyType_jsonFromValue | ( | const MyType | value | ) |
Serializes a MyType
value to a JSON-C object.
This function is required.
value | The value to serialize. May be null. |
MyType_valueFromJson
. void MyType_release | ( | const MyType | value | ) |
Decrements the reference count of a value or its fields, if needed.
MyType
is a pointer, this function calls VuoRelease
on value
.MyType
is a struct, this function calls VuoRelease
on each field of value
that is a pointer.This function is automatically generated by the Vuo compiler. Do not implement it. If this function needs to be called by MyType
or other code, then declare it in MyType
.
void MyType_retain | ( | const MyType | value | ) |
Increments the reference count of a value or its fields, if needed.
MyType
is a pointer, this function calls VuoRetain
on value
.MyType
is a struct, this function calls VuoRetain
on each field of value
that is a pointer.This function is automatically generated by the Vuo compiler. Do not implement it. If this function needs to be called by MyType
or other code, then declare it in MyType
.
char* MyType_stringFromValue | ( | const MyType | value | ) |
Serializes a MyType
value to a JSON-formatted string.
Calls MyType_jsonFromValue
.
This function is automatically generated by the Vuo compiler. Do not implement it. If this function needs to be called by MyType
or other code, then declare it in MyType
.
value | The value to serialize. |
char* MyType_summaryFromValue | ( | const MyType | value | ) |
Returns a brief description of a value.
This function is required.
value | The value to summarize. May be null. |
MyType MyType_valueFromJson | ( | json_object * | js | ) |
Creates a new MyType
value by unserializing a JSON-C object.
This function is required.
js | A JSON-C object from MyType_jsonFromValue (or MyType_interprocesJsonFromValue if it exists), a constant port value defined in a composition, or a default port value defined in a node class implementation. |
VuoRegister
. MyType MyType_valueFromString | ( | const char * | str | ) |
Creates a new MyType
value by unserializing a JSON-formatted string.
Calls MyType_valueFromJson
.
This function is automatically generated by the Vuo compiler. Do not implement it. If this function is called by MyType
or other code, then declare it in MyType
.
str | A JSON-formatted string. |