GetCommand.h

00001 #ifndef SCTARCHIVING_GETCOMMAND_H
00002 #define  SCTARCHIVING_GETCOMMAND_H
00003 #include "Sct/Serializable.h"
00004 #include "ArchivingCommand.h"
00005 #include "Sct/IOName.h"
00006 
00007 namespace SctArchiving{
00012   class GetCommand : public ArchivingCommand {
00013   public:
00015     GetCommand(boost::shared_ptr<Sct::IOName> name);
00017     ~GetCommand() {}
00019     virtual shared_ptr<Sct::Serializable> getObject() const;
00021     const Sct::IOName& getIOName() const;
00023     ArchivingCommand& operator=(const ArchivingCommand& copyme);
00025     virtual void setName(boost::shared_ptr<Sct::IOName> name);
00026   protected:
00027     boost::shared_ptr<Sct::IOName> m_name; 
00028     boost::shared_ptr<Sct::Serializable> m_ob; 
00029     GetCommand(){}
00030   };
00031 
00032   inline GetCommand::GetCommand(boost::shared_ptr<Sct::IOName> name)
00033     : m_name(name)
00034     {}
00035 
00036   inline boost::shared_ptr<Sct::Serializable> GetCommand::getObject() const {
00037     return m_ob;
00038   }
00039   
00040   inline const Sct::IOName& GetCommand::getIOName() const {
00041     if (!m_name.get()) throw Sct::IllegalStateError("NoName!", __FILE__, __LINE__);
00042     return *m_name;
00043   }
00044   
00045   inline void GetCommand::setName(boost::shared_ptr<Sct::IOName> name){
00046     m_name=name;
00047   }
00048 }
00049 
00050 #endif

Generated on Mon Feb 6 14:01:21 2006 for SCT DAQ/DCS Software - C++ by  doxygen 1.4.6