CTR-Pia  5.4.3
Game Communication Engine
 全て クラス ネームスペース 関数 変数 型定義 列挙型 列挙型の値 ページ
common_EmptyStream.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 /*!
27 @cond PRIVATE
28  @brief StringStreamと同等のインタフェースを持ったクラスです。ただし実質的な動作は何もしません。Warning封じが目的です。
29  */
30 class EmptyStream
31 {
32 public:
33  EmptyStream(void)
34  {
35  }
36  EmptyStream(uint64_t)
37  {
38  } // フラグを受け取るだけのダミー的コンストラクタ
39  ~EmptyStream(void)
40  {
41  }
42 
43  uint32_t GetLength() const
44  {
45  return 0;
46  }
47  uint32_t GetSize() const
48  {
49  return 0;
50  }
51  const char* CStr() const
52  {
53  return NULL;
54  }
55 
56  EmptyStream& operator<<(const char*)
57  {
58  return *this;
59  }
60  EmptyStream& operator<<(const void*)
61  {
62  return *this;
63  }
64  EmptyStream& operator<<(bool)
65  {
66  return *this;
67  }
68  EmptyStream& operator<<(double)
69  {
70  return *this;
71  }
72  EmptyStream& operator<<(float)
73  {
74  return *this;
75  }
76 
77  EmptyStream& operator<<(uint8_t)
78  {
79  return *this;
80  }
81  EmptyStream& operator<<(int8_t)
82  {
83  return *this;
84  }
85  EmptyStream& operator<<(uint16_t)
86  {
87  return *this;
88  }
89  EmptyStream& operator<<(int16_t)
90  {
91  return *this;
92  }
93  EmptyStream& operator<<(uint32_t)
94  {
95  return *this;
96  }
97  EmptyStream& operator<<(int32_t)
98  {
99  return *this;
100  }
101 
102  EmptyStream& operator<<(uint64_t)
103  {
104  return *this;
105  }
106  EmptyStream& operator<<(int64_t)
107  {
108  return *this;
109  }
110 
111  EmptyStream& operator<<(const EmptyStream&)
112  {
113  return *this;
114  }
115 
116  // Manipulators
117  EmptyStream& operator<<(EmptyStream& (*)(EmptyStream&))
118  {
119  return *this;
120  }
121 
122  EmptyStream& Manip_hex()
123  {
124  return *this;
125  }
126  EmptyStream& Manip_dec()
127  {
128  return *this;
129  }
130  EmptyStream& Manip_zerohex()
131  {
132  return *this;
133  }
134 
135 
136  EmptyStream& Manip_showbase()
137  {
138  return *this;
139  }
140  EmptyStream& Manip_noshowbase()
141  {
142  return *this;
143  }
144  EmptyStream& Manip_boolalpha()
145  {
146  return *this;
147  }
148  EmptyStream& Manip_noboolalpha()
149  {
150  return *this;
151  }
152 
153  const char& operator[](uint32_t) const; // not implemented.
154 
155 private:
156  EmptyStream(const EmptyStream&);
157  EmptyStream& operator=(const EmptyStream&);
158 };
159 
160 
161 inline EmptyStream& hex(EmptyStream& s)
162 {
163  return s;
164 }
165 inline EmptyStream& dec(EmptyStream& s)
166 {
167  return s;
168 }
169 inline EmptyStream& endl(EmptyStream& s)
170 {
171  return s;
172 }
173 inline EmptyStream& showbase(EmptyStream& s)
174 {
175  return s;
176 }
177 inline EmptyStream& noshowbase(EmptyStream& s)
178 {
179  return s;
180 }
181 inline EmptyStream& boolalpha(EmptyStream& s)
182 {
183  return s;
184 }
185 inline EmptyStream& noboolalpha(EmptyStream& s)
186 {
187  return s;
188 }
189 
190 inline EmptyStream& zerohex(EmptyStream& s)
191 {
192  return s;
193 }
194 
195 //! @endcond
196 }
197 }
198 } // end of namespace nn::pia::common