<!-- HTML header for doxygen 1.8.8--> <!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="X-UA-Compatible" content="IE=edge"> <!-- For Mobile Devices --> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta name="generator" content="Doxygen 1.8.15"/> <script type="text/javascript" src="jquery.min.js"></script> <title>rttr: rttr::registration Class Reference</title> <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>--> <script type="text/javascript" src="dynsections.js"></script> <link rel = "shortcut icon" type = "image/x-icon" href = "favicon.ico"> <link rel = "stylesheet" href = "fonts/ptsans_regular_macroman/stylesheet.css"> <link rel = "stylesheet" href = "fonts/source_code_pro_regular/stylesheet.css"> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="custom-doxygen.css" rel="stylesheet" type="text/css"/> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" href="custom-bootstrap.css"> <script src="bootstrap/js/bootstrap.min.js"></script> <script type="text/javascript" src="doxy-boot.js"></script> </head> <body> <!-- <nav class="navbar navbar-default" role="navigation"> <div class="container"> <div class="navbar-header"> <a class="navbar-brand">rttr 0.9.6</a> </div> </div> </nav> --> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div class="content" id="content"> <div class="container"> <div class="row"> <div class="col-sm-12 panel panel-default" style="padding-bottom: 15px;"> <div style="margin-bottom: 15px;"> <!-- end header part --> <!-- Generated by Doxygen 1.8.15 --> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacerttr.html">rttr</a></li><li class="navelem"><a class="el" href="classrttr_1_1registration.html">registration</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="#pub-static-attribs">Static Public Attributes</a> | <a href="classrttr_1_1registration-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">rttr::registration Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>The <a class="el" href="classrttr_1_1registration.html">registration</a> class is the entry point for the manual registration of reflection information to the type system. <a href="classrttr_1_1registration.html#details">More...</a></p> <p><code>#include <<a class="el" href="registration_8h_source.html">registration.h</a>></code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Classes</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a> class is used to chain registration calls. <a href="classrttr_1_1registration_1_1bind.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration_1_1class__.html">class_</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The <a class="el" href="classrttr_1_1registration_1_1class__.html">class_</a> is used to register classes to RTTR. <a href="classrttr_1_1registration_1_1class__.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr class="memitem:ae185f4e001154c4d95a3901bcbd6e234"><td class="memTemplParams" colspan="2">template<typename Enum_Type > </td></tr> <tr class="memitem:ae185f4e001154c4d95a3901bcbd6e234"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a>< detail::enum_, detail::invalid_type, Enum_Type > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration.html#ae185f4e001154c4d95a3901bcbd6e234">enumeration</a> (<a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> name)</td></tr> <tr class="memdesc:ae185f4e001154c4d95a3901bcbd6e234"><td class="mdescLeft"> </td><td class="mdescRight">Register a global enumeration of type <code>Enum_Type</code>. <a href="#ae185f4e001154c4d95a3901bcbd6e234">More...</a><br /></td></tr> <tr class="separator:ae185f4e001154c4d95a3901bcbd6e234"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5da1c6eb947d700681faa7fec0bf23b7"><td class="memTemplParams" colspan="2">template<typename F > </td></tr> <tr class="memitem:a5da1c6eb947d700681faa7fec0bf23b7"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a>< detail::meth, detail::invalid_type, F, <a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611ba84807fec67699af41c7bcb3a57dce40b">detail::public_access</a> > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration.html#a5da1c6eb947d700681faa7fec0bf23b7">method</a> (<a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> name, F f)</td></tr> <tr class="memdesc:a5da1c6eb947d700681faa7fec0bf23b7"><td class="mdescLeft"> </td><td class="mdescRight">Register a method to this class. <a href="#a5da1c6eb947d700681faa7fec0bf23b7">More...</a><br /></td></tr> <tr class="separator:a5da1c6eb947d700681faa7fec0bf23b7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3331d6ccc45422da21e36937edcce4e0"><td class="memTemplParams" colspan="2">template<typename A > </td></tr> <tr class="memitem:a3331d6ccc45422da21e36937edcce4e0"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a>< detail::prop, detail::invalid_type, A, <a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611ba84807fec67699af41c7bcb3a57dce40b">detail::public_access</a> > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration.html#a3331d6ccc45422da21e36937edcce4e0">property</a> (<a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> name, A acc)</td></tr> <tr class="memdesc:a3331d6ccc45422da21e36937edcce4e0"><td class="mdescLeft"> </td><td class="mdescRight">Register a global property with read write access. <a href="#a3331d6ccc45422da21e36937edcce4e0">More...</a><br /></td></tr> <tr class="separator:a3331d6ccc45422da21e36937edcce4e0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8e6d6936540f3d650292f2bb40e9b9d8"><td class="memTemplParams" colspan="2">template<typename A1 , typename A2 > </td></tr> <tr class="memitem:a8e6d6936540f3d650292f2bb40e9b9d8"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a>< detail::prop, detail::invalid_type, A1, A2, <a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611ba84807fec67699af41c7bcb3a57dce40b">detail::public_access</a> > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration.html#a8e6d6936540f3d650292f2bb40e9b9d8">property</a> (<a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> name, A1 getter, A2 setter)</td></tr> <tr class="memdesc:a8e6d6936540f3d650292f2bb40e9b9d8"><td class="mdescLeft"> </td><td class="mdescRight">Register a property to this class. <a href="#a8e6d6936540f3d650292f2bb40e9b9d8">More...</a><br /></td></tr> <tr class="separator:a8e6d6936540f3d650292f2bb40e9b9d8"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8d3550e713fe724b02528dbc08b5fcbc"><td class="memTemplParams" colspan="2">template<typename A > </td></tr> <tr class="memitem:a8d3550e713fe724b02528dbc08b5fcbc"><td class="memTemplItemLeft" align="right" valign="top">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a>< detail::prop_readonly, detail::invalid_type, A, <a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611ba84807fec67699af41c7bcb3a57dce40b">detail::public_access</a> > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration.html#a8d3550e713fe724b02528dbc08b5fcbc">property_readonly</a> (<a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> name, A acc)</td></tr> <tr class="memdesc:a8d3550e713fe724b02528dbc08b5fcbc"><td class="mdescLeft"> </td><td class="mdescRight">Register a global read only property. <a href="#a8d3550e713fe724b02528dbc08b5fcbc">More...</a><br /></td></tr> <tr class="separator:a8d3550e713fe724b02528dbc08b5fcbc"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a> Static Public Attributes</h2></td></tr> <tr class="memitem:a8920352ec53e1cd44bdec18ef5e89568"><td class="memItemLeft" align="right" valign="top">static const detail::private_access </td><td class="memItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration.html#a8920352ec53e1cd44bdec18ef5e89568">private_access</a></td></tr> <tr class="memdesc:a8920352ec53e1cd44bdec18ef5e89568"><td class="mdescLeft"> </td><td class="mdescRight">This variable can be used to specify during registration of a class member the access level: <code>private</code>. <a href="#a8920352ec53e1cd44bdec18ef5e89568">More...</a><br /></td></tr> <tr class="separator:a8920352ec53e1cd44bdec18ef5e89568"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5ac82a82df83ce2dd8c34ada18d7b904"><td class="memItemLeft" align="right" valign="top">static const detail::protected_access </td><td class="memItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration.html#a5ac82a82df83ce2dd8c34ada18d7b904">protected_access</a></td></tr> <tr class="memdesc:a5ac82a82df83ce2dd8c34ada18d7b904"><td class="mdescLeft"> </td><td class="mdescRight">This variable can be used to specify during registration of a class member the access level: <code>protected</code>. <a href="#a5ac82a82df83ce2dd8c34ada18d7b904">More...</a><br /></td></tr> <tr class="separator:a5ac82a82df83ce2dd8c34ada18d7b904"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a45df26a4b45b6715ac17e9a03594c369"><td class="memItemLeft" align="right" valign="top">static const detail::public_access </td><td class="memItemRight" valign="bottom"><a class="el" href="classrttr_1_1registration.html#a45df26a4b45b6715ac17e9a03594c369">public_access</a></td></tr> <tr class="memdesc:a45df26a4b45b6715ac17e9a03594c369"><td class="mdescLeft"> </td><td class="mdescRight">This variable can be used to specify during registration of a class member the access level: <code>public</code>. <a href="#a45df26a4b45b6715ac17e9a03594c369">More...</a><br /></td></tr> <tr class="separator:a45df26a4b45b6715ac17e9a03594c369"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>The <a class="el" href="classrttr_1_1registration.html">registration</a> class is the entry point for the manual registration of reflection information to the type system. </p> <p>It is possible to register <em>constructors</em>, <em>properties</em>, <em>methods</em> and <em>enumerations</em>.</p> <p>See following example for a typical usage:</p> <p>Put the <a class="el" href="rttr__enable_8h.html#a848bcae21d3a54e07ca6450689820a59">RTTR_ENABLE()</a> macro inside the class declaration, when you will inherit from this class, otherwise you can omit the macro. </p><div class="fragment"><div class="line"><span class="preprocessor">#include <rttr/type></span></div><div class="line"><span class="keyword">struct </span>Mesh</div><div class="line">{</div><div class="line"> Mesh();</div><div class="line"> Mesh(<span class="keyword">const</span> std::string& name)</div><div class="line"> Vector3d getPosition() <span class="keyword">const</span>;</div><div class="line"> <span class="keywordtype">void</span> setPosition(<span class="keyword">const</span> Vector3d& pos);</div><div class="line"> <span class="keyword">enum</span> E_TransformSpace</div><div class="line"> {</div><div class="line"> TS_LOCAL,</div><div class="line"> TS_PARENT,</div><div class="line"> TS_WORLD</div><div class="line"> };</div><div class="line"></div><div class="line"> <span class="keywordtype">void</span> setDirection(<span class="keyword">const</span> Vector3 &vec, E_TransformSpace ts = TS_LOCAL);</div><div class="line"> <a class="code" href="rttr__enable_8h.html#a848bcae21d3a54e07ca6450689820a59">RTTR_ENABLE</a>()</div><div class="line">private:</div><div class="line"> Vector3d _pos;</div><div class="line">};</div></div><!-- fragment --><p>Then in a cpp file, register the constructors, properties and methods of the class <code>Mesh</code>.</p> <div class="fragment"><div class="line"><span class="preprocessor">#include "Mesh.cpp"</span></div><div class="line"><span class="preprocessor">#include <rttr/registration></span></div><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacerttr.html">rttr</a>;</div><div class="line"></div><div class="line"><span class="comment">// register the class Mesh before main is called</span></div><div class="line"><a class="code" href="registration_8h.html#ac6326400f16225ee15b52eabcaae8130">RTTR_REGISTRATION</a></div><div class="line">{</div><div class="line"> <span class="keyword">using namespace </span><a class="code" href="namespacerttr.html">rttr</a>;</div><div class="line"> <a class="code" href="classrttr_1_1registration_1_1class__.html">registration::class_<Mesh></a>(<span class="stringliteral">"Mesh"</span>)</div><div class="line"> .<a class="code" href="classrttr_1_1registration_1_1class__.html#a92925cd9adc8c53c6c2df6e5f7f86e8a">constructor</a><>()</div><div class="line"> .<a class="code" href="classrttr_1_1constructor.html">constructor<const string&></a>()</div><div class="line"> .enumeration<E_TransformSpace>(<span class="stringliteral">"E_TransformSpace"</span>)</div><div class="line"> (</div><div class="line"> <a class="code" href="namespacerttr.html#a54ecd8bad715cbc451e7aa8491667d4a">value</a>(<span class="stringliteral">"TS_LOCAL"</span>, TS_LOCAL),</div><div class="line"> <a class="code" href="namespacerttr.html#a54ecd8bad715cbc451e7aa8491667d4a">value</a>(<span class="stringliteral">"TS_PARENT"</span>, TS_PARENT),</div><div class="line"> <a class="code" href="namespacerttr.html#a54ecd8bad715cbc451e7aa8491667d4a">value</a>(<span class="stringliteral">"TS_WORLD"</span>, TS_WORLD),</div><div class="line"></div><div class="line"> <a class="code" href="namespacerttr.html#a2cd2b848b4d218241a8b6e8f7cdbeb93">metadata</a>(<span class="stringliteral">"GUI_DESCR"</span>, <span class="stringliteral">"This enum describes the transformation."</span>)</div><div class="line"> )</div><div class="line"> .<a class="code" href="classrttr_1_1registration.html#a3331d6ccc45422da21e36937edcce4e0">property</a>(<span class="stringliteral">"pos"</span>, &Mesh::getPosition, &Mesh::setPosition)</div><div class="line"> (</div><div class="line"> <a class="code" href="namespacerttr.html#a2cd2b848b4d218241a8b6e8f7cdbeb93">metadata</a>(<span class="stringliteral">"GUI_LABEL"</span>, <span class="stringliteral">"Position."</span>),</div><div class="line"> <a class="code" href="namespacerttr.html#a2cd2b848b4d218241a8b6e8f7cdbeb93">metadata</a>(<span class="stringliteral">"GUI_DESCR"</span>, <span class="stringliteral">"The position of the mesh."</span>),</div><div class="line"> )</div><div class="line"> .<a class="code" href="classrttr_1_1registration.html#a5da1c6eb947d700681faa7fec0bf23b7">method</a>(<span class="stringliteral">"setDirection"</span>, &Mesh::setDirection);</div><div class="line">}</div></div><!-- fragment --><dl class="section remark"><dt>Remarks</dt><dd>See the usage of <code>()</code> operator to add additional <a class="el" href="namespacerttr.html#a2cd2b848b4d218241a8b6e8f7cdbeb93">meta data</a>, <a class="el" href="structrttr_1_1policy.html">policies</a> or <a class="el" href="namespacerttr.html#a54ecd8bad715cbc451e7aa8491667d4a">enum values</a>. </dd></dl> </div><h2 class="groupheader">Member Function Documentation</h2> <a id="ae185f4e001154c4d95a3901bcbd6e234"></a> <h2 class="memtitle"><span class="permalink"><a href="#ae185f4e001154c4d95a3901bcbd6e234">◆ </a></span>enumeration()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename Enum_Type > </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a><detail::enum_, detail::invalid_type, Enum_Type> rttr::registration::enumeration </td> <td>(</td> <td class="paramtype"><a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> </td> <td class="paramname"><em>name</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Register a global enumeration of type <code>Enum_Type</code>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>The name of the enumeration.</td></tr> </table> </dd> </dl> <dl class="section remark"><dt>Remarks</dt><dd>The name of the enumeration has to be unique, otherwise it will not be registered.</dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classrttr_1_1enumeration.html" title="The enumeration class provides several meta information about an enum.">enumeration</a>, <a class="el" href="classrttr_1_1type.html#aa0b0e3e85de99df74f956a84b463f10b" title="Returns the enumerator if this type is an enum type; otherwise the returned value is not valid.">type::get_enumeration()</a></dd></dl> <dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a> object, in order to chain more calls. </dd></dl> </div> </div> <a id="a5da1c6eb947d700681faa7fec0bf23b7"></a> <h2 class="memtitle"><span class="permalink"><a href="#a5da1c6eb947d700681faa7fec0bf23b7">◆ </a></span>method()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename F > </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a><detail::meth, detail::invalid_type, F, <a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611ba84807fec67699af41c7bcb3a57dce40b">detail::public_access</a>> rttr::registration::method </td> <td>(</td> <td class="paramtype"><a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> </td> <td class="paramname"><em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">F </td> <td class="paramname"><em>f</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Register a method to this class. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>The name of the method. </td></tr> <tr><td class="paramname">function</td><td>The function accessor to this method; this can be a member function, a function or a std::function.</td></tr> </table> </dd> </dl> <dl class="section remark"><dt>Remarks</dt><dd>The method name does <em>not</em> have to be unique.</dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classrttr_1_1method.html" title="The method class provides several meta information about a method and can be invoked.">method</a>, <a class="el" href="classrttr_1_1type.html#a15fa4ae4fb0619be68c3b83967fefb51" title="Returns a global method with the name name.">type::get_global_method()</a>, <a class="el" href="classrttr_1_1type.html#afe763c9f268d4fa897d8e52b89c2e093">type::invoke()</a></dd></dl> <dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a> object, in order to chain more calls. </dd></dl> </div> </div> <a id="a3331d6ccc45422da21e36937edcce4e0"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3331d6ccc45422da21e36937edcce4e0">◆ </a></span>property() <span class="overload">[1/2]</span></h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename A > </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a><detail::prop, detail::invalid_type, A, <a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611ba84807fec67699af41c7bcb3a57dce40b">detail::public_access</a>> rttr::registration::property </td> <td>(</td> <td class="paramtype"><a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> </td> <td class="paramname"><em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">A </td> <td class="paramname"><em>acc</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Register a global property with read write access. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>The name of the property. </td></tr> <tr><td class="paramname">acc</td><td>The accessor to the property; a pointer to a variable.</td></tr> </table> </dd> </dl> <dl class="section remark"><dt>Remarks</dt><dd>The name of the property has to be unique, otherwise it will not be registered.</dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classrttr_1_1property.html" title="The property class provides several meta information about a property and gives read/write access to ...">property</a>, <a class="el" href="classrttr_1_1type.html#a9b754b6b0cccc39632323e3ee37f778e" title="Returns a global property with the name name.">type::get_global_property()</a>, <a class="el" href="classrttr_1_1type.html#a148b6cb7890fcd53b7d6559a2fb610fe">type::get_property_value()</a>, <a class="el" href="classrttr_1_1type.html#a0748930ab0ca3b8254f1bf85322f3612">type::set_property_value</a></dd></dl> <dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a> object, in order to chain more calls. </dd></dl> </div> </div> <a id="a8e6d6936540f3d650292f2bb40e9b9d8"></a> <h2 class="memtitle"><span class="permalink"><a href="#a8e6d6936540f3d650292f2bb40e9b9d8">◆ </a></span>property() <span class="overload">[2/2]</span></h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename A1 , typename A2 > </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a><detail::prop, detail::invalid_type, A1, A2, <a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611ba84807fec67699af41c7bcb3a57dce40b">detail::public_access</a>> rttr::registration::property </td> <td>(</td> <td class="paramtype"><a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> </td> <td class="paramname"><em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">A1 </td> <td class="paramname"><em>getter</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">A2 </td> <td class="paramname"><em>setter</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Register a property to this class. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>The name of the property. </td></tr> <tr><td class="paramname">getter</td><td>The getter accessor to the property; this can be a pointer to a function or a std::function. </td></tr> <tr><td class="paramname">setter</td><td>The setter accessor to the property; this can be a pointer to a function or a std::function.</td></tr> </table> </dd> </dl> <dl class="section remark"><dt>Remarks</dt><dd>The name of the property has to be unique, otherwise it will not be registered.</dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classrttr_1_1property.html" title="The property class provides several meta information about a property and gives read/write access to ...">property</a>, <a class="el" href="classrttr_1_1type.html#a9b754b6b0cccc39632323e3ee37f778e" title="Returns a global property with the name name.">type::get_global_property()</a>, <a class="el" href="classrttr_1_1type.html#a148b6cb7890fcd53b7d6559a2fb610fe">type::get_property_value()</a>, <a class="el" href="classrttr_1_1type.html#a0748930ab0ca3b8254f1bf85322f3612">type::set_property_value</a></dd></dl> <dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a> object, in order to chain more calls. </dd></dl> </div> </div> <a id="a8d3550e713fe724b02528dbc08b5fcbc"></a> <h2 class="memtitle"><span class="permalink"><a href="#a8d3550e713fe724b02528dbc08b5fcbc">◆ </a></span>property_readonly()</h2> <div class="memitem"> <div class="memproto"> <div class="memtemplate"> template<typename A > </div> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a><detail::prop_readonly, detail::invalid_type, A, <a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611ba84807fec67699af41c7bcb3a57dce40b">detail::public_access</a>> rttr::registration::property_readonly </td> <td>(</td> <td class="paramtype"><a class="el" href="namespacerttr.html#a61265f69675ac438ecfa23b084adaa56">string_view</a> </td> <td class="paramname"><em>name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">A </td> <td class="paramname"><em>acc</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Register a global read only property. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">name</td><td>The name of the property. </td></tr> <tr><td class="paramname">acc</td><td>The accessor to the property; this can be a pointer to a variable, a pointer to a function or a std::function.</td></tr> </table> </dd> </dl> <dl class="section remark"><dt>Remarks</dt><dd>The name of the property has to be unique, otherwise it will not be registered.</dd></dl> <dl class="section see"><dt>See also</dt><dd><a class="el" href="classrttr_1_1property.html" title="The property class provides several meta information about a property and gives read/write access to ...">property</a>, <a class="el" href="classrttr_1_1type.html#a9b754b6b0cccc39632323e3ee37f778e" title="Returns a global property with the name name.">type::get_global_property()</a>, <a class="el" href="classrttr_1_1type.html#a148b6cb7890fcd53b7d6559a2fb610fe">type::get_property_value()</a>, <a class="el" href="classrttr_1_1type.html#a0748930ab0ca3b8254f1bf85322f3612">type::set_property_value</a></dd></dl> <dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="classrttr_1_1registration_1_1bind.html">bind</a> object, in order to chain more calls. </dd></dl> </div> </div> <h2 class="groupheader">Member Data Documentation</h2> <a id="a8920352ec53e1cd44bdec18ef5e89568"></a> <h2 class="memtitle"><span class="permalink"><a href="#a8920352ec53e1cd44bdec18ef5e89568">◆ </a></span>private_access</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">const detail::private_access rttr::registration::private_access</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>This variable can be used to specify during registration of a class member the access level: <code>private</code>. </p> <p>See following example code: </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacerttr.html">rttr</a>;</div><div class="line"><span class="keyword">struct </span>Foo</div><div class="line">{</div><div class="line"> <span class="keyword">private</span>:</div><div class="line"> <span class="keywordtype">void</span> func() {}</div><div class="line"></div><div class="line"> <a class="code" href="registration_8h.html#a307051b21da56e1ec8a63f0aa943797e">RTTR_REGISTRATION_FRIEND</a></div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="registration_8h.html#ac6326400f16225ee15b52eabcaae8130">RTTR_REGISTRATION</a></div><div class="line">{</div><div class="line"> <a class="code" href="classrttr_1_1registration_1_1class__.html">registration::class_<Foo></a>(<span class="stringliteral">"Foo"</span>)</div><div class="line"> .<a class="code" href="classrttr_1_1registration_1_1class__.html#a3997256452d390b54990f202cf768bc7">method</a>(<span class="stringliteral">"func"</span>, &Foo::func, <a class="code" href="classrttr_1_1registration.html#a8920352ec53e1cd44bdec18ef5e89568">registration::private_access</a>);</div><div class="line">}</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611b" title="The access_levels enum represents the three access modifiers, which can be used in classes to encapsu...">access_levels</a> </dd></dl> </div> </div> <a id="a5ac82a82df83ce2dd8c34ada18d7b904"></a> <h2 class="memtitle"><span class="permalink"><a href="#a5ac82a82df83ce2dd8c34ada18d7b904">◆ </a></span>protected_access</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">const detail::protected_access rttr::registration::protected_access</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>This variable can be used to specify during registration of a class member the access level: <code>protected</code>. </p> <p>See following example code: </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacerttr.html">rttr</a>;</div><div class="line"><span class="keyword">struct </span>Foo</div><div class="line">{</div><div class="line"> <span class="keyword">protected</span>:</div><div class="line"> <span class="keywordtype">void</span> func() {}</div><div class="line"></div><div class="line"> <a class="code" href="registration_8h.html#a307051b21da56e1ec8a63f0aa943797e">RTTR_REGISTRATION_FRIEND</a></div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="registration_8h.html#ac6326400f16225ee15b52eabcaae8130">RTTR_REGISTRATION</a></div><div class="line">{</div><div class="line"> <a class="code" href="classrttr_1_1registration_1_1class__.html">registration::class_<Foo></a>(<span class="stringliteral">"Foo"</span>)</div><div class="line"> .<a class="code" href="classrttr_1_1registration_1_1class__.html#a3997256452d390b54990f202cf768bc7">method</a>(<span class="stringliteral">"func"</span>, &Foo::func, <a class="code" href="classrttr_1_1registration.html#a5ac82a82df83ce2dd8c34ada18d7b904">registration::protected_access</a>);</div><div class="line">}</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611b" title="The access_levels enum represents the three access modifiers, which can be used in classes to encapsu...">access_levels</a> </dd></dl> </div> </div> <a id="a45df26a4b45b6715ac17e9a03594c369"></a> <h2 class="memtitle"><span class="permalink"><a href="#a45df26a4b45b6715ac17e9a03594c369">◆ </a></span>public_access</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">const detail::public_access rttr::registration::public_access</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>This variable can be used to specify during registration of a class member the access level: <code>public</code>. </p> <p>See following example code: </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespacerttr.html">rttr</a>;</div><div class="line"><span class="keyword">struct </span>Foo</div><div class="line">{</div><div class="line"> <span class="keywordtype">void</span> func() {}</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="registration_8h.html#ac6326400f16225ee15b52eabcaae8130">RTTR_REGISTRATION</a></div><div class="line">{</div><div class="line"> <a class="code" href="classrttr_1_1registration_1_1class__.html">registration::class_<Foo></a>(<span class="stringliteral">"Foo"</span>)</div><div class="line"> .<a class="code" href="classrttr_1_1registration_1_1class__.html#a3997256452d390b54990f202cf768bc7">method</a>(<span class="stringliteral">"func"</span>, &Foo::func, <a class="code" href="classrttr_1_1registration.html#a45df26a4b45b6715ac17e9a03594c369">registration::public_access</a>);</div><div class="line">}</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="namespacerttr.html#aa07db0e4984d0c48adc5d61f834d611b" title="The access_levels enum represents the three access modifiers, which can be used in classes to encapsu...">access_levels</a> </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="registration_8h_source.html">registration.h</a></li> </ul> </div><!-- contents --> <!-- HTML footer for doxygen 1.8.9.1--> <!-- start footer part --> <hr class="footer"/> <address class="footer"> <small> Generated on Thu Apr 11 2019 20:05:59 for rttr - 0.9.6 by <a href="http://www.doxygen.org/index.html">doxygen</a>. </small> </address> </body> </html>