-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboxed__enum_8h_source.html
90 lines (90 loc) · 18 KB
/
boxed__enum_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Aspose.Page for C++: include/asposecpplib/system/boxed_enum.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Aspose.Page for C++
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('boxed__enum_8h_source.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">boxed_enum.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef _aspose_system_boxed_enum_h_</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#define _aspose_system_boxed_enum_h_</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include <system/boxed_value.h></span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <system/reflection.h></span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <system/details/is_defined.h></span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include <cstdint></span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> </div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="keyword">namespace </span><a class="code" href="namespace_system.html">System</a></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> {</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  <span class="keyword">template</span><<span class="keyword">class</span> T></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  <span class="keyword">static</span> <span class="keywordtype">bool</span> IsEnumMetaInfoDefined(T value);</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  <span class="keyword">template</span> <<span class="keyword">class</span> T></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  <span class="keyword">static</span> <a class="code" href="class_system_1_1_string.html">System::String</a> EnumGetName(T value);</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  template<typename E, typename UT = typename std::underlying_type<E>::type></div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="class_system_1_1_boxed_enum.html"> 26</a></span>  <span class="keyword">class </span>ASPOSECPP_SHARED_CLASS <a class="code" href="class_system_1_1_boxed_enum.html">BoxedEnum</a> : <span class="keyword">public</span> <a class="code" href="class_system_1_1_boxed_value.html">System::BoxedValue</a><UT></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  {</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="comment">// BoxedEnum now takes TypeInfo from TypeInfo. It is required that BoxedEnum<T> and EnumValues<T> use the same.</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"></span> <span class="keyword">typedef</span> <a class="code" href="struct_system_1_1_type_info_1_1_boxed_value.html">TypeInfo::BoxedValue<E></a> <a class="code" href="struct_system_1_1_type_info_1_1_boxed_value.html">ThisTypeInfo</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  RTTI_INFO_CUSTOM(<a class="code" href="class_system_1_1_boxed_enum.html">System::BoxedEnum<E></a>, <a class="code" href="class_system_1_1_base_types_info.html">System::BaseTypesInfo</a><<a class="code" href="class_system_1_1_boxed_value.html">System::BoxedValue<UT></a>>);</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="class_system_1_1_boxed_enum.html#ab62f3d320922f5433b9cec3c0d37adf5"> 37</a></span>  <a class="code" href="class_system_1_1_boxed_enum.html#ab62f3d320922f5433b9cec3c0d37adf5">BoxedEnum</a>(E e) : <a class="code" href="namespace_system.html">System</a>::<a class="code" href="class_system_1_1_boxed_value.html">BoxedValue</a><UT>(static_cast<UT>(e)) {}</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="class_system_1_1_boxed_enum.html#aea9f1f6b69a23853306e343043919c6b"> 41</a></span>  <span class="keywordtype">bool</span> <a class="code" href="class_system_1_1_boxed_enum.html#aea9f1f6b69a23853306e343043919c6b">IsBoxedEnum</a>()<span class="keyword"> override</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  }</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="class_system_1_1_boxed_enum.html#a650f08afe0fd7fe153eb0ba3ca7f11ef"> 48</a></span>  uint64_t <a class="code" href="class_system_1_1_boxed_enum.html#a650f08afe0fd7fe153eb0ba3ca7f11ef">GetUnsignedLongLongValue</a>()<span class="keyword"> override</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span>uint64_t<span class="keyword">></span>(<a class="code" href="class_system_1_1_boxed_value.html#a4927ef3fdbc8e22a40c2086508cd541d">System::BoxedValue<UT>::unbox</a>());</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  }</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="class_system_1_1_boxed_enum.html#a03511d4acd45b09ac7237168d0a7110c"> 55</a></span>  <a class="code" href="class_system_1_1_string.html">System::String</a> <a class="code" href="class_system_1_1_boxed_enum.html#a03511d4acd45b09ac7237168d0a7110c">ToString</a>()<span class="keyword"> const override</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">return</span> MakeEnumString();</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  }</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T = E></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keyword">typename</span> std::enable_if<!Details::IsDefined<EnumMetaInfo<T>>::value, <a class="code" href="class_system_1_1_string.html">System::String</a>>::type</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  MakeEnumString()<span class="keyword"> const</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordflow">return</span> <a class="code" href="class_system_1_1_string.html#a46b690c629b9aa32c6999971b6912f3c">String::Format</a>(u<span class="stringliteral">"{0}"</span>, <a class="code" href="class_system_1_1_boxed_value.html">System::BoxedValue<UT>::unbox</a>());</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  }</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T = E></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keyword">typename</span> std::enable_if<Details::IsDefined<EnumMetaInfo<T>>::value, <a class="code" href="class_system_1_1_string.html">System::String</a>>::type</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  MakeEnumString()<span class="keyword"> const</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keyword">const</span> UT& underlyingValue = <a class="code" href="class_system_1_1_boxed_value.html#a4927ef3fdbc8e22a40c2086508cd541d">System::BoxedValue<UT>::unbox</a>();</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keyword">const</span> T& enumValue = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(underlyingValue);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <a class="code" href="class_system_1_1_string.html">System::String</a> res = EnumGetName(enumValue);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">if</span> (<a class="code" href="class_system_1_1_string.html#aeb8dc8da23a5d82ff7a51d96f3609e0e">System::String::IsNullOrEmpty</a>(res))</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  res = <a class="code" href="class_system_1_1_string.html#a46b690c629b9aa32c6999971b6912f3c">System::String::Format</a>(u<span class="stringliteral">"{0}"</span>, underlyingValue);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  }</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  };</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="preprocessor">#endif //_aspose_system_boxed_enum_h_</span></div><div class="ttc" id="class_system_1_1_string_html_aeb8dc8da23a5d82ff7a51d96f3609e0e"><div class="ttname"><a href="class_system_1_1_string.html#aeb8dc8da23a5d82ff7a51d96f3609e0e">System::String::IsNullOrEmpty</a></div><div class="ttdeci">ASPOSECPP_SHARED_API bool IsNullOrEmpty() const</div></div>
<div class="ttc" id="class_system_1_1_string_html"><div class="ttname"><a href="class_system_1_1_string.html">System::String</a></div><div class="ttdef"><b>Definition:</b> string.h:125</div></div>
<div class="ttc" id="namespace_system_html"><div class="ttname"><a href="namespace_system.html">System</a></div><div class="ttdef"><b>Definition:</b> Device.h:86</div></div>
<div class="ttc" id="class_system_1_1_base_types_info_html"><div class="ttname"><a href="class_system_1_1_base_types_info.html">System::BaseTypesInfo</a></div><div class="ttdef"><b>Definition:</b> reflection.h:29</div></div>
<div class="ttc" id="class_system_1_1_boxed_enum_html_aea9f1f6b69a23853306e343043919c6b"><div class="ttname"><a href="class_system_1_1_boxed_enum.html#aea9f1f6b69a23853306e343043919c6b">System::BoxedEnum::IsBoxedEnum</a></div><div class="ttdeci">bool IsBoxedEnum() override</div><div class="ttdef"><b>Definition:</b> boxed_enum.h:41</div></div>
<div class="ttc" id="class_system_1_1_boxed_enum_html_a03511d4acd45b09ac7237168d0a7110c"><div class="ttname"><a href="class_system_1_1_boxed_enum.html#a03511d4acd45b09ac7237168d0a7110c">System::BoxedEnum::ToString</a></div><div class="ttdeci">System::String ToString() const override</div><div class="ttdef"><b>Definition:</b> boxed_enum.h:55</div></div>
<div class="ttc" id="class_system_1_1_boxed_enum_html_ab62f3d320922f5433b9cec3c0d37adf5"><div class="ttname"><a href="class_system_1_1_boxed_enum.html#ab62f3d320922f5433b9cec3c0d37adf5">System::BoxedEnum::BoxedEnum</a></div><div class="ttdeci">BoxedEnum(E e)</div><div class="ttdef"><b>Definition:</b> boxed_enum.h:37</div></div>
<div class="ttc" id="class_system_1_1_string_html_a46b690c629b9aa32c6999971b6912f3c"><div class="ttname"><a href="class_system_1_1_string.html#a46b690c629b9aa32c6999971b6912f3c">System::String::Format</a></div><div class="ttdeci">static String Format(const SharedPtr< IFormatProvider > &fp, const String &format, const Args &... args)</div><div class="ttdef"><b>Definition:</b> string.h:1355</div></div>
<div class="ttc" id="struct_system_1_1_type_info_1_1_boxed_value_html"><div class="ttname"><a href="struct_system_1_1_type_info_1_1_boxed_value.html">System::TypeInfo::BoxedValue</a></div><div class="ttdoc">TypeInfo structure for BoxedValue class. </div><div class="ttdef"><b>Definition:</b> type_info.h:343</div></div>
<div class="ttc" id="class_system_1_1_boxed_enum_html_a650f08afe0fd7fe153eb0ba3ca7f11ef"><div class="ttname"><a href="class_system_1_1_boxed_enum.html#a650f08afe0fd7fe153eb0ba3ca7f11ef">System::BoxedEnum::GetUnsignedLongLongValue</a></div><div class="ttdeci">uint64_t GetUnsignedLongLongValue() override</div><div class="ttdef"><b>Definition:</b> boxed_enum.h:48</div></div>
<div class="ttc" id="class_system_1_1_boxed_value_html"><div class="ttname"><a href="class_system_1_1_boxed_value.html">System::BoxedValue</a></div><div class="ttdef"><b>Definition:</b> boxed_value.h:165</div></div>
<div class="ttc" id="class_system_1_1_boxed_enum_html"><div class="ttname"><a href="class_system_1_1_boxed_enum.html">System::BoxedEnum</a></div><div class="ttdef"><b>Definition:</b> boxed_enum.h:26</div></div>
<div class="ttc" id="class_system_1_1_boxed_value_html_a4927ef3fdbc8e22a40c2086508cd541d"><div class="ttname"><a href="class_system_1_1_boxed_value.html#a4927ef3fdbc8e22a40c2086508cd541d">System::BoxedValue::unbox</a></div><div class="ttdeci">const T & unbox() const</div><div class="ttdef"><b>Definition:</b> boxed_value.h:192</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_5016bbee7090a7ea107ac349e6851b58.html">asposecpplib</a></li><li class="navelem"><a class="el" href="dir_df25e03386e2342d9a93ad6d6f98efe3.html">system</a></li><li class="navelem"><b>boxed_enum.h</b></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>