CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
transport_ProtocolEvent.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/transport/transport_Definitions.h>
17 #include <nn/pia/common/common_StationAddress.h>
18 
19 namespace nn
20 {
21 namespace pia
22 {
23 namespace transport
24 {
25 
26 
27 /*!
28 @cond PRIVATE
29  @brief Protocolのイベントクラスです。
30  */
31 class ProtocolEvent : public nn::pia::common::RootObject
32 {
33 public:
34  /*!
35  @brief イベントの種類です。
36  */
37  enum Type
38  {
39  Type_Connect,
40  Type_Disconnect
41  };
42 
43 
44  /*!
45  @brief コンストラクタです。
46  */
47  ProtocolEvent(Type type, const common::StationAddress& stationAddress)
48  : m_Type(type), m_StationAddress(stationAddress)
49  {
50  }
51 
52 
53  /*!
54  @brief イベントの種類を取得します。
55  */
56  Type GetType() const
57  {
58  return m_Type;
59  }
60 
61 
62  /*!
63  @brief StationAddress を取得します。
64  */
65  const common::StationAddress& GetStationAddress() const
66  {
67  return m_StationAddress;
68  }
69 
70 
71  /*!
72  @brief デバッグに有用な情報をプリントします。
73 
74  @param[in] flag トレースフラグの論理和。詳細は@ref TraceFlag 型を参照してください。
75  */
76  virtual void Trace(uint64_t flag) const;
77 
78 private:
79  Type m_Type;
80  common::StationAddress m_StationAddress;
81 };
82 //! @endcond
83 }
84 }
85 } // end of namespace nn::pia::transport