#ifndef _Brooks0254Input_ #define _Brooks0254Input_ #include #include #include using namespace std; //! Class to deal with the input field recognition. There will be only //! one instance of this class since this will only be used from the //! C-based EPICS device support. The only instance is initialized at //! the loading time. If an external function needs to use the //! functionalities of this class first it needs to call the //! Instantiate method (or brooksInputSet for C functions), and then //! extract the needsed parameters using access functions. class Brooks0254Input { private: int biChassis; int biCard; int biPortType; int biParam; //! Default constructor, copy constructor and copy operator are //! disabled for this class. Brooks0254Input(); Brooks0254Input( const Brooks0254Input& inp ); Brooks0254Input& operator=( const Brooks0254Input& inp ); //! Constructor of this class. It will be called from public method //! of this class Instantiate. It is not available for public use. Brooks0254Input( const char* input ) ; public: //! The pointer to the only instance of this class static Brooks0254Input* biInstance; //! Method to instantiate the only object oth this class. static Brooks0254Input* Instantiate( const char* inp ); //! Function to return the pointer to the instance of this class inline static Brooks0254Input* GetInstance() { return biInstance; } //! Returns the chassis number inline int GetChassis() const { return biChassis; } //! Return the card number inline int GetCard() const { return biCard; } //! Returns the port type (input or output) for the parameter inline int GetPortType() const { return biPortType; } //! Returns the parameter number the EPICS record correspond to inline int GetParam() const { return biParam; } }; #endif