/* * VirtualInstrumentManager.hh * * Created on: Jan 17, 2013 * Author: f.casimir */ #ifndef VIRTUALINSTRUMENTMANAGER_HH_ #define VIRTUALINSTRUMENTMANAGER_HH_ #include #include #include #include #include "dsgpatt_Singleton.hh" namespace AMDA { namespace DDServerInterface { class VirtualInstrument; typedef boost::weak_ptr VirtualInstrumentWPtr; typedef boost::shared_ptr VirtualInstrumentSPtr; /** * @class VirtualInstrumentManager * @brief This Singleton contains and maintain a set of VirtualInstrument object with key as VIName. */ class VirtualInstrumentManager : public ::Singleton { public: typedef std::map VirtualInstrumentMap; // Design pattern friend class Singleton; /** * @brief If the VI not exist, create it. * @return a SharedPtr on a VirtualInstrument. */ VirtualInstrumentSPtr getVirtualInstrument(const std::string& pVirtualInstrumentName); const char* getUserHost(); const char* getUserName(); int ddErrorToAmdaError(int ddError); private: VirtualInstrumentManager(); virtual ~VirtualInstrumentManager(); VirtualInstrumentMap _virtualInstrumentMap; /*!< VirtualInstrument list */ std::string _userHost; std::string _userName; }; } /* namespace DDServerInterface */ } /* namespace AMDA */ #endif /* VIRTUALINSTRUMENTMANAGER_HH_ */