#include <gre/objectbase.h>
Inheritance diagram for GRE_OBJECT:

Public Types | |
| typedef void(* | CBFUNC )(const GRE_CALLBACK_MSG *, void *) |
Public Member Functions | |
| void | CallbackAdd (CBFUNC cbfunc, void *cbdata, GRE_OBJTYPE objtypes) |
| void | CallbackInvoke (const GRE_CALLBACK_MSG &msg) |
| void | CallbackInvoke (GRE_VIEW *view, GRE_CALLBACK_MSG::ACTION action) |
| void | CallbackInvoke (GRE_CALLBACK_MSG::ACTION action, ELEMTYPE elemtype) |
| void | CallbackInvoke (GRE_CALLBACK_MSG::ACTION action, GRE_VIEW *view=0, ELEMTYPE elemtype=ELEMTYPE_Empty) |
| void | CallbackRemove (CBFUNC cbfunc, void *cbdata, GRE_OBJTYPE objtypes=GRE_OBJTYPE_All) |
| bool | Destroy (bool NotifyParent=true) |
| bool | DestroyRequested () const |
| MICON | GetIcon () const |
| void * | GetPrivPtr (int idx) const |
| GRE_OBJTYPE | GetType () const |
| char * | GetTypeName (char *string) |
| const char * | GetTypeName () const |
| GRE_OBJECT (GRE_OBJTYPE type) | |
| bool | IsBeingDestroyed () const |
| void | SetPrivPtr (int idx, void *privptr) |
| virtual | ~GRE_OBJECT ()=0 |
Static Public Member Functions | |
| int | AllocPrivIndex () |
Protected Member Functions | |
| bool | CallbacksBeingInvoked () const |
| void | SetBeingDestroyed () |
| void | SetDestroyRequest () |
Private Member Functions | |
| virtual bool | v_Destroy (bool NotifyParent)=0 |
| virtual MICON | v_GetIcon () const =0 |
| virtual const char * | v_GetTypeName () const =0 |
Definition at line 43 of file objectbase.h.
|
|
Definition at line 47 of file objectbase.h. |
|
|
Constructor.
|
|
|
Destructor.
|
|
|
Allocate index into private pointer array to attach to.
|
|
||||||||||||||||
|
Add callback function to object. The new callback function will be added to the head of the list. Callbacks may be added to any GRE object. When a callback occurs for a particular object the message is sent to that object's callback list and any "ancestor" object's callback lists as well. A callback will be called if the object type for the message was included in the object types specified when the callback was added. This often eliminates the need to add callbacks to every GRE object which is created. If a program creates a single group and needs information about the group and layers within it then a callback can be added to the group with GRE_OBJTYPE_Group and GRE_OBJTYPE_Layer specified. Then within the callback itself a determination of the object type may be done. Alternatively two callbacks might be used, one specifying GRE_OBJTYPE_Group and the other specifying GRE_OBJTYPE_Layer. Both callbacks would be added to the group, but no check of the object type would be needed within the callback since only one object type was specified when each callback was added.
Definition at line 111 of file objectbase.h. |
|
|
Invoke callbacks on object and its ancestors. This method is generally only invoked from within the GRE library itself. |
|
||||||||||||
|
Invoke callbacks on object and its ancestors. This method is generally only invoked from within the GRE library itself. Definition at line 134 of file objectbase.h. |
|
||||||||||||
|
Invoke callbacks on object and its ancestors. This method is generally only invoked from within the GRE library itself. Definition at line 127 of file objectbase.h. |
|
||||||||||||||||
|
Invoke callbacks on object and its ancestors. This method is generally only invoked from within the GRE library itself. Definition at line 119 of file objectbase.h. |
|
||||||||||||||||
|
Remove callback function. All callbacks are automatically removed when the object is destroyed. However, if the data specified when the callback was added is freed before the object is destroyed, all callbacks referencing that data should be removed. In this case, the cbfunc may be specified as NULL and the cbdata should be the pointer about to be freed. This will remove all callbacks referencing that pointer in a single step.
Definition at line 152 of file objectbase.h. |
|
|
Determine if callbacks are currently being invoked on this object.
Definition at line 202 of file objectbase.h. |
|
|
Request destruction of this object.
Definition at line 77 of file objectbase.h. |
|
|
Determine if destruction has been requested for this object. Sometimes a callback may be invoked on an object after destruction has been requested on that object. This may occur if destruction occurs in a callback and more callbacks are in the list after the one destroying the object. In order to avoid unwanted processing or errors it may be necessary to determine if an object has been requested to be destroyed. This is only useful within a callback since once the callbacks are completed the destruction will finish and thus the object will no longer exist. Definition at line 166 of file objectbase.h. |
|
|
Get icon for this object type.
Definition at line 82 of file objectbase.h. |
|
|
Get "private" pointer for this object.
Definition at line 171 of file objectbase.h. |
|
|
Get GRE object type.
Definition at line 176 of file objectbase.h. |
|
|
Get name of this object type in string.
Definition at line 92 of file objectbase.h. |
|
|
Get name of this object type.
Definition at line 87 of file objectbase.h. |
|
|
Determine if object in process of being destroyed. Sometimes a callback may be invoked on an object after destruction has begun on that object. In order to avoid unwanted processing or errors it may be necessary to determine if an object is in the process of being destroyed. This is only useful within a callback since once the callbacks are completed the destruction will finish and thus the object will no longer exist. Definition at line 185 of file objectbase.h. |
|
|
Notify object that is being destroyed, usually called by Destroy() method.
Definition at line 206 of file objectbase.h. |
|
|
Request destruction of object, usually called by Destroy() method.
Definition at line 210 of file objectbase.h. |
|
||||||||||||
|
Set "private" pointer for this object. When an object is destroyed, the private pointers are NOT freed by the GRE system. Thus it is the programmers responsibility to see that allocated data attached to an object is freed at the appropriate time, usually by checking for ACTION_Destroy in the callback message.
Definition at line 194 of file objectbase.h. |
|
|
< GENERATING_DOXYGEN_OUTPUT Overridables.
|
|
|
|
|
|
|
1.3.8-20040913