GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ADF::FactoryItem Class Reference

Base class that described an item in a Factory. More...

#include <FactoryItem.h>

Public Member Functions

 FactoryItem ()
 
 FactoryItem (const Char_t *factname, const Char_t *whichitem, Version itemversion)
 
 FactoryItem (const Char_t *factname, Short_t factversion, const Char_t *whichitem, Version itemversion)
 
 FactoryItem (const FactoryItem &)
 
const std::string & GetFactoryName () const
 
void * GetFactoryPtr () const
 
Short_t GetFactoryVersion () const
 Ask the factory version. More...
 
const std::string & GetItemName () const
 
Version GetVersion () const
 
Bool_t IsAVersion (const FactoryItem &) const
 Compare two items. More...
 
Bool_t operator== (const FactoryItem &) const
 Compare two items. More...
 
void Print () const
 
void SetFactoryName (const char *fname)
 
void SetFactoryPtr (void *ptr)
 change More...
 
void SetFactoryVersion (Short_t v)
 Change the factory version. More...
 
void SetItem (const Char_t *whichfactory, const Char_t *whichitem, Version itemversion, Short_t factversion=-1, void *ptr=0x0)
 to change an item More...
 
void SetItem (const Char_t *whichfactory, Short_t factversion, const Char_t *whichitem, Version itemversion, void *ptr=0x0)
 
void SetItemName (const char *iname)
 
void SetVersion (const Version v)
 change More...
 
virtual ~FactoryItem ()
 

Detailed Description

Base class that described an item in a Factory.

An item in a factory should be uniquely identified by :

  • the name of the factory (unique, Registered in the MainFactory)
  • an item name/label/type.
  • a version of that item. In this case two numbers (UShort_t) Major / Minor

Additional informations concerning the factory are stored there

  • the version of the factory. A factory inherits from DotConf so that it could be initialised from files/ConfFrame. As such the version number is just a short (-1 is for unversionned things). The factory itself (New/DoNew) must deal with version number. For instance, asking for an item to a factory older should in principle return 0x0.
  • the address (pointer) of the instance that has created / should create a object. 0x0 means the global factory while non null corresponds to clones of the global factory

Definition at line 52 of file FactoryItem.h.


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