SolarCapture C Bindings
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
object.h
Go to the documentation of this file.
1 
10 #ifndef __SOLAR_CAPTURE_OBJECT_H__
11 #define __SOLAR_CAPTURE_OBJECT_H__
12 
17  SC_OBJ_ANY,
20 };
21 
28 struct sc_object;
29 
34 extern enum sc_object_type sc_object_type(struct sc_object* obj);
35 
36 
37 #if SC_API_VER >= 2
38 
45 extern int sc_opaque_alloc(struct sc_object** obj_out, void* opaque);
46 
53 extern void sc_opaque_free(struct sc_object* obj);
54 
60 extern void sc_opaque_set_ptr(struct sc_object* obj, void* opaque);
61 
67 extern void* sc_opaque_get_ptr(const struct sc_object* obj);
68 #endif
69 
70 
71 #endif /* __SOLAR_CAPTURE_OBJECT_H__ */
72 
Definition: object.h:19
sc_object_type
The type of data the sc_object contains.
Definition: object.h:16
void * sc_opaque_get_ptr(const struct sc_object *obj)
Get the opaque pointer stored in an sc_object.
Definition: object.h:18
An opaque object. Use this to pass all types of data that are not ints, doubles or char arrays (see S...
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_obje...
int sc_opaque_alloc(struct sc_object **obj_out, void *opaque)
Allocate memory for an opaque sc_object.
void sc_opaque_set_ptr(struct sc_object *obj, void *opaque)
Set the opaque pointer in an sc_object.