|
Boost-Commit : |
From: chochlik_at_[hidden]
Date: 2008-05-11 08:34:46
Author: matus.chochlik
Date: 2008-05-11 08:34:45 EDT (Sun, 11 May 2008)
New Revision: 45275
URL: http://svn.boost.org/trac/boost/changeset/45275
Log:
Documentation update
Added:
sandbox/mirror/libs/mirror/doc/xml/mirror/reference/REFLECT_TYPE.xml (contents, props changed)
sandbox/mirror/libs/mirror/doc/xml/mirror/reference/REFLECT_TYPEDEFD.xml (contents, props changed)
sandbox/mirror/libs/mirror/doc/xml/mirror/reference/REFLECT_TYPEOF.xml (contents, props changed)
sandbox/mirror/libs/mirror/doc/xml/mirror/sections/reference/refl_types.xml (contents, props changed)
Text files modified:
sandbox/mirror/libs/mirror/doc/xml/mirror/pages/reflecting.xml | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
Modified: sandbox/mirror/libs/mirror/doc/xml/mirror/pages/reflecting.xml
==============================================================================
--- sandbox/mirror/libs/mirror/doc/xml/mirror/pages/reflecting.xml (original)
+++ sandbox/mirror/libs/mirror/doc/xml/mirror/pages/reflecting.xml 2008-05-11 08:34:45 EDT (Sun, 11 May 2008)
@@ -4,4 +4,5 @@
<paragraph>
</paragraph>
<include reference_section="refl_namespaces"/>
+ <include reference_section="refl_types"/>
</doc_page>
Added: sandbox/mirror/libs/mirror/doc/xml/mirror/reference/REFLECT_TYPE.xml
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/mirror/doc/xml/mirror/reference/REFLECT_TYPE.xml 2008-05-11 08:34:45 EDT (Sun, 11 May 2008)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feature_doc>
+ <overview>
+ <paragraph>
+ The <feat_ref>REFLECT_TYPE</feat_ref> macro expands into a meta_type describing the type given as argument.
+ </paragraph>
+ </overview>
+ <macro name="REFLECT_TYPE">
+ <arg name="TYPE">
+ The type to be reflected.
+ </arg>
+ </macro>
+ <overview>
+ <paragraph>
+ </paragraph>
+ </overview>
+ <requirements>
+ <header>meta_type.hpp</header>
+ </requirements>
+ <example>
+ <cpp_source>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPE</feat_ref>(bool) ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPE</feat_ref>(double) ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPE</feat_ref>(const char*) ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPE</feat_ref>(int volatile * const * volatile) ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPE</feat_ref>(long const * const [321]) ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPE</feat_ref>(const ::std::string&) ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPE</feat_ref>(BOOST_TYPEOF(1+1)) ::full_name() << endl;</cpp_line>
+ </cpp_source>
+ </example>
+</feature_doc>
+
Added: sandbox/mirror/libs/mirror/doc/xml/mirror/reference/REFLECT_TYPEDEFD.xml
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/mirror/doc/xml/mirror/reference/REFLECT_TYPEDEFD.xml 2008-05-11 08:34:45 EDT (Sun, 11 May 2008)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feature_doc>
+ <overview>
+ <paragraph>
+ The <feat_ref>REFLECT_TYPEDEFD</feat_ref> macro expands into a meta_type describing the given <cpp_expr>typedef</cpp_expr>ined type.
+ </paragraph>
+ </overview>
+ <macro name="REFLECT_TYPEDEFD">
+ <arg name="NAMESPACE_ALIAS">
+ The <lib_name_ref/> alias for the namespace where the type has been defined.
+ </arg>
+ <arg name="TYPEDEFD_TYPE">
+ The <cpp_expr>typedef</cpp_expr>ined name (without nested name specifier) of the type to be reflected.
+ </arg>
+ </macro>
+ <overview>
+ <paragraph>
+ </paragraph>
+ </overview>
+ <requirements>
+ <header>meta_type.hpp</header>
+ </requirements>
+ <example>
+ <cpp_source>
+ <cpp_line>namespace foo {</cpp_line><cpp_indent>
+ <cpp_line>namespace detail {</cpp_line><cpp_indent>
+ <cpp_line>typedef double foobar;</cpp_line>
+ </cpp_indent><cpp_line>} <cpp_comment>// namespace detail</cpp_comment></cpp_line>
+ </cpp_indent><cpp_line>} <cpp_comment>// namespace foo</cpp_comment></cpp_line>
+ <cpp_line/>
+ <cpp_line>namespace boost {</cpp_line><cpp_indent>
+ <cpp_line>namespace mirror {</cpp_line><cpp_indent>
+ <cpp_line><feat_ref>REG_NAMESPACE_TOP_LEVEL</feat_ref>(foo)</cpp_line>
+ <cpp_line><feat_ref>REG_NAMESPACE</feat_ref>(_foo, detail)</cpp_line>
+ <cpp_line><feat_ref>REG_TYPEDEFD</feat_ref>(_foo_detail, ::foo::detail, foobar)</cpp_line>
+ </cpp_indent><cpp_line>} <cpp_comment>// namespace mirror</cpp_comment></cpp_line>
+ </cpp_indent><cpp_line>} <cpp_comment>// namespace boost</cpp_comment></cpp_line>
+ <cpp_line/>
+ <cpp_line><cpp_comment>// ...</cpp_comment></cpp_line>
+ <cpp_line/>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPEDEFD</feat_ref>(_foo_detail, foobar) ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPEDEFD</feat_ref>(_boost, bchar) ::full_name() << endl;</cpp_line>
+ </cpp_source>
+ </example>
+</feature_doc>
+
Added: sandbox/mirror/libs/mirror/doc/xml/mirror/reference/REFLECT_TYPEOF.xml
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/mirror/doc/xml/mirror/reference/REFLECT_TYPEOF.xml 2008-05-11 08:34:45 EDT (Sun, 11 May 2008)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feature_doc>
+ <overview>
+ <paragraph>
+ The <feat_ref>REFLECT_TYPEOF</feat_ref> macro expands into a meta_type describing the type of the given expression. This macro uses <cpp_expr>BOOST_TYPEOF</cpp_expr> to resolve the type of the expression.
+ </paragraph>
+ </overview>
+ <macro name="REFLECT_TYPEOF">
+ <arg name="EXPRESSION">
+ The expression, type of which is to be reflected.
+ </arg>
+ </macro>
+ <overview>
+ <paragraph>
+ </paragraph>
+ </overview>
+ <requirements>
+ <header>meta_type.hpp</header>
+ </requirements>
+ <example>
+ <cpp_source>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPEOF</feat_ref>(1+1) ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPEOF</feat_ref>(1.0/2.0) ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPEOF</feat_ref>("foo") ::full_name() << endl;</cpp_line>
+ <cpp_line>bcout << <feat_ref>REFLECT_TYPEOF</feat_ref>(L"bar") ::full_name() << endl;</cpp_line>
+ </cpp_source>
+ </example>
+</feature_doc>
+
Added: sandbox/mirror/libs/mirror/doc/xml/mirror/sections/reference/refl_types.xml
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/mirror/doc/xml/mirror/sections/reference/refl_types.xml 2008-05-11 08:34:45 EDT (Sun, 11 May 2008)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<section title="Reflecting types" name="refl_types">
+ <paragraph>
+ There are several macros that can be used to reflect types. To reflect a concrete type the <feat_ref>REFLECT_TYPE</feat_ref> macro can be used. To reflect the type of an expression, the <feat_ref>REFLECT_TYPEOF</feat_ref> macro or a combination of <feat_ref>REFLECT_TYPE</feat_ref> and <cpp_expr>BOOST_TYPEOF</cpp_expr> can be used.
+ </paragraph>
+ <include reference="REFLECT_TYPE"/>
+ <include reference="REFLECT_TYPEOF"/>
+ <include reference="REFLECT_TYPEDEFD"/>
+</section>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk