variable

variable

Functions

Types and Values

enum VariableType
#define VT_LAST
#define VT_COUNT
typedef VariableClass
typedef VariableError
  Variable

Description

Functions

variable_new ()

Variable *
variable_new (VariableType type,
              ...);

variable_newv ()

Variable *
variable_newv (VariableType type,
               va_list ap);

variable_new_array ()

Variable *
variable_new_array (VariableType type,
                    size_t size,
                    ...);

variable_new_arrayv ()

Variable *
variable_new_arrayv (VariableType type,
                     size_t size,
                     va_list ap);

variable_new_compound ()

Variable *
variable_new_compound (String const *name,
                       ...);

variable_new_compoundv ()

Variable *
variable_new_compoundv (String const *name,
                        va_list ap);

variable_new_compound_variables ()

Variable *
variable_new_compound_variables (String const *name,
                                 size_t members,
                                 String const **names,
                                 Variable const **variables);

variable_new_copy ()

Variable *
variable_new_copy (Variable const *from);

variable_new_deserialize ()

Variable *
variable_new_deserialize (size_t *size,
                          char const *data);

variable_new_deserialize_buffer ()

Variable *
variable_new_deserialize_buffer (size_t *size,
                                 Buffer const *buffer);

variable_new_deserialize_type ()

Variable *
variable_new_deserialize_type (VariableType type,
                               size_t *size,
                               char const *data);

variable_delete ()

void
variable_delete (Variable *variable);

variable_get_as ()

VariableError
variable_get_as (Variable const *variable,
                 VariableType type,
                 void *result,
                 size_t *size);

variable_get_class ()

VariableClass
variable_get_class (Variable const *variable);

variable_get_pointer ()

void const *
variable_get_pointer (Variable const *variable);

variable_get_type ()

VariableType
variable_get_type (Variable const *variable);

variable_is_array ()

bool
variable_is_array (Variable const *variable);

variable_is_class ()

bool
variable_is_class (Variable const *variable,
                   VariableClass _class);

variable_is_compound ()

bool
variable_is_compound (Variable const *variable);

variable_is_instance ()

bool
variable_is_instance (Variable const *variable,
                      String const *name);

variable_is_scalar ()

bool
variable_is_scalar (Variable const *variable);

variable_is_type ()

bool
variable_is_type (Variable const *variable,
                  VariableType type);

variable_set ()

VariableError
variable_set (Variable *variable,
              ...);

variable_setv ()

VariableError
variable_setv (Variable *variable,
               va_list ap);

variable_set_type ()

VariableError
variable_set_type (Variable *variable,
                   VariableType type,
                   ...);

variable_set_typev ()

VariableError
variable_set_typev (Variable *variable,
                    VariableType type,
                    va_list ap);

variable_copy ()

VariableError
variable_copy (Variable *variable,
               Variable const *from);

variable_serialize ()

VariableError
variable_serialize (Variable *variable,
                    Buffer *buffer,
                    bool prefix);

Types and Values

enum VariableType

Members

VT_NULL

   

VT_BOOL

   

VT_INT8

   

VT_UINT8

   

VT_INT16

   

VT_UINT16

   

VT_INT32

   

VT_UINT32

   

VT_INT64

   

VT_UINT64

   

VT_FLOAT

   

VT_DOUBLE

   

VT_BUFFER

   

VT_STRING

   

VT_ARRAY

   

VT_COMPOUND

   

VT_POINTER

   

VT_LAST

# define VT_LAST VT_POINTER

VT_COUNT

# define VT_COUNT (VT_LAST + 1)

VariableClass

typedef unsigned int VariableClass;

VariableError

typedef int VariableError;

Variable

typedef struct _Variable Variable;