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

GraphicsAdapterInformation.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_ADAPTER_INFORMATION_H_
00026 #define GRAPHICS_ADAPTER_INFORMATION_H_
00027 
00028 #include <Core/Container/ArrayList.h>
00029 
00030 namespace Lamp{
00031 
00032 class GraphicsDeviceInformation;
00033 
00034 //------------------------------------------------------------------------------
00035 /**
00036  * グラフィックスアダプタ情報
00037  */
00038 class GraphicsAdapterInformation{
00039 friend class GraphicsDeviceEnumeration;
00040 public:
00041     //--------------------------------------------------------------------------
00042     /**
00043      * アダプタ番号の取得
00044      * @return アダプタ番号
00045      */
00046     virtual int getAdapterOrdinal(){ return adapterOrdinal_; }
00047 
00048     //--------------------------------------------------------------------------
00049     /**
00050      * アダプタ識別子の取得
00051      * @return アダプタ識別子
00052      */
00053     virtual const D3DAdapterIdentifier& getAdapterIdentifier(){
00054         return identifier_;
00055     }
00056 
00057     //--------------------------------------------------------------------------
00058     /**
00059      * 名前の取得
00060      * @return 名前
00061      */
00062     virtual const String& getName() const{ return name_; }
00063 
00064     //--------------------------------------------------------------------------
00065     /**
00066      * ドライバ名の取得
00067      * @return ドライバ名
00068      */
00069     virtual const String& getDriverName() const{ return driverName_; }
00070 
00071     //--------------------------------------------------------------------------
00072     /**
00073      * ディスプレイモード数の取得
00074      * @return ディスプレイモード数
00075      */
00076     virtual int getDisplayModeCount() const{ return displayModes_.getCount(); }
00077 
00078     /**
00079      * ディスプレイモードの取得
00080      * @param index インデックス
00081      * @return ディスプレイモード
00082      */
00083     virtual D3DDISPLAYMODE getDisplayMode(int index){
00084         return displayModes_.get(index);
00085     }
00086 
00087     //--------------------------------------------------------------------------
00088     /**
00089      * アダプタフォーマット数の取得
00090      * @return アダプタフォーマット数
00091      */
00092     virtual int getAdapterFormatCount() const{
00093         return adapterFormats_.getCount();
00094     }
00095 
00096     /**
00097      * アダプタフォーマットの取得
00098      * @param index インデックス
00099      * @return アダプタフォーマット
00100      */
00101     virtual D3DFORMAT getAdapterFormat(int index){
00102         return adapterFormats_.get(index);
00103     }
00104 
00105     //--------------------------------------------------------------------------
00106     /**
00107      * デバイス数の取得
00108      * @return デバイス数
00109      */
00110     virtual int getDeviceCount() const{ return devices_.getCount(); }
00111 
00112     /**
00113      * デバイスの取得
00114      * @param index インデックス
00115      * @return デバイス
00116      */
00117     virtual GraphicsDeviceInformation* getDevice(int index){
00118         return devices_.get(index);
00119     }
00120 
00121     //--------------------------------------------------------------------------
00122     /**
00123      * 文字列への変換
00124      * @return GraphicsAdapterInformationの文字列表記
00125      */
00126     virtual String toString();
00127 
00128 protected:
00129     /**
00130      * コンストラクタ
00131      * @param adapterOrdinal 番号
00132      */
00133     GraphicsAdapterInformation(int adapterOrdinal);
00134 
00135     /**
00136      * デストラクタ
00137      */
00138     virtual ~GraphicsAdapterInformation();
00139 
00140     /**
00141      * 列挙
00142      * @param enumeration グラフィックスデバイス列挙
00143      */
00144     virtual void enumerate(GraphicsDeviceEnumeration* enumeration);
00145 
00146     //--------------------------------------------------------------------------
00147 private:
00148     // アダプタ番号
00149     int adapterOrdinal_;
00150     // アダプタ識別子
00151     D3DAdapterIdentifier identifier_;
00152     // アダプタ名
00153     String name_;
00154     // ドライバ名
00155     String driverName_;
00156     // アダプタフォーマット
00157     ArrayList<D3DFORMAT> adapterFormats_;
00158     // ディスプレイモード
00159     ArrayList<D3DDISPLAYMODE> displayModes_;
00160     // デバイス
00161     ArrayList<GraphicsDeviceInformation*> devices_;
00162 
00163     // コピーコンストラクタの隠蔽
00164     GraphicsAdapterInformation(const GraphicsAdapterInformation& copy);
00165 
00166     // 代入コピーの隠蔽
00167     void operator =(const GraphicsAdapterInformation& copy);
00168 
00169 };
00170 
00171 //------------------------------------------------------------------------------
00172 } // End of namespace Lamp
00173 #endif // End of GRAPHICS_ADAPTER_INFORMATION_H_
00174 //------------------------------------------------------------------------------

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