Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

GraphicsDeviceInformation.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // Lamp : Open source game middleware
00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //------------------------------------------------------------------------------
00019 
00020 /** @file
00021  * グラフィックスデバイス情報ヘッダ
00022  * @author Junpee
00023  */
00024 
00025 #ifndef GRAPHICS_DEVICE_INFORMATION_H_
00026 #define GRAPHICS_DEVICE_INFORMATION_H_
00027 
00028 #include <Core/Container/ArrayList.h>
00029 
00030 namespace Lamp{
00031 
00032 class GraphicsDeviceEnumeration;
00033 class GraphicsAdapterInformation;
00034 class GraphicsDeviceComboInformation;
00035 
00036 //------------------------------------------------------------------------------
00037 /**
00038  * グラフィックスデバイス情報
00039  */
00040 class GraphicsDeviceInformation{
00041 friend class GraphicsAdapterInformation;
00042 public:
00043     //--------------------------------------------------------------------------
00044     /**
00045      * アダプタ番号の取得
00046      * @return アダプタ番号
00047      */
00048     virtual int getAdapterOrdinal(){ return adapterOrdinal_; }
00049 
00050     /**
00051      * デバイスタイプの取得
00052      * @return デバイスタイプ
00053      */
00054     virtual D3DDEVTYPE getDeviceType(){ return deviceType_; }
00055 
00056     //--------------------------------------------------------------------------
00057     /**
00058      * デバイス能力の取得
00059      * @return デバイス能力
00060      */
00061     virtual const D3DCapacity& getDeviceCapability(){
00062         return deviceCapability_;
00063     }
00064 
00065     //--------------------------------------------------------------------------
00066     /**
00067      * デバイスコンボ数の取得
00068      * @return デバイスコンボ数
00069      */
00070     virtual int getDeviceComboCount() const{ return deviceCombos_.getCount(); }
00071 
00072     /**
00073      * デバイスコンボの取得
00074      * @param index インデックス
00075      * @return デバイスコンボ
00076      */
00077     virtual GraphicsDeviceComboInformation* getDeviceCombo(int index){
00078         return deviceCombos_.get(index);
00079     }
00080 
00081     //--------------------------------------------------------------------------
00082     /**
00083      * 文字列への変換
00084      * @return GraphicsDeviceInformationの文字列表記
00085      */
00086     virtual String toString();
00087 
00088     //--------------------------------------------------------------------------
00089 protected:
00090     /**
00091      * コンストラクタ
00092      */
00093     GraphicsDeviceInformation();
00094 
00095     /**
00096      * デストラクタ
00097      */
00098     virtual ~GraphicsDeviceInformation();
00099 
00100     /**
00101      * 列挙
00102      * @param enumeration グラフィックスデバイス列挙
00103      * @param adapterInformation グラフィックスアダプタ情報
00104      * @param deviceType デバイスタイプ
00105      * @return 列挙が成功すればtrue
00106      */
00107     virtual bool enumerate(GraphicsDeviceEnumeration* enumeration,
00108         GraphicsAdapterInformation* adapterInformation, D3DDEVTYPE deviceType);
00109 
00110 private:
00111     // コピーコンストラクタの隠蔽
00112     GraphicsDeviceInformation(const GraphicsDeviceInformation& copy);
00113 
00114     // 代入コピーの隠蔽
00115     void operator =(const GraphicsDeviceInformation& copy);
00116 
00117     // アダプタ番号
00118     int adapterOrdinal_;
00119     // デバイスタイプ
00120     D3DDEVTYPE deviceType_;
00121     // デバイス能力
00122     D3DCapacity deviceCapability_;
00123     // デバイスコンボ
00124     ArrayList<GraphicsDeviceComboInformation*> deviceCombos_;
00125 };
00126 
00127 //------------------------------------------------------------------------------
00128 } // End of namespace Lamp
00129 #endif // End of GRAPHICS_DEVICE_INFORMATION_H_
00130 //------------------------------------------------------------------------------

Generated on Wed Mar 16 10:29:31 2005 for Lamp by doxygen 1.3.2