mana-core-sgcomps / src / ProxyProviderSvc.h

The default branch has multiple heads

/** @file ProxyProviderSvc.h
    @brief manages the address providers and add proxies on demand to the store
  * @author Paolo Calafiura <> - ATLAS Collaboration
  * $Id: ProxyProviderSvc.h,v 1.2 2007-06-22 23:54:56 calaf Exp $


 #include "AthenaKernel/IProxyProviderSvc.h"
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/Property.h" /*StringArrayProperty*/
 #include "GaudiKernel/StatusCode.h"
#include <cassert>
#ifndef _CPP_SET
 #include <set>
#ifndef _CPP_STRING
 #include <string>
namespace SG {
  class DataProxy;
  class TransientAddress;

class IAddressProvider;
class IProxyRegistry; //this is DataStore
class IConversionSvc;
class IOpaqueAddress;
class ISvcLocator;
template <class TYPE> class SvcFactory;

///manages the address providers and add proxies on demand to the store
class ProxyProviderSvc : virtual public IProxyProviderSvc,
			 public Service 

  typedef std::set<IAddressProvider*>::iterator  pAPiterator;
  typedef std::list<SG::TransientAddress*> TAdList;
  typedef TAdList::iterator TAdIterator;

  ///IProxyProvider interface
  ///add proxies to the store to modify (before Begin Event)
  virtual StatusCode preLoadProxies(IProxyRegistry& storeToModify);

  ///add proxies to the store to modify (during Begin Event)
  virtual StatusCode loadProxies(IProxyRegistry& storeToModify);

  ///get the default proxy. Optionally add proxies to the store to modify
  virtual SG::DataProxy* retrieveProxy(const CLID& id, const std::string& key,
				       IProxyRegistry& storeToModify);

  /// update a transient Address
  virtual StatusCode updateAddress(SG::TransientAddress* tad);

 ///create a list of transient Addresses:
  StatusCode addAddresses(IProxyRegistry& dataStore,
			  IAddressProvider* iap,
			  TAdList& tad);

  ///create a new Proxy, overriding CLID and/or key
  SG::DataProxy* addAddress(IProxyRegistry& storeToModify, 
			    SG::TransientAddress* tad);

  ///IAddressProvider manager functionality
  ///add a provider to the set of known ones. PROVIDER IS OWNED BY THE CLIENT
  virtual void addProvider(IAddressProvider* aProvider);

  /// Service boilerplate
  virtual StatusCode initialize();
  virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );

  /// the Service Factory
  friend class SvcFactory<ProxyProviderSvc>;
  /// Standard Service Constructor
  ProxyProviderSvc(const std::string& name, ISvcLocator* svcLoc);
  virtual ~ProxyProviderSvc();

  /// property: the services declared as providers
  StringArrayProperty m_providerNames;
  /// the handler for m_providerNames
  void providerNamesPropertyHandler( Property& theProp );
  /// the providers we know about. WE DON'T OWN THEM
  std::set<IAddressProvider*> m_providers; 
  /// Persistency Service
  IConversionSvc* m_pDataLoader;   

inline void ProxyProviderSvc::addProvider(IAddressProvider* aProvider) {

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.