TypeAwareObject Class Reference

Base class for objects to store class inheritance hierarchy. More...

#include <TypeAwareObject.h>

Inheritance diagram for TypeAwareObject:

Inheritance graph

List of all members.

Public Member Functions

virtual const std::string & getObjectType () const =0
virtual bool isKindOf (const std::string &className) const =0

Protected Member Functions

virtual ~TypeAwareObject ()


Detailed Description

Base class for objects to store class inheritance hierarchy.

TypeAwareObject is an interface used to provide RTTI-like capability without having to compile with RTTI overhead. It provides several methods that must be implemented by all classes derived from it, even if intermediate parent classes have already implemented the obligations.

Definition at line 24 of file TypeAwareObject.h.


Constructor & Destructor Documentation

virtual TypeAwareObject::~TypeAwareObject (  )  [protected, virtual]

This should not be deleted directly.

It should be deleted according to the instructions provided for the relevant subclass.

Definition at line 54 of file TypeAwareObject.h.


Member Function Documentation

virtual const std::string& TypeAwareObject::getObjectType (  )  const [pure virtual]

Returns a string containing the class name.

Must be implemented by all subclasses.

Returns:
A string containing the name of the class.

Implemented in SubjectAdapter.

virtual bool TypeAwareObject::isKindOf ( const std::string &  className  )  const [pure virtual]

Compares an incoming argument string against either the object's true class name or one of its parent (inherited) class names.

Parameters:
className Name of the class that is to be searched for in the object's inheritance hierarchy.
Returns:
True if the object's class, or something it can safely be cast to, matches the incoming argument.

Implemented in SubjectAdapter.


Software Development Kit - Opticks 4.9.0 Build 16218