nObject Class Reference
[Nebula Kernel]
#include <nobject.h>
Inheritance diagram for nObject:

Detailed Description
Provides:- reference counting and tracking (through nReferenced)
- Nebula RTTI, a class is identified by a string name
Rules for subclasses:
- only the default constructor is allowed
- never use new/delete (or variants like n_new/n_delete) with nObject objects
- use nKernelServer::New() to create an object and the object's Release() method to destroy it
See also nObject Script Interface
(c) 2004 Vadim Macagon Refactored out of nRoot.
Definition at line 38 of file nobject.h.
Public Member Functions | |
| nObject () | |
| constructor (DONT CALL DIRECTLY, USE nKernelServer::New() INSTEAD) | |
| virtual bool | SaveCmds (nPersistServer *ps) |
| save object to persistent stream | |
| virtual int | GetInstanceSize () const |
| get instance size | |
| virtual bool | SaveAs (const char *name) |
| save object under different name | |
| virtual nObject * | Clone (const char *unused=0) |
| create new object as clone of this object | |
| nClass * | GetClass () const |
| get pointer to my class object | |
| bool | IsA (const nClass *) const |
| return true if part of class hierarchy | |
| bool | IsA (const char *) const |
| return true if part of class hierarchy | |
| bool | IsInstanceOf (const nClass *) const |
| return true instance of class | |
| bool | IsInstanceOf (const char *) const |
| return true instance of class | |
| bool | Dispatch (nCmd *) |
| invoke nCmd on object | |
| void | GetCmdProtos (nHashList *) |
| get cmdproto list from object | |
Static Public Attributes | |
| static nKernelServer * | kernelServer |
| pointer to kernel server | |
Protected Member Functions | |
| virtual | ~nObject () |
| destructor (DONT CALL DIRECTLY, USE Release() INSTEAD) | |
| void | SetClass (nClass *) |
| set pointer to my class object | |
Protected Attributes | |
| nClass * | instanceClass |
Friends | |
| class | nClass |
Constructor & Destructor Documentation
|
|
constructor (DONT CALL DIRECTLY, USE nKernelServer::New() INSTEAD)
Definition at line 13 of file nobject_main.cc. |
|
|
destructor (DONT CALL DIRECTLY, USE Release() INSTEAD)
Definition at line 22 of file nobject_main.cc. |
Member Function Documentation
|
|
|
get instance size Get byte size of this instance. For more accuracy, subclasses should add the size of allocated memory. Definition at line 135 of file nobject_main.cc. |
|
|
save object under different name
Reimplemented in nRoot. Definition at line 71 of file nobject_main.cc. |
|
|
create new object as clone of this object
Reimplemented in nRoot. Definition at line 95 of file nobject_main.cc. |
|
|
get pointer to my class object
|
|
|
return true if part of class hierarchy
|
|
|
return true if part of class hierarchy
Definition at line 147 of file nobject_main.cc. |
|
|
return true instance of class
|
|
|
return true instance of class
Definition at line 157 of file nobject_main.cc. |
|
|
invoke nCmd on object
Definition at line 31 of file nobject_main.cc. |
|
|
get cmdproto list from object
Definition at line 44 of file nobject_main.cc. |
|
|
set pointer to my class object
|
Friends And Related Function Documentation
|
|
|
Member Data Documentation
|
|
pointer to kernel server
|
|
|
|
The documentation for this class was generated from the following files: