CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
common_ListNode.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 
18 
19 namespace nn
20 {
21 namespace pia
22 {
23 namespace common
24 {
25 
26 class ListBase;
27 
28 /*!
29  @cond PRIVATE
30  @brief リストのノードとなるクラスです。
31  */
32 class ListNode : public nn::pia::common::RootObject
33 {
34  friend class ListBase;
35 
36 public:
37  /*!
38  @brief デフォルトコンストラクタです。
39  */
40  ListNode()
41  {
42  InitListNode();
43  }
44 
45 
46  /*!
47  private:
48  @brief 次の要素を取得します。
49  @return 次の要素。
50  */
51  ListNode* Prev() const
52  {
53  return m_pPrev;
54  }
55 
56 
57  /*!
58  private:
59  @brief 前の要素を取得します。
60  @return 前の要素。
61  */
62  ListNode* Next() const
63  {
64  return m_pNext;
65  }
66 
67 
68  bool IsFreeListNode() const
69  {
70  return (m_pPrev == NULL) || (m_pNext == NULL);
71  }
72 
73 private:
74  void InitListNode()
75  {
76  m_pPrev = NULL;
77  m_pNext = NULL;
78  }
79 
80  ListNode* m_pPrev;
81  ListNode* m_pNext;
82 };
83 //! @endcond
84 }
85 }
86 } // end of namespace nn::pia::common