WIL説明書(C++)  3.0.0
FvList.h
[詳解]
1 // $Revision: 1.1 $
2 /*
3  @file FvList.h
4  @brief CFvList template class
5  @author FAST Corporation
6 */
7 
8 #ifndef _FVLIST_H_INCLUDED_
9 #define _FVLIST_H_INCLUDED_
10 
11 #include "FvMacros.h"
12 #include "FvDefs.h"
13 #include "FvDebug.h"
14 #include "FvErrors.h"
15 #include "FvObject.h"
16 
17 #include "FvMultiData.h"
18 #include "FvListAllocator.h"
19 
20 #pragma pack(push,_FVCL_PACKING)
21 
22 namespace FVCL
23 {
24 
25 // /////////////////////////////////////////////////////////////////
26 // DEFINE
27 //
28 
29 // /////////////////////////////////////////////////////////////////
30 // TYPEDEF
31 //
32 
33 // /////////////////////////////////////////////////////////////////
34 // CLASS
35 template<class TYPE> class CFvList : public CFvMultiData<TYPE>
36 {
37 public:
38  // DEFINE/TYPEDEF
39  typedef TYPE* pointer;
40  typedef const TYPE* const_pointer;
41  typedef TYPE& reference;
42  typedef const TYPE& const_reference;
43  typedef UINT size_type;
44 
45 public:
46  enum { DataID = 20 };
47  enum
48  {
51  };
52 
53 public:
54  // ===================================================================
55  CFvList() : CFvMultiData<TYPE>()
56  {
57  size_type uiInitial = DefaultInitial;
58  size_type uiIncrease = DefaultIncrease;
59  this->m_alloc = static_cast<CFvAllocator<TYPE>*>(new CFvListAllocator<TYPE>( uiInitial, uiIncrease ));
60  if( this->m_alloc == NULL )
62  }
63 
64  // ===================================================================
65  CFvList( size_type uiInitial ) : CFvMultiData<TYPE>()
66  {
67  size_type uiIncrease = DefaultIncrease;
68  this->m_alloc = static_cast<CFvAllocator<TYPE>*>(new CFvListAllocator<TYPE>( uiInitial, uiIncrease ));
69  if( this->m_alloc == NULL )
71  }
72 
73  // ===================================================================
74  CFvList( size_type uiInitial, size_type uiIncrease ) : CFvMultiData<TYPE>()
75  {
76  this->m_alloc = static_cast<CFvAllocator<TYPE>*>(new CFvListAllocator<TYPE>( uiInitial, uiIncrease ));
77  if( this->m_alloc == NULL )
79  }
80 
81  // ===================================================================
82  CFvList( const CFvList<TYPE>& object ) : CFvMultiData<TYPE>()
83  {
84  size_type uiInitial = object.m_alloc->GetCapacity();
85  size_type uiIncrease = object.m_alloc->GetIncrease();
86 
87  this->m_alloc = static_cast<CFvAllocator<TYPE>*>(new CFvListAllocator<TYPE>( uiInitial, uiIncrease ));
88  if( this->m_alloc == NULL )
91  }
92 
93  // ===================================================================
94  virtual ~CFvList()
95  {
96  if( this->m_alloc != NULL )
97  delete this->m_alloc;
98  }
99 
100  // ===================================================================
101  virtual INT GetDataID() const
102  {
103  return CFvList<TYPE>::DataID;
104  }
105 
106  // ===================================================================
107  virtual bool GetPointer( INT id, void** val ) const
108  {
109  if( CFvList<TYPE>::GetDataID() != id )
110  return false;
111  *val = (void*)this;
112  return true;
113  }
114 
115 public:
116  // ===================================================================
117  virtual CFvList<TYPE>& operator = ( const CFvList<TYPE>& ope )
118  {
120  return *this;
121  }
122 
123 protected:
124  // OBJECT
125 };
126 
127 } // FVCL
128 
129 #pragma pack(pop)
130 
131 #endif // _FVLIST_H_INCLUDED_
virtual CFvList< TYPE > & operator=(const CFvList< TYPE > &ope)
代入オペレータ (=)
Definition: FvList.h:117
virtual bool GetPointer(INT id, void **val) const
インスタンスのthisポインタの取得
Definition: FvList.h:107
virtual ~CFvList()
デストラクタ
Definition: FvList.h:94
配列確保テンプレートクラスの基本クラス
Definition: FvAllocator.h:34
FVCLのネームスペース
Definition: EVCbasicDeclare.txt:9
領域確保不可例外クラス
Definition: FveBadAllocException.h:18
virtual INT GetDataID() const
データIDの取得
Definition: FvList.h:101
CFvList()
コンストラクタ
Definition: FvList.h:55
const INT FAILED_TO_ALLOCATE
メモリの確保に失敗しました。
Definition: FvErrors.h:15
int INT
整数型(32ビット)
Definition: FvDefs.h:36
配列テンプレートクラス(単方向リスト)
Definition: FvList.h:35
配列テンプレートクラスの基本クラス
マクロ定義
領域の増分(要素数)
Definition: FvList.h:50
配列テンプレートクラス(単方向リスト)のデータID
Definition: FvList.h:46
CFvAllocator< TYPE > * m_alloc
アロケータクラスのオブジェクトへのポインタ
Definition: FvMultiData.h:291
エラーコード定義
配列確保テンプレートクラス(単方向リスト)
Definition: FvListAllocator.h:34
配列確保テンプレートクラス(単方向リスト)
CFvList(size_type uiInitial, size_type uiIncrease)
初期値指定コンストラクタ
Definition: FvList.h:74
unsigned int UINT
整数型(32ビット)[符号なし]
Definition: FvDefs.h:37
配列テンプレートクラスの基本クラス
Definition: FvMultiData.h:36
CFvObject クラスのインターフェース
領域の初期容量(要素数)
Definition: FvList.h:49
virtual CFvMultiData< TYPE > & operator=(const CFvMultiData< TYPE > &ope)
代入オペレータ(=)
Definition: FvMultiData.h:269
CFvList(size_type uiInitial)
初期値指定コンストラクタ
Definition: FvList.h:65
変数型と定数の定義
デバッグ用関数のインターフェース
CFvList(const CFvList< TYPE > &object)
コピーコンストラクタ
Definition: FvList.h:82

Documentation copyright © 2007 FAST Corporation. [B-001864]
Generated on 2023年11月02日(木) 10時12分53秒 for WIL説明書(C++) by doxygen 1.8.11