SPRAAK
|
Provide the object oriented layer for the SPRAAK environment. More...
Macros | |
#define | SPR_CAST(spr__base, spr__class, spr__object) |
Cast the type of a class object. More... | |
#define | SPR_CLASSID_FORM_CLASS(spr__class) |
#define | SPR_DO(spr__class, spr__method,...) |
Call a method from a class. More... | |
#define | SPR_DO_FPTR(spr__class, spr__method, spr__object) |
Get function pointer for a given method. More... | |
#define | SPR_DO_OPTR(spr__class, spr__method, spr__object) |
Get the adjusted object pointer for a given method. More... | |
#define | SprMethodPtr(spr__class, spr__method) |
Generate a method function pointer type. More... | |
#define | SPR_OBJECT_INIT(spr__class, spr__object) |
Initialize RTTI of a dynamically allocated object. More... | |
#define | SPR_LVAR_OBJECT_INIT(spr__class, spr__object) |
Initialize RTTI of a statically allocated object. More... | |
Typedefs | |
typedef struct spr_t_object | SprObject |
Functions | |
const char * | SPR_CLASSID_FROM_OBJ (const void *object) |
Provide the object oriented layer for the SPRAAK environment.
Provide the necessary macro's and auxilary functions to allow the use of classes while still programming in C (at least, when working in the SPRAAK framework). For more details on working with classes, see Working with SPRAAK classes and objects
Type-checking on the first argument (the object) when calling methods in a class is sometimes dissabled.
The compiler warnings given on invalid method calls may be obscure.
The object machinery in SPRAAK relies heavy on the parser to do most of the magic, and hence cannot be readily used in other projects.