40 #ifndef _uhal_ClientFactory_hpp_ 41 #define _uhal_ClientFactory_hpp_ 45 #include "uhal/log/log.hpp" 47 #include <boost/noncopyable.hpp> 48 #include <boost/shared_ptr.hpp> 49 #include <boost/unordered_map.hpp> 61 UHAL_DEFINE_EXCEPTION_CLASS ( ProtocolDoesNotExist ,
"Exception class to handle the case where the protocol requested does not exists in the creator map." )
100 void add (
const std::string& aProtocol ,
const std::string& aDescription =
"" );
168 boost::unordered_map< std::string , boost::shared_ptr< CreatorInterface > >
mCreators;
virtual ~CreatorInterface()
Destructor.
CreatorInterface()
Default constructor.
std::map< std::string, std::string > mProductDescriptions
Store the description of the factory product.
#define UHAL_DEFINE_EXCEPTION_CLASS(ClassName, ClassDescription)
Creator()
Default constructor.
Templated concrete implementation with a CreatorInterface interface.
An abstract base class for defining the interface to the creators.
A class to construct an IPbus client based on the protocol identifier specified NOTE! This is a facto...
virtual ~Creator()
Destructor.
boost::unordered_map< std::string, boost::shared_ptr< CreatorInterface > > mCreators
Hash map associating a creator for a particular protocol with a file name.
Struct to store a URI when parsed by boost spirit.
static ClientFactory * mInstance
The single instance of the class.