<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/> <title>tclap: StandardTraits.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.0 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <h1>StandardTraits.h</h1><a href="StandardTraits_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-</span> <a name="l00002"></a>00002 <a name="l00003"></a>00003 <span class="comment">/******************************************************************************</span> <a name="l00004"></a>00004 <span class="comment"> *</span> <a name="l00005"></a>00005 <span class="comment"> * file: StandardTraits.h</span> <a name="l00006"></a>00006 <span class="comment"> *</span> <a name="l00007"></a>00007 <span class="comment"> * Copyright (c) 2007, Daniel Aarno, Michael E. Smoot .</span> <a name="l00008"></a>00008 <span class="comment"> * All rights reverved.</span> <a name="l00009"></a>00009 <span class="comment"> *</span> <a name="l00010"></a>00010 <span class="comment"> * See the file COPYING in the top directory of this distribution for</span> <a name="l00011"></a>00011 <span class="comment"> * more information.</span> <a name="l00012"></a>00012 <span class="comment"> *</span> <a name="l00013"></a>00013 <span class="comment"> * THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS</span> <a name="l00014"></a>00014 <span class="comment"> * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span> <a name="l00015"></a>00015 <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL</span> <a name="l00016"></a>00016 <span class="comment"> * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span> <a name="l00017"></a>00017 <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING</span> <a name="l00018"></a>00018 <span class="comment"> * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span> <a name="l00019"></a>00019 <span class="comment"> * DEALINGS IN THE SOFTWARE.</span> <a name="l00020"></a>00020 <span class="comment"> *</span> <a name="l00021"></a>00021 <span class="comment"> *****************************************************************************/</span> <a name="l00022"></a>00022 <a name="l00023"></a>00023 <span class="comment">// This is an internal tclap file, you should probably not have to</span> <a name="l00024"></a>00024 <span class="comment">// include this directly</span> <a name="l00025"></a>00025 <a name="l00026"></a>00026 <span class="preprocessor">#ifndef TCLAP_STANDARD_TRAITS_H</span> <a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define TCLAP_STANDARD_TRAITS_H</span> <a name="l00028"></a>00028 <span class="preprocessor"></span> <a name="l00029"></a>00029 <span class="preprocessor">#ifdef HAVE_CONFIG_H</span> <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#include <config.h></span> <span class="comment">// To check for long long</span> <a name="l00031"></a>00031 <span class="preprocessor">#endif</span> <a name="l00032"></a>00032 <span class="preprocessor"></span> <a name="l00033"></a>00033 <span class="comment">// If Microsoft has already typedef'd wchar_t as an unsigned </span> <a name="l00034"></a>00034 <span class="comment">// short, then compiles will break because it's as if we're</span> <a name="l00035"></a>00035 <span class="comment">// creating ArgTraits twice for unsigned short. Thus...</span> <a name="l00036"></a>00036 <span class="preprocessor">#ifdef _MSC_VER</span> <a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#ifndef _NATIVE_WCHAR_T_DEFINED</span> <a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS</span> <a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00041"></a>00041 <span class="preprocessor"></span> <a name="l00042"></a>00042 <span class="keyword">namespace </span>TCLAP { <a name="l00043"></a>00043 <a name="l00044"></a>00044 <span class="comment">// ======================================================================</span> <a name="l00045"></a>00045 <span class="comment">// Integer types</span> <a name="l00046"></a>00046 <span class="comment">// ======================================================================</span> <a name="l00047"></a>00047 <a name="l00051"></a>00051 <span class="keyword">template</span><> <a name="l00052"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01long_01_4.html">00052</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><long> { <a name="l00053"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01long_01_4.html#a942d9a1e813bc3f82b51a2dcedb7316d">00053</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00054"></a>00054 }; <a name="l00055"></a>00055 <a name="l00059"></a>00059 <span class="keyword">template</span><> <a name="l00060"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01int_01_4.html">00060</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><int> { <a name="l00061"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01int_01_4.html#a8e577764b626e9e928d71567123d92a9">00061</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00062"></a>00062 }; <a name="l00063"></a>00063 <a name="l00067"></a>00067 <span class="keyword">template</span><> <a name="l00068"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01short_01_4.html">00068</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><short> { <a name="l00069"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01short_01_4.html#a99f5d76501b120d6455b528aa7bf6896">00069</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00070"></a>00070 }; <a name="l00071"></a>00071 <a name="l00075"></a>00075 <span class="keyword">template</span><> <a name="l00076"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01char_01_4.html">00076</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><char> { <a name="l00077"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01char_01_4.html#a36f7fe1b3b1649ef8ec08ef7d6fc3160">00077</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00078"></a>00078 }; <a name="l00079"></a>00079 <a name="l00080"></a>00080 <span class="preprocessor">#ifdef HAVE_LONG_LONG</span> <a name="l00081"></a>00081 <span class="preprocessor"></span> <a name="l00084"></a>00084 <span class="keyword">template</span><> <a name="l00085"></a>00085 <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><long long> { <a name="l00086"></a>00086 <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ArgTraits.html#a346532973520fc820d6b3e5406dfa8f6">ValueCategory</a>; <a name="l00087"></a>00087 }; <a name="l00088"></a>00088 <span class="preprocessor">#endif</span> <a name="l00089"></a>00089 <span class="preprocessor"></span> <a name="l00090"></a>00090 <span class="comment">// ======================================================================</span> <a name="l00091"></a>00091 <span class="comment">// Unsigned integer types</span> <a name="l00092"></a>00092 <span class="comment">// ======================================================================</span> <a name="l00093"></a>00093 <a name="l00097"></a>00097 <span class="keyword">template</span><> <a name="l00098"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01unsigned_01long_01_4.html">00098</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><unsigned long> { <a name="l00099"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01unsigned_01long_01_4.html#aa6aeb6243e6fbf8b5aba659083baa1ac">00099</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00100"></a>00100 }; <a name="l00101"></a>00101 <a name="l00105"></a>00105 <span class="keyword">template</span><> <a name="l00106"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01unsigned_01int_01_4.html">00106</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><unsigned int> { <a name="l00107"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01unsigned_01int_01_4.html#ae95cdc132665581c458fc64c7e7a0490">00107</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00108"></a>00108 }; <a name="l00109"></a>00109 <a name="l00113"></a>00113 <span class="keyword">template</span><> <a name="l00114"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01unsigned_01short_01_4.html">00114</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><unsigned short> { <a name="l00115"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01unsigned_01short_01_4.html#a0efa2ce53e9cb98dc4a58dda24127d3a">00115</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00116"></a>00116 }; <a name="l00117"></a>00117 <a name="l00121"></a>00121 <span class="keyword">template</span><> <a name="l00122"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01unsigned_01char_01_4.html">00122</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><unsigned char> { <a name="l00123"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01unsigned_01char_01_4.html#a3cba1e41ab04d31c7b68b1c5e6e227aa">00123</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00124"></a>00124 }; <a name="l00125"></a>00125 <a name="l00126"></a>00126 <span class="comment">// Microsoft implements size_t awkwardly. </span> <a name="l00127"></a>00127 <span class="preprocessor">#if defined(_MSC_VER) && defined(_M_X64)</span> <a name="l00128"></a>00128 <span class="preprocessor"></span> <a name="l00131"></a>00131 <span class="keyword">template</span><> <a name="l00132"></a>00132 <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><size_t> { <a name="l00133"></a>00133 <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ArgTraits.html#a346532973520fc820d6b3e5406dfa8f6">ValueCategory</a>; <a name="l00134"></a>00134 }; <a name="l00135"></a>00135 <span class="preprocessor">#endif</span> <a name="l00136"></a>00136 <span class="preprocessor"></span> <a name="l00137"></a>00137 <a name="l00138"></a>00138 <span class="preprocessor">#ifdef HAVE_LONG_LONG</span> <a name="l00139"></a>00139 <span class="preprocessor"></span> <a name="l00142"></a>00142 <span class="keyword">template</span><> <a name="l00143"></a>00143 <span class="keyword">struct </span>ArgTraits<unsigned long long> { <a name="l00144"></a>00144 <span class="keyword">typedef</span> ValueLike <a class="code" href="structTCLAP_1_1ArgTraits.html#a346532973520fc820d6b3e5406dfa8f6">ValueCategory</a>; <a name="l00145"></a>00145 }; <a name="l00146"></a>00146 <span class="preprocessor">#endif</span> <a name="l00147"></a>00147 <span class="preprocessor"></span> <a name="l00148"></a>00148 <span class="comment">// ======================================================================</span> <a name="l00149"></a>00149 <span class="comment">// Float types</span> <a name="l00150"></a>00150 <span class="comment">// ======================================================================</span> <a name="l00151"></a>00151 <a name="l00155"></a>00155 <span class="keyword">template</span><> <a name="l00156"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01float_01_4.html">00156</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><float> { <a name="l00157"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01float_01_4.html#ace983d74b1b28caa692840da15313acf">00157</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00158"></a>00158 }; <a name="l00159"></a>00159 <a name="l00163"></a>00163 <span class="keyword">template</span><> <a name="l00164"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01double_01_4.html">00164</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><double> { <a name="l00165"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01double_01_4.html#a06ac5f8ebfcbc537e9ce57b96836dd3d">00165</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00166"></a>00166 }; <a name="l00167"></a>00167 <a name="l00168"></a>00168 <span class="comment">// ======================================================================</span> <a name="l00169"></a>00169 <span class="comment">// Other types</span> <a name="l00170"></a>00170 <span class="comment">// ======================================================================</span> <a name="l00171"></a>00171 <a name="l00175"></a>00175 <span class="keyword">template</span><> <a name="l00176"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01bool_01_4.html">00176</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><bool> { <a name="l00177"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01bool_01_4.html#a86efe13e981aaef96d37ec465a8409a7">00177</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00178"></a>00178 }; <a name="l00179"></a>00179 <a name="l00180"></a>00180 <a name="l00184"></a>00184 <span class="preprocessor">#ifndef TCLAP_DONT_DECLARE_WCHAR_T_ARGTRAITS</span> <a name="l00185"></a>00185 <span class="preprocessor"></span><span class="keyword">template</span><> <a name="l00186"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01wchar__t_01_4.html">00186</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><wchar_t> { <a name="l00187"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01wchar__t_01_4.html#a49a311297a394637af4d8d64eda7f442">00187</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueLike</a> <a class="code" href="structTCLAP_1_1ValueLike.html" title="A value like argument value type is a value that can be set using operator&gt;&gt;...">ValueCategory</a>; <a name="l00188"></a>00188 }; <a name="l00189"></a>00189 <span class="preprocessor">#endif</span> <a name="l00190"></a>00190 <span class="preprocessor"></span> <a name="l00194"></a>00194 <span class="keyword">template</span><> <a name="l00195"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01std_1_1string_01_4.html">00195</a> <span class="keyword">struct </span><a class="code" href="structTCLAP_1_1ArgTraits.html" title="Arg traits are used to get compile type specialization when parsing argument values...">ArgTraits</a><std::string> { <a name="l00196"></a><a class="code" href="structTCLAP_1_1ArgTraits_3_01std_1_1string_01_4.html#a719adeb18786516dd4b2a16525cf4536">00196</a> <span class="keyword">typedef</span> <a class="code" href="structTCLAP_1_1StringLike.html" title="A string like argument value type is a value that can be set using operator=(string)...">StringLike</a> <a class="code" href="structTCLAP_1_1StringLike.html" title="A string like argument value type is a value that can be set using operator=(string)...">ValueCategory</a>; <a name="l00197"></a>00197 }; <a name="l00198"></a>00198 <a name="l00199"></a>00199 <span class="keyword">template</span><<span class="keyword">typename</span> T> <a name="l00200"></a><a class="code" href="namespaceTCLAP.html#a06cca5c0de2e5803a67c63cde60a2dfb">00200</a> <span class="keywordtype">void</span> <a class="code" href="namespaceTCLAP.html#a06cca5c0de2e5803a67c63cde60a2dfb">SetString</a>(T &dst, <span class="keyword">const</span> std::string &src) <a name="l00201"></a>00201 { <a name="l00202"></a>00202 dst = src; <a name="l00203"></a>00203 } <a name="l00204"></a>00204 <a name="l00205"></a>00205 } <span class="comment">// namespace</span> <a name="l00206"></a>00206 <a name="l00207"></a>00207 <span class="preprocessor">#endif</span> <a name="l00208"></a>00208 <span class="preprocessor"></span> </pre></div></div> <hr size="1"/><address style="text-align: right;"><small>Generated on Sat Apr 16 15:34:24 2011 for tclap by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.0 </small></address> </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 16129 | tjuricek |
Rename/move files again... this time to the hyphenated-approach. |
||
//guest/tjuricek/file_system_client/main/vendor/tclap-1.2.1/docs/html/StandardTraits_8h_source.html | |||||
#1 | 16119 | tjuricek | Rename/move to meet workshop project conventions. | ||
//guest/tjuricek/fsclient/vendor/tclap-1.2.1/docs/html/StandardTraits_8h_source.html | |||||
#1 | 16118 | tjuricek |
FSClient initial version: handles add, edit This is a proof-of-concept app that mirrors an existing Perforce workspace to handle running commands like "p4 add" and "p4 edit" automatically when your apps add and write files. See the readme for more information. |