//////////////////////////////////////////////////////////////////////////////// /*! @file Instrument.h Инструмент, поставляемый с плагином. - Part of RANet - Research Assistant Net Library. - Copyright(C) 2010, Viktor E. Bursian, St.Petersburg, Russia. Viktor.Bursian@mail.ioffe.ru */////////////////////////////////////////////////////////////////////////////// #ifndef Instrument_H #define Instrument_H #include "FolderNode.h" #include namespace RA { //------------------------------------------------------------------------------ ANNOUNCE_CLASS(sInstrumentTag) ANNOUNCE_ABSTRACT_CLASS(sInstrument) enum eInstrumentType {cDriver,cConsole,cGadget}; //----------------------------------------------------------- sInstrumentTag --- class RANet_EXPORT sInstrumentTag : public sTag { public: //static fields static map AvailableClassList; protected: sInstrumentTag (literal classname ,eInstrumentType classtype); friend class sInstrument; }; //-------------------------------------------------------------- sInstrument --- /*! Абстрактный базовый класс для инструментов, поставляемых с плагинами. */ class RANet_EXPORT sInstrument : virtual public sAdam { ADAM(sInstrument) public: //static static bool Exists (sString ClassName); static bool IsDriver (sString ClassName); static bool IsConsole (sString ClassName); static bool IsGadget (sString ClassName); public: virtual ~sInstrument (); //! @todo{Instruments} dynamic_cast? bool IsConsole () { return IsConsole(TrueType()->Name()); } protected: sInstrument (); private: // это, запрещенные операции над sInstrument sInstrument (rcsInstrument); void operator = (rcsInstrument); void operator & (); }; //------------------------------------------------------------------------------ } //namespace RA #endif