#include "mswFOCUS.h" class mswFOCUS : public eccsERROR_CLASS { public: mswFOCUS(); mswFOCUS(const dbSYMADDRESS dbPoint); ~mswFOCUS(); vltINT32 CurrentFocus(); const char *CurrentFocusName(); protected: mswFOCUS &CurrentFocus(vltINT32 newFocus); private: eccsDB_INT32 *currentFocus; friend class mswCHANGE_FOCUS; };
evhDB_TASK
Base class to access current focus data. It requires a database support point where the current focus station is stored and can be assessed. Typically this will be focus point in the standard TCS mode switching database branch, i.e. ":Appl_data:TCS:msw:foc".
mswFOCUS(); mswFOCUS(const dbSYMADDRESS dbPoint); Two constructors are provided. The second one receives as parameter the symbolic address of online database support point for the object, i.e. the point where the object can find configuration and run time values. The first one defines the online database support point calling the standard tcsDbRoot(4) function and appenting the default relative path from the TCS database root point, assuming a complete default TCS database structure. ~mswFOCUS() Deletes all the internal structures created dynamically. vltINT32 CurrentFocus(); const char *CurrentFocusName(); Return the current focus value or name as stored in the database. These methods can be used by external TCS modules to pick up the current focus.
mswFOCUS &mswFOCUS::CurrentFocus(vltINT32 newFocus) Stores in the database a new value for the current focus. It is not publicly available, since it is meant to be used only by the msw friend class mswCHANGE_FOCUS(4)
eccsDB_INT32 *currentFocusDb; Database access object
mswCHANGE_FOCUS(4)
The class will tipically point to an instance of the mswCHANGE_FOCUS database class, but it just assumes that the given database point contains the attribute: ATTRIBUTE INT32 currentFocus
eccsERROR_CLASS(4) mswCHANGE_FOCUS(4)