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

CdbBdb2RooPayloadConvertersDict.hh

Go to the documentation of this file.
00001 #ifndef CDBROOCONVERSIONFWK_BDB_2_ROO_PAYLOAD_CONVERTERS_DICT_HH
00002 #define CDBROOCONVERSIONFWK_BDB_2_ROO_PAYLOAD_CONVERTERS_DICT_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdb2RooPayloadConvertersDict.hh,v 1.2 2005/07/14 16:11:04 jtinslay Exp $
00006 
00007 #include "CdbBase/CdbCPtr.hh"
00008 
00009 #include <string>
00010 #include <map>
00011 
00012 class CdbRooConverterBase;
00013 
00014 /// The dictionary fo user defined converters
00015 /**
00016   * An object of this class manages a dictionary of user defined converters for pairs
00017   * of "Bdb" and "Roo" persistent classes. The dictionay is supposed to be prepared
00018   * before and be used in a course of an actual conversion path.
00019   *
00020   * Notes on the dictionary use:
00021   *
00022   * 1. It's expected that there is a bidirectional one-to-one correspondance between
00023   *    input and output classes. This policy will be enforced by the "add()" method of
00024   *    of the dictionary.
00025   *
00026   * @see class CdbRooConverterBase
00027   */
00028 class CdbBdb2RooPayloadConvertersDict {
00029 
00030 public:
00031 
00032   /// The default constructor
00033 
00034     CdbBdb2RooPayloadConvertersDict( );
00035 
00036   /// The copy constructor
00037 
00038     CdbBdb2RooPayloadConvertersDict( const CdbBdb2RooPayloadConvertersDict& theOther );
00039 
00040   /// The destructor.
00041 
00042     virtual ~CdbBdb2RooPayloadConvertersDict( );
00043 
00044   /// The assignment operator
00045 
00046     CdbBdb2RooPayloadConvertersDict& operator=( const CdbBdb2RooPayloadConvertersDict& theOther );
00047 
00048   /// Add a converter
00049 
00050     virtual CdbStatus add( const CdbCPtr< CdbRooConverterBase>& theConverterPtr );
00051 
00052   /// Find a converter by the specified "input" class name
00053   /**
00054     * The method will return a pointer on the converter or 0 if no object matching
00055     * the specified name is found.
00056     */
00057     virtual CdbCPtr< CdbRooConverterBase > findByInputClassName( const std::string& theName ) const;
00058 
00059   /// Find a converter by the specified "output" class name
00060   /**
00061     * The method will return a pointer on the converter or 0 if no object matching
00062     * the specified name is found.
00063     */
00064     virtual CdbCPtr< CdbRooConverterBase > findByOutputClassName( const std::string& theName ) const;
00065 
00066 private:
00067 
00068     std::map< std::string, CdbCPtr< CdbRooConverterBase > > _byInputClassName;
00069     std::map< std::string, CdbCPtr< CdbRooConverterBase > > _byOutputClassName;
00070 };
00071 
00072 #endif  // CDBROOCONVERSIONFWK_BDB_2_ROO_PAYLOAD_CONVERTERS_DICT_HH

Generated on Mon Dec 5 18:21:59 2005 for CDB by doxygen1.3-rc3