00001 #ifndef _PPort_hpp_
00002 #define _PPort_hpp_
00003
00004 #include <map>
00005
00006 class port_t;
00007
00010 class PPort {
00011 PPort();
00012 PPort(int ioPort);
00016 bool setPort(int ioPort);
00017
00018 public:
00021 static PPort * getPPort(int ioPort);
00022
00030 bool setBit(const void * ID,int bit,bool stat);
00037 bool registerBit(const void * ID,int bit);
00044 bool unregisterBit(const void * ID,int bit);
00045
00052 bool isRegisterBit(const void * ID,int bit) const;
00053
00056 bool commit();
00057 private:
00058 void reset();
00059 unsigned char bitArray;
00060 const void * assignedBit[8];
00061 port_t * currentPort;
00062 static std::map<int,PPort *> allocatedPort_;
00063 };
00064 #endif