Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

SFW::Object Class Reference

The root of the class tree. More...

#include <Object.H>

Inheritance diagram for SFW::Object:

List of all members.

Public Methods

virtual ~Object ()
 A blank virtual destructor. More...

virtual string getType ()const
 Return the string representation of the type name. More...

virtual bool isType (const string &type)const
 Check for type equality. More...

virtual SFW::Object* clone ()const=0
 Return a duplicate of this object. More...


Detailed Description

The root of the class tree.

The Object class is the root of all other framework classes. Internally, it provides the structure for runtime type information. It's important that all classes be subclasses of Object, because most SFW constructs handle Object*.

Every Object subclass must also have corresponding TYPE_INFO and TYPE_INIT declarations, or V_TYPE_INFO for abstract classes.

Definition at line 68 of file Object.H.


Constructor & Destructor Documentation

SFW::Object::~Object ( ) [inline, virtual]
 

A blank virtual destructor.

This ensures proper handling for subclasses.

Definition at line 74 of file Object.H.


Member Function Documentation

SFW::Object * SFW::Object::clone ( ) const [pure virtual]
 

Return a duplicate of this object.

Note that there is no magic here, a proper copy constructor still needs to be implemented in any case it would regularly be needed. This function merely provides a reference from a particular object to that copy constructor, without having to explicitly know what class the object is.

string SFW::Object::getType ( ) const [virtual]
 

Return the string representation of the type name.

This returns the full type name, including any classes or namespaces it's contained in.

Definition at line 42 of file Object.C.

bool SFW::Object::isType ( const string & type ) const [virtual]
 

Check for type equality.

This function will return true if this object is of class type, or if this object inherits from class type.

Definition at line 46 of file Object.C.


The documentation for this class was generated from the following files:
Generated at Tue Jan 2 15:38:34 2001 for SFW by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000