Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

Device.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////////////////////////////
00002 /*! \file Device.h
00003 *  \brief The Device class is used for setting the Active state of a device.
00004 *  \author $Author: cakinli $
00005 *  \version $Revision: 1.4 $
00006 *  \date    $Date: 2005/02/25 18:40:52 $
00007 *//////////////////////////////////////////////////////////////////////////////////////////////////
00008 /*! 
00009 */
00010 //////////////////////////////////////////////////////////////////////////////////////////////////
00011 
00012 
00013 // Device() - Default Constructor
00014 // Device(Device& _rdevDevice) - Copy Constructor
00015 // ~Device() - Default Destructor
00016 // IsActive() - Returns the current value of m_bActiveState
00017 // Initialize() - Sets the value of m_bActiveState to true by calling SetActive(bool)
00018 // Deinitialize() - Sets the value of m_bActiveState to false by calling SetActive(bool)
00019 // SetActive(bool _bActiveState) - Sets the value of m_bActiveState to _bActiveState
00020 
00021 #ifndef __SSSL_DEVICE_H__
00022 #define __SSSL_DEVICE_H__
00023 
00024 #include <Utils/CfgParse.h>
00025 #include <Utils/Error.h>
00026 #include <matrix/Matrix.h>
00027 #include <string>
00028 using namespace std;
00029 
00030 using namespace O_SESSAME;
00031 
00032 class Device  
00033 {
00034 public:
00035         // Constructor/Deconstructor
00036         Device(Device& _rdevDevice);
00037         virtual ~Device();
00038 
00039         // Inspectors
00040         bool IsActive();
00041         Vector GetLocation() const;
00042         
00043         // Mutators
00044         void SetLocation(const Vector& newDeviceLocation);
00045         //virtual int Initialize(const string& _sInitString) = 0;
00046         
00047         /** a constant bool that is equal to false. Used for setting the active state. */
00048         static const bool c_bNotActive = false;
00049         /** a constant bool that is equal to true. Used for setting the active state */
00050         static const bool c_bActive = true;
00051    
00052 protected:
00053         Device();
00054         virtual int Initialize();
00055         virtual int Deinitialize();
00056         char *name;
00057 
00058 private:
00059         // Facilitators
00060         int SetActive(bool _bActiveState);
00061         // Data Members
00062         /** the current state of the device as to whether or not it's been initialized. */
00063         bool m_bActiveState;
00064         /** physical location of the device with respect to the whorl body coordinates */
00065         Vector m_Location;
00066 };
00067 
00068 #endif 
00069 
00070 // Do not change the comments below - they will be added automatically by CVS
00071 /*****************************************************************************
00072 *       $Log: Device.h,v $
00073 *       Revision 1.4  2005/02/25 18:40:52  cakinli
00074 *       Created Makefiles and organized include directives to reduce the number of
00075 *       include paths.  Reorganized libraries so that there is now one per source
00076 *       directory.  Each directory is self-contained in terms of its Makefile.
00077 *       The local Makefile in each directory includes src/config.mk, which has all
00078 *       the definitions and general and pattern rules.  So at most, to see what
00079 *       goes into building a target, a person needs to examine the Makefile in
00080 *       that directory, and ../config.mk.
00081 *       
00082 *       Revision 1.3  2003/08/13 23:13:41  mavandyk
00083 *       Commented out a pure virtual function to allow code to compile properly.
00084 *       
00085 *       Revision 1.2  2003/07/21 20:16:52  bstreetman
00086 *       updates
00087 *       
00088 *       Revision 1.1  2003/07/04 14:08:05  simpliciter
00089 *       Rearranged directory tree.
00090 *       
00091 *       Revision 1.2  2003/06/30 15:51:57  nicmcp
00092 *       made some changes to the controller files
00093 *       
00094 *       Revision 1.1.1.1  2003/06/06 18:44:15  simpliciter
00095 *       Initial submission.
00096 *       
00097 *       Revision 1.1.1.1  2003/06/06 14:44:15  simpliciter
00098 *       Initial import.
00099 *       
00100 *
00101 ******************************************************************************/
00102 

Generated on Wed Sep 5 12:54:19 2007 for DSACSS Operational Code by  doxygen 1.3.9.1