StandardTraits.h
Go to the documentation of this file.
1 // -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
2 
3 /******************************************************************************
4  *
5  * file: StandardTraits.h
6  *
7  * Copyright (c) 2007, Daniel Aarno, Michael E. Smoot .
8  * All rights reverved.
9  *
10  * See the file COPYING in the top directory of this distribution for
11  * more information.
12  *
13  * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS
14  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19  * DEALINGS IN THE SOFTWARE.
20  *
21  *****************************************************************************/
22 
23 // This is an internal tclap file, you should probably not have to
24 // include this directly
25 
26 #ifndef TCLAP_STANDARD_TRAITS_H
27 #define TCLAP_STANDARD_TRAITS_H
28 
29 #ifdef HAVE_CONFIG_H
30 #include <config.h> // To check for long long
31 #endif
32 
33 // If Microsoft has already typedef'd wchar_t as an unsigned
34 // short, then compiles will break because it's as if we're
35 // creating ArgTraits twice for unsigned short. Thus...
36 #ifdef _MSC_VER
37 #ifndef _NATIVE_WCHAR_T_DEFINED
38 #define TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS
39 #endif
40 #endif
41 
42 namespace TCLAP {
43 
44 // ======================================================================
45 // Integer types
46 // ======================================================================
47 
51 template<>
52 struct ArgTraits<long> {
54 };
55 
59 template<>
60 struct ArgTraits<int> {
62 };
63 
67 template<>
68 struct ArgTraits<short> {
70 };
71 
75 template<>
76 struct ArgTraits<char> {
78 };
79 
80 #ifdef HAVE_LONG_LONG
81 
84 template<>
85 struct ArgTraits<long long> {
86  typedef ValueLike ValueCategory;
87 };
88 #endif
89 
90 // ======================================================================
91 // Unsigned integer types
92 // ======================================================================
93 
97 template<>
98 struct ArgTraits<unsigned long> {
100 };
101 
105 template<>
106 struct ArgTraits<unsigned int> {
108 };
109 
113 template<>
114 struct ArgTraits<unsigned short> {
116 };
117 
121 template<>
122 struct ArgTraits<unsigned char> {
124 };
125 
126 // Microsoft implements size_t awkwardly.
127 #if defined(_MSC_VER) && defined(_M_X64)
128 
131 template<>
132 struct ArgTraits<size_t> {
133  typedef ValueLike ValueCategory;
134 };
135 #endif
136 
137 
138 #ifdef HAVE_LONG_LONG
139 
142 template<>
143 struct ArgTraits<unsigned long long> {
144  typedef ValueLike ValueCategory;
145 };
146 #endif
147 
148 // ======================================================================
149 // Float types
150 // ======================================================================
151 
155 template<>
156 struct ArgTraits<float> {
158 };
159 
163 template<>
164 struct ArgTraits<double> {
166 };
167 
168 // ======================================================================
169 // Other types
170 // ======================================================================
171 
175 template<>
176 struct ArgTraits<bool> {
178 };
179 
180 
184 #ifndef TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS
185 template<>
186 struct ArgTraits<wchar_t> {
188 };
189 #endif
190 
194 template<>
195 struct ArgTraits<std::string> {
197 };
198 
199 template<typename T>
200 void SetString(T &dst, const std::string &src)
201 {
202  dst = src;
203 }
204 
205 } // namespace
206 
207 #endif
208 
void SetString(T &dst, const std::string &src)
GLenum GLenum dst
Definition: glext.h:1751
GLsizei const GLchar *const * string
GLenum src
Definition: glext.h:1751
T::ValueCategory ValueCategory
Definition: ArgTraits.h:80
Definition: Arg.h:57


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:10