RAIDA  1.9.0
Public Member Functions | List of all members
AIDA::IManagedObjectROOT Class Reference

An object which can be stored in a tree. More...

#include <IManagedObjectROOT.h>

Inheritance diagram for AIDA::IManagedObjectROOT:
AIDA::IManagedObject

Public Member Functions

virtual ~IManagedObject ()
 Destructor.
 
virtual std::string name () const
 Get the name of an IManagedObject. More...
 
virtual void * cast (const std::string &className) const
 A simple introspection method. More...
 

Detailed Description

An object which can be stored in a tree.

See Also
ITree
Author
T. Kraemer, DESY
Version
Id:
IManagedObjectROOT.h,v 1.2 2006-12-04 17:24:06 tkraemer Exp

Member Function Documentation

virtual void* AIDA::IManagedObjectROOT::cast ( const std::string &  className) const
virtual

A simple introspection method.

It offers to implementations the possibility to avoid the usage of the dynamic_cast. It appears that this C++ feature is not yet reliable (May 2003) in complex environments that intensivly use the dynamic loading. The signature of this method follows the qt_cast method found in Qt (see the Q_OBJECT macro). Example of usage is : AIDA::IManagedObject* object = tree->find("myData"); if(object) { AIDA::IHistogram* histo = object->cast("AIDA::IHistogram"); if(histo) { // the object is an histo. } }

Parameters
classNameThe name of the class to cast on.
Returns
The right pointer. Return 0 if className is not in the inheritance tree.

Implements AIDA::IManagedObject.

virtual std::string AIDA::IManagedObjectROOT::name ( ) const
virtual

Get the name of an IManagedObject.

Names can only be changed using the ITree.mv().

Returns
The name of the IManagedObject.

Implements AIDA::IManagedObject.


The documentation for this class was generated from the following file: