#include <MyObject.h>
Inheritance diagram for Object:
Public Member Functions | |
Object () | |
Object (int _type, void *_thisParent) | |
void | operator= (Object &source) |
Public Attributes | |
void * | thisParent |
int | type |
LONG | param |
Obj_CallBack | callBackAlloc |
Ex.: "list a element variable"
// chaque class voulant etre CBase faire son init avec // BaseObj<CMyClass,CBASE_INDEX_CUSTOM> obj_myClass; MyList<Obj> objs; { CBase_int var0; var0.value = 12; objs+=var0; CBase_double var1; var1.value = 12.345; objs+=var1; CBase_string var2; var2.value = "coucou"; objs+=var2; // le element on boen ete recopier car a la fin du } var0,var1,var2 sont des-allouée } CBase_string varStatic; varStatic.value="fait le hibou"; objs+=&varStatic; // ici on affect le ptr par d'utilisation de recopy MyString res; for (objs=0;objs.More();objs++) { Obj *ptrObj = objs(); switch (ptrObj->type) { case CBASE_INDEX_INT: { CBase_int *ptr = (CBase_int *)ptrObj->thisParent; res<<" Int: "<<ptr->value; break; } case CBASE_INDEX_DOUBLE: { CBase_double *ptr = (CBase_double *)ptrObj->thisParent; res<<" Double: "<<ptr->value; break; } case CBASE_INDEX_STRING: { CBase_string *ptr = (CBase_string *)ptrObj->thisParent; res<<" String: "<<ptr->value; break; } } } MessageBox(NULL,res,"Resultat",0);
Definition at line 84 of file MyObject.h.
|
Definition at line 93 of file MyObject.h. References callBackAlloc, param, thisParent, and type. |
|
Definition at line 101 of file MyObject.h. References thisParent, and type. |
|
Definition at line 107 of file MyObject.h. References callBackAlloc, param, param, thisParent, type, and type. |
|
Definition at line 90 of file MyObject.h. Referenced by Object(), and operator=(). |
|
Definition at line 89 of file MyObject.h. Referenced by operator=(). |
|
Definition at line 87 of file MyObject.h. Referenced by Object(), operator=(), and ValueEditors::Update(). |
|
Definition at line 88 of file MyObject.h. Referenced by operator=(). |