//-------------------------------------------------------------------------- // File and Version Information: // $Id: BdbConfigTestXTCTCProxyLoader.cc,v 1.1 1999/11/29 23:31:23 giorgos Exp $ // // Description: // Class BdbConfigTestXTCTCProxyLoader. // // Environment: // Software developed for the BaBar Detector at the SLAC B-Factory. // // Author List: // George Zioulas // // Copyright Information: // Copyright (C) 1999 SLAC // //-------------------------------------------------------------------------- //----------------------- // This Class's Header -- //----------------------- #include "BdbConfigTests/BdbConfigTestXTCTCProxyLoader.hh" //------------- // C Headers -- //------------- //--------------- // C++ Headers -- //--------------- //------------------------------- // Collaborating Class Headers -- //------------------------------- #include "BdbConfigTests/BdbConfigTestXTC.hh" #include "BdbConfigProxy/BdbConfigTreeCache.hh" #include "BdbTCProxy/BdbTCProxyDict.hh" #include "BdbTCProxy/BdbTCDictFE.hh" #include "BdbConfigTests/BdbConfigTestXTCTCProxy.hh" #include "OdfContainer/odfTestXTC.hh" //----------------------------------------------------------------------- // Local Macros, Typedefs, Structures, Unions and Forward Declarations -- //----------------------------------------------------------------------- // ------------------------------------ // -- Static Data Member Definitions -- // ------------------------------------ // ---------------------------------------- // -- Static Function Member Definitions -- // ---------------------------------------- // ---------------------------------------- // -- Public Function Member Definitions -- // ---------------------------------------- //--------------- // Constructor -- //--------------- BdbConfigTestXTCTCProxyLoader::BdbConfigTestXTCTCProxyLoader( ) : _vtabled(true) , _proxied(false) { } //-------------- // Destructor -- //-------------- BdbConfigTestXTCTCProxyLoader::~BdbConfigTestXTCTCProxyLoader( ) { } //-------------- // Operations -- //-------------- bool BdbConfigTestXTCTCProxyLoader::vtables( ) { // nothing to declare return true; } bool BdbConfigTestXTCTCProxyLoader::proxies( BdbTCProxyDict* theDict ) { { // Create the BdbConfigTestXTC proxy. BdbConfigCache* configCache = new BdbConfigTreeCache("Bdb/testTC"); if (configCache == 0) { ErrMsg(error) << " Could not create the BdbConfigTreeCache." << endmsg; return false; } BdbConfigTestXTCTCProxy* bdbConfigTestXTCTCProxy = new BdbConfigTestXTCTCProxy( configCache ) ; if (bdbConfigTestXTCTCProxy == 0) { ErrMsg(error) << " Could not create the BdbConfigTestXTCTCProxy." << endmsg; return false; } // Put the proxy into the dictionary. bool ok = BdbTCDictFE:: put( theDict, bdbConfigTestXTCTCProxy, IfdStrKey("Default") ); if (!ok) { ErrMsg(error) << " Could not register the BdbConfigTestXTCTCProxy." << endmsg; return false ; } } return true; } //------------- // Operators -- //------------- bool BdbConfigTestXTCTCProxyLoader::operator==( const BdbConfigTestXTCTCProxyLoader& other ) { return (this == &other); }