Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Object Class Reference

"Objet" generique, utilise pour faire des list ou arbre d'element de type different More...

#include <MyObject.h>

Inheritance diagram for Object:

BaseObj< T, V > List of all members.

Public Member Functions

 Object ()
 Object (int _type, void *_thisParent)
void operator= (Object &source)

Public Attributes

void * thisParent
int type
LONG param
Obj_CallBack callBackAlloc

Detailed Description

"Objet" generique, utilise pour faire des list ou arbre d'element de type different

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.


Constructor & Destructor Documentation

Object::Object  )  [inline]
 

Definition at line 93 of file MyObject.h.

References callBackAlloc, param, thisParent, and type.

Object::Object int  _type,
void *  _thisParent
[inline]
 

Definition at line 101 of file MyObject.h.

References thisParent, and type.


Member Function Documentation

void Object::operator= Object source  )  [inline]
 

Definition at line 107 of file MyObject.h.

References callBackAlloc, param, param, thisParent, type, and type.


Member Data Documentation

Obj_CallBack Object::callBackAlloc
 

Definition at line 90 of file MyObject.h.

Referenced by Object(), and operator=().

LONG Object::param
 

Definition at line 89 of file MyObject.h.

Referenced by operator=().

void* Object::thisParent
 

Definition at line 87 of file MyObject.h.

Referenced by Object(), operator=(), and ValueEditors::Update().

int Object::type
 

Definition at line 88 of file MyObject.h.

Referenced by operator=().


The documentation for this class was generated from the following file:
Generated on Fri Aug 20 19:21:28 2004 for 3d Controls by doxygen 1.3.6