原文は[こちら|http://www.wxwidgets.org/manuals/2.6.3/wx_wxdbcoldef.html]をご覧下さい。 !!! wxDbColDef このクラスは、wxDbTableオブジェクトのインスタンスにバインドされたカラムに関する情報を保持するために使用される。 "" This class is used to hold information about the columns bound to an instance of a wxDbTable object. このクラスの各インスタンスは、wxDbTableオブジェクトの1つのカラムを表現している。wxDbコンストラクタを呼ぶ際、渡された引数はwxDbTableオブジェクトに対して定義されるカラム数を意味する。コンストラクタは、wxDbTableオブジェクトの全てのカラム記述に必要な適切なメモリを確保するためにその情報を使用する。プライベートメンバwxDbTable::colDefsは、wxDbTableクラスによって管理されるメモリブロックへのポインタである(そして、wxDbTable::GetColDefs関数を使用して取得できる)。自身のwxDbTableオブジェクトのN番目のカラム定義にアクセスするには、wxDbColDefsの[n - 1]番目の要素を参照すればよい。 "" Each instance of this class describes one column in the wxDbTable object. When calling the wxDb constructor, a parameter passed in indicates the number of columns that will be defined for the wxDbTable object. The constructor uses this information to allocate adequate memory for all of the column descriptions in your wxDbTable object. Private member wxDbTable::colDefs is a pointer to this chunk of memory maintained by the wxDbTable class (and can be retrieved using the wxDbTable::GetColDefs function). To access the nth column definition of your wxDbTable object, just reference wxDbColDefs element [n - 1]. 一般的にwxDbTable::SetColDefsは、wxDbTableインスタンスのこれら構造体配列を設定するために使用される。 "" Typically, wxDbTable::SetColDefs is used to populate an array of these data structures for the wxDbTable instance. 現在のところ、このクラスにはアクセス関数がない。このため、全てのメンバはパブリックである。 "" Currently there are no accessor functions for this class, so all members are public. wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; // カラム名 int DbDataType; - 論理的なデータ種別 例:DB_DATA_TYPE_INTEGER SWORD SqlCtype; - Cデータ種別;例:SQL_C_LONG void *PtrDataObj; - データオブジェクトのアドレス int SzDataObj; - データオブジェクトのバイトサイズ bool KeyField; - テーブルに対するプライマリキーのカラム部分か? 日付フィールドはKeyFieldになりえない。 bool Updateable; - カラムは更新可能か? bool InsertAllowed; - カラムはINSERT文に含まれるか? bool DerivedCol; - カラムは派生した値か? SDWORD CbValue; - !!!内部使用のみ!!! bool Null; - 完全に実装されていない 挿入と更新時には、NULL値だけが認められる。 "" wxChar ColName[DB_MAX_COLUMN_NAME_LEN+1]; // Column Name "" int DbDataType; - Logical Data Type; "" e.g. DB_DATA_TYPE_INTEGER "" SWORD SqlCtype; - C data type; e.g. SQL_C_LONG "" void *PtrDataObj; - Address of the data object "" int SzDataObj; - Size, in bytes, of the data object "" bool KeyField; - Is column part of the PRIMARY KEY for the "" table? -- Date fields should NOT be "" KeyFields "" bool Updateable; - Column is updateable? "" bool InsertAllowed; - Column included in INSERT statements? "" bool DerivedCol; - Column is a derived value? "" SDWORD CbValue; - !!!Internal use only!!! "" bool Null; - NOT FULLY IMPLEMENTED "" Allows NULL values in Inserts and Updates <<参考>> データベース概要, wxDbTable::GetColDefs, wxDbコンストラクタ <<インクルードファイル>> <<メンバ>> wxDbColDef::Initialize !! wxDbColDef::Initialize 単に全ての変数をクリア状態に初期化する。コンストラクタにより、自動的に呼ばれる。 "" Simply initializes all member variables to a cleared state. Called by the constructor automatically.