CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
common_FixedObjList.h
1 /*--------------------------------------------------------------------------------*
2  Copyright (C)Nintendo All rights reserved.
3 
4  These coded instructions, statements, and computer programs contain proprietary
5  information of Nintendo and/or its licensed developers and are protected by
6  national and international copyright laws. They may not be disclosed to third
7  parties or copied or duplicated in any form, in whole or in part, without the
8  prior written consent of Nintendo.
9 
10  The content herein is highly confidential and should be handled accordingly.
11  *--------------------------------------------------------------------------------*/
12 
13 
14 #pragma once
15 
16 #include <nn/pia/common/common_Definitions.h>
17 #include <nn/pia/common/common_ObjList.h>
18 
19 
20 namespace nn
21 {
22 namespace pia
23 {
24 namespace common
25 {
26 
27 
28 /*!
29  @cond PRIVATE
30  @brief バッファを内部に持つタイプのObjListです。
31 
32  @param T 管理するオブジェクトの型。
33  @param N リストに格納できる最大の要素数。
34  */
35 template <typename T, uint32_t N>
36 class FixedObjList : public nn::pia::common::ObjList<T>
37 {
38 public:
39  /**
40  @brief デフォルトコンストラクタです。
41  */
42  FixedObjList()
43  : ObjList<T>()
44  {
45  SetBuffer(N, mBuffer);
46  }
47 
48 private:
49  // SetBufferは外から使えなくする
50  void SetBuffer(uint32_t limitNum, void* pBuffer)
51  {
52  ObjList<T>::SetBuffer(limitNum, pBuffer);
53  }
54 
55 private:
56  uint8_t mBuffer[ObjList<T>::c_NodeSize * N];
57 
58  NN_PIA_DISALLOW_COPY(FixedObjList);
59 };
60 //! @endcond
61 }
62 }
63 } // end of namespace nn::pia::common