class.h File Reference
Class header. More...
Go to the source code of this file.
Data Structures | |
| struct | PmClass_s |
| Class struct. More... | |
| struct | PmInstance_s |
| Class instance struct. More... | |
| struct | PmMethod_s |
| Method struct. More... | |
Typedefs | |
| typedef struct PmClass_s | PmClass_t |
| Class struct. | |
| typedef struct PmInstance_s | PmInstance_t |
| Class instance struct. | |
| typedef struct PmMethod_s | PmMethod_t |
| Method struct. | |
Functions | |
| PmReturn_t | class_new (pPmObj_t pmeths, pPmObj_t pbases, pPmObj_t pname, pPmObj_t *r_pclass) |
| Creates a new Class object from the methods dict, bases tuple, and name string. | |
| PmReturn_t | class_instantiate (pPmObj_t pclass, pPmObj_t *r_pobj) |
| Returns an instance of the given class. | |
| PmReturn_t | class_method (pPmObj_t pinstance, pPmObj_t pfunc, pPmObj_t *r_pmeth) |
| Returns a method based on the given inputs. | |
| 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. | |
| uint8_t | class_isSubclass (pPmObj_t ptest_class, pPmObj_t pbase_class) |
| Returns a C boolean if the base class is found in the inheritance tree of the test class. | |
Detailed Description
Class header.
Definition in file class.h.
Typedef Documentation
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.
Function Documentation
| PmReturn_t class_getAttr | ( | pPmObj_t | pobj, |
| pPmObj_t | pname, | ||
| pPmObj_t * | r_pobj | ||
| ) |
| PmReturn_t class_instantiate | ( | pPmObj_t | pclass, |
| pPmObj_t * | r_pobj | ||
| ) |
Returns a C boolean if the base class is found in the inheritance tree of the test class.
NOTE: This function is recursive.
- Parameters:
-
ptest_class ptr to class whose inheritance tree is searched pbase_class ptr to class to look for
- Returns:
- Returns C_TRUE if pbase_class is found in the inheritance tree; C_FALSE otherwise.
| PmReturn_t class_method | ( | pPmObj_t | pinstance, |
| pPmObj_t | pfunc, | ||
| pPmObj_t * | r_pmeth | ||
| ) |
| PmReturn_t class_new | ( | pPmObj_t | pmeths, |
| pPmObj_t | pbases, | ||
| pPmObj_t | pname, | ||
| pPmObj_t * | r_pclass | ||
| ) |
Generated on Tue Jul 12 2022 17:07:01 by
1.7.2