メインページ | ネームスペース一覧 | クラス階層 | 構成 | Directories | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ | 関連ページ

DVVirtualDevicePool.h

00001 #ifndef VR_DVDEVICES_H
00002 #define VR_DVDEVICES_H
00003 #include <Device/DVVirtualDevice.h>
00004 #include <vector>
00005 
00006 namespace Spr {
00007 
00008 //----------------------------------------------------------------------------
00009 //  DVVirtualDevices
00010 
00011 /** 仮想デバイスのプール. ISAカードやPCカードなどのデバイスは,
00012     機能(D/A,カウンタなど)別に分けられ,仮想デバイスとしてこの
00013     プールに登録される.
00014     登録されたデバイスは,SPIDARなどのシステムに利用される.    */
00015 
00016 class SPR_DLL DVVirtualDevicePool: std::vector< UTRef<DVVirtualDevice> >{
00017 public:
00018     /// Rent device.
00019 #ifdef __BORLANDC__
00020     template <class CT> bool Rent(CT*& t);
00021 #else
00022     template <class CT> bool Rent(CT*& t){
00023         CT* pt = (CT*)Rent(CT::TypeS());
00024         t = pt;
00025         return t != NULL;
00026     }
00027 #endif
00028     /// Rent device.
00029     DVVirtualDevice* Rent(const char* type, const char* name=NULL);
00030     /// return device.
00031     bool Return(DVVirtualDevice* dev);
00032     /// Register virutal device.
00033     void Register(DVVirtualDevice* dev){ push_back(dev); }
00034     /// ダンプ出力
00035     void Print(std::ostream& o) const;
00036     ///
00037     void Clear(){ clear(); }
00038 };
00039 #ifdef __BORLANDC__
00040 template <class CT> bool DVVirtualDevicePool::Rent(CT*& t){
00041         CT* pt = (CT*)Rent(CT::TypeS());
00042         t = pt;
00043         return t != NULL;
00044 }
00045 #endif
00046 inline std::ostream& operator << (std::ostream& o, const DVVirtualDevicePool& d){
00047     d.Print(o);
00048     return o;
00049 }
00050 
00051 }   //  namespace Spr
00052 
00053 #endif

Springheadに対してSun Apr 16 01:57:50 2006に生成されました。  doxygen 1.4.1