CTR Pia  4.11.3
Game Communication Engine
session_CreateSessionSetting.h
1 /*---------------------------------------------------------------------------*
2  Project: Pia
3  File: session_CreateSessionSetting.h
4 
5  Copyright Nintendo. All rights reserved.
6 
7  These coded instructions, statements, and computer programs contain
8  proprietary information of Nintendo of America Inc. and/or Nintendo
9  Company Ltd., and are protected by Federal copyright law. They may
10  not be disclosed to third parties or copied or duplicated in any form,
11  in whole or in part, without the prior written consent of Nintendo.
12  *---------------------------------------------------------------------------*/
13 
14 
15 #pragma once
16 
17 #include <pia/session/session_definitions.h>
18 
19 #include <pia/session/session_types.h>
20 
21 namespace nn
22 {
23 namespace pia
24 {
25 namespace session
26 {
27 /*!
28 @brief Base class that manages settings specific to session creation.
29 
30 @details This class is never instantiated by an application. Use a class that inherits this class.
31 
32 @date 2014-02-27 Initial version.
33 @if CTR_DOC
34 @see nn::pia::local::UdsCreateSessionSetting
35 @endif
36 @see nn::pia::inet::NexCreateSessionSetting
37 */
39 {
40 public:
41 
42 /*!
43 @cond PRIVATE
44 @brief Destroys the object.
45 */
46  virtual ~CreateSessionSetting() {};
47  //! @endcond
48 
49 /*!
50 @brief Sets the minimum number of participants for the session to create.
51 @param[in] min The minimum number of participants specified for the session to create.
52 */
53  void SetMinParticipants(u16 min)
54  {
55  m_MinParticipants = min;
56  }
57 /*!
58 @brief Gets the specified minimum number of participants.
59 @return Returns the specified minimum number of participants.
60 */
61  u16 GetMinParticipants() const
62  {
63  return m_MinParticipants;
64  }
65 
66 /*!
67 @brief Sets the maximum number of participants for the session to create.
68 @param[in] max The maximum number of participants specified for the session to create.
69 */
70  void SetMaxParticipants(u16 max)
71  {
72  m_MaxParticipants = max;
73  }
74 /*!
75 @brief Gets the specified maximum number of participants.
76 @return Returns the specified maximum number of participants.
77 */
78  u16 GetMaxParticipants() const
79  {
80  return m_MaxParticipants;
81  }
82 
83  // Prints information that is useful for debugging.
84  void Trace(u64 flag) const;
85 
86 protected:
87  u16 m_MinParticipants;
88  u16 m_MaxParticipants;
89 
90  // Instantiates an object.
92  m_MinParticipants(0),
93  m_MaxParticipants(0)
94  {
95  }
96 
97 private:
98  // The copy constructor is sealed.
100 
101  // The assignment operator is sealed.
102  CreateSessionSetting& operator=(const CreateSessionSetting&);
103 };
104 }
105 }
106 } // end of namespace nn::pia::session
u16 GetMinParticipants() const
Gets the specified minimum number of participants.
Definition: session_CreateSessionSetting.h:61
u16 GetMaxParticipants() const
Gets the specified maximum number of participants.
Definition: session_CreateSessionSetting.h:78
Definition: assert.h:115
Base class that manages settings specific to session creation.
Definition: session_CreateSessionSetting.h:38
void SetMaxParticipants(u16 max)
Sets the maximum number of participants for the session to create.
Definition: session_CreateSessionSetting.h:70
This is the common base class used inside the Pia library.
Definition: common_RootObject.h:40
void SetMinParticipants(u16 min)
Sets the minimum number of participants for the session to create.
Definition: session_CreateSessionSetting.h:53