Go to the source code of this file.
Classes | |
| struct | PmClass_s |
| struct | PmInstance_s |
| struct | PmMethod_s |
Typedefs | |
| typedef struct PmClass_s | PmClass_t |
| typedef struct PmClass_s * | pPmClass_t |
| typedef struct PmInstance_s | PmInstance_t |
| typedef struct PmInstance_s * | pPmInstance_t |
| typedef struct PmMethod_s | PmMethod_t |
| typedef struct PmMethod_s * | pPmMethod_t |
Functions | |
| PmReturn_t | class_new (pPmObj_t pmeths, pPmObj_t pbases, pPmObj_t pname, pPmObj_t *r_pclass) |
| PmReturn_t | class_instantiate (pPmObj_t pclass, pPmObj_t *r_pobj) |
| PmReturn_t | class_method (pPmObj_t pinstance, pPmObj_t pfunc, pPmObj_t *r_pmeth) |
| PmReturn_t | class_getAttr (pPmObj_t pobj, pPmObj_t pname, pPmObj_t *r_pobj) |
| uint8_t | class_isSubclass (pPmObj_t ptest_class, pPmObj_t pbase_class) |
Class struct
This C struct is used for PyMite class objects Note: Exceptions are objects.
| typedef struct PmInstance_s PmInstance_t |
Class instance struct
| typedef struct PmMethod_s PmMethod_t |
Method struct
| PmReturn_t class_getAttr | ( | pPmObj_t | pobj, | |
| pPmObj_t | pname, | |||
| pPmObj_t * | r_pobj | |||
| ) |
Returns the first attribute named __init__ in the class' inheritance tree
| pobj | ptr to class or instance to search | |
| pname | ptr to name of attr to find | |
| r_pobj | Return by ref, ptr to attr if found, or undetermined |
| PmReturn_t class_instantiate | ( | pPmObj_t | pclass, | |
| pPmObj_t * | r_pobj | |||
| ) |
Returns an instance of the given class
| r_pobj | The class object as input, instance object as return |
Returns a C boolean if the base class is found in the inheritance tree of the test class. NOTE: This function is recursive.
| ptest_class | ptr to class whose inheritance tree is searched | |
| pbase_class | ptr to class to look for |
| PmReturn_t class_method | ( | pPmObj_t | pinstance, | |
| pPmObj_t | pfunc, | |||
| pPmObj_t * | r_pmeth | |||
| ) |
Returns a method based on the given inputs
| pinstance | ptr to instance | |
| pfunc | ptr to func | |
| r_pmeth | Return by ref, ptr to new method |
| PmReturn_t class_new | ( | pPmObj_t | pmeths, | |
| pPmObj_t | pbases, | |||
| pPmObj_t | pname, | |||
| pPmObj_t * | r_pclass | |||
| ) |
1.5.9