|
INGOR
|
Wrapper class for primitive and other arbitrary types. More...
#include <ytValue.h>
Public Member Functions | |
| ytObject * | ytValue_obj (ytValue *val) |
| Returns a ytObject pointer of the ytValue instance. | |
| ytObject * | ytValue_newObject (void *ptr, ytType type) |
| Creates a new ytValue instance that wraps given value, and returns it as a pointer to ytObject. | |
| void * | ytValue_ptr (ytObject *this) |
| Returns the pointer to which this ytValue instance points. | |
| ytObject * | ytValue_int (int value) |
| Returns the ytObject representing the given integer value. | |
| int | ytValue_intValue (const ytObject *obj) |
| Returns integer value. | |
| void | ytValue_intSet (ytObject *obj, int value) |
| Sets an integer value in the ytType_INT ytObject instance. | |
| ytObject * | ytValue_double (double value) |
| double | ytValue_doubleValue (const ytObject *obj) |
| Returns a double value. | |
| void | ytValue_doubleSet (ytObject *obj, double value) |
| Sets a double integer value in the ytType_DOUBLE ytObject instance. | |
| ytObject * | ytValue_str (char *ptr) |
| Returns the ytObject instance containing the given char pointer. | |
| ytObject * | ytValue_strCopy (const char *ptr) |
| Returns the ytObject instance containing the copy of the given char pointer. | |
| char * | ytValue_strValue (const ytObject *obj) |
| Converts ytObjbect of type ytType_CHAR_P to char pointer. | |
| ytObject * | ytValue_size_t (size_t value) |
| Returns the ytObject instance representing the given size_t value. | |
| size_t | ytValue_size_tValue (const ytObject *obj) |
| Returns a size_t value of this object. | |
| void | ytValue_delete (void *this) |
| Deletes the ytValue instance. | |
Public Attributes | |
| ytObject | obj |
| void * | ptr |
Wrapper class for primitive and other arbitrary types.
This class is designed to provide a wrapper container class for mainly primitive types such as int, double and so on. This enables us to handle primitive typed values as ytObject class instances.
| void ytValue_delete | ( | void * | this | ) |
| ytObject * ytValue_double | ( | double | value | ) |
\ brief Returns the ytObject representing the given double value.
| double ytValue_doubleValue | ( | const ytObject * | obj | ) |
Returns a double value.
| obj |
| ytObject * ytValue_int | ( | int | value | ) |
Returns the ytObject representing the given integer value.
| int ytValue_intValue | ( | const ytObject * | obj | ) |
| ytObject * ytValue_size_t | ( | size_t | value | ) |
Returns the ytObject instance representing the given size_t value.
| value |
| size_t ytValue_size_tValue | ( | const ytObject * | obj | ) |
Returns a size_t value of this object.
| obj |