SolarCapture C Bindings
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Enumerations | Functions
object.h File Reference

sc_object: Opaque object interface. Use this to pass all types of data that are not ints, doubles or char arrays (see SC_PARAM_INT, SC_PARAM_DBL and SC_PARAM_STR respectively for these). More...

Go to the source code of this file.

Enumerations

enum  sc_object_type { SC_OBJ_ANY, SC_OBJ_OPAQUE, SC_OBJ_PKT_PREDICATE }
 The type of data the sc_object contains. More...
 

Functions

enum sc_object_type sc_object_type (struct sc_object *obj)
 Return the type of data contained within the sc_object. More...
 
int sc_opaque_alloc (struct sc_object **obj_out, void *opaque)
 Allocate memory for an opaque sc_object. More...
 
void sc_opaque_free (struct sc_object *obj)
 Free an sc_object previously allocated using sc_opaque_alloc. Only use this to free an opaque sc_object. The underlying data wrapped by this object will not be freed. More...
 
void sc_opaque_set_ptr (struct sc_object *obj, void *opaque)
 Set the opaque pointer in an sc_object. More...
 
void * sc_opaque_get_ptr (const struct sc_object *obj)
 Get the opaque pointer stored in an sc_object. More...
 

Detailed Description

sc_object: Opaque object interface. Use this to pass all types of data that are not ints, doubles or char arrays (see SC_PARAM_INT, SC_PARAM_DBL and SC_PARAM_STR respectively for these).