Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

mswINS_CONFIG_DATA.h

Go to the documentation of this file.
00001 #ifndef mswINS_CONFIG_DATA_H
00002 #define mswINS_CONFIG_DATA_H
00003 /*******************************************************************************
00004 * E.S.O. - VLT project
00005 *
00006 * "@(#) $Id: mswINS_CONFIG_DATA.h,v 1.115 2003/11/12 14:33:37 vltsccm Exp $"
00007 *
00008 * who       when      what
00009 * --------  --------  ----------------------------------------------
00010 * gchiozzi  11/02/97  Created
00011 */
00012 
00013 /************************************************************************
00014  *
00015  *----------------------------------------------------------------------
00016  */
00017 #ifndef __cplusplus
00018 #error This is a C++ include file and cannot be used from plain C
00019 #endif
00020 
00021 #include "msw.h"
00022 #include "mswINS_DATA_RECORD.h"
00023 
00024 // mswINS_CONFIG_DATA usage and behaviour
00025 // -------------------------------- 
00026 // mswINS_CONFIG_DATA class is not only used by msw, but also by trkws, 
00027 // which links the libmsw.a.
00028 // trkws must access always the DB to get data from the table,
00029 // so it uses the mswINS_DATA class.
00030 
00031 const mswINSID mswSELECTED_INS = "";
00032 
00033 class mswINS_CONFIG_DATA : public eccsERROR_CLASS
00034 {
00035   public:
00036     mswINS_CONFIG_DATA(const dbSYMADDRESS dbPoint = dbEMPTY);
00037     virtual ~mswINS_CONFIG_DATA();
00038 
00039     mswINSID           &InsId(); 
00040     mswINS_DATA_RECORD &InsData(const mswINSID &ins = mswSELECTED_INS); 
00041 
00042     vltLOGICAL          IsInsData(const mswINSID &ins);
00043     vltLOGICAL          IsSelIns(const mswINSID &ins);
00044 
00045     virtual ccsCOMPL_STAT DbPoint(const dbSYMADDRESS point);
00046     virtual const char   *DbPoint() const;
00047     
00048   protected:
00049     // Loads the table from DB
00050     virtual ccsCOMPL_STAT  LoadTable();
00051 
00052     // Address of the root point for the instrument 
00053     // configuration data table
00054     dbSYMADDRESS        modPoint;
00055     
00056     // Full table of instruments.
00057     // Loaded from the database every time LoadTable() is called
00058     mswINS_DATA_RECORD  insTable[mswNO_OF_INSTRUMENTS]; 
00059 
00060   private:
00061     // These members are used to store the values retrieved by
00062     // InsId() and InsData() methods.
00063     // They can change at the next call of the methods, so the user
00064     // must copy them upon return.
00065     mswINSID            currentIns;  // The current selected instrument
00066     mswINS_DATA_RECORD  lastRecord;  // The last queried record
00067 };
00068 
00069 
00070 // include inline code for support classes
00071 #include "mswINS_CONFIG_DATA.icc"
00072 
00073 #endif 

Generated on Wed Dec 3 14:52:15 2003 for ATCS API by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001