From 7c0889cf2a8fe8984c6be98dfff333f0603fbab9 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 21 Feb 2014 13:02:00 +0400 Subject: [PATCH] Docs for TypeIndex 3.0 generated --- BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP.html | 54 ---- BOOST_TYPE_INDEX_CTTI_END_SKIP.html | 54 ---- ...YPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY.html | 53 ---- BOOST_TYPE_INDEX_FUNCTION_SIGNATURE.html | 55 ---- BOOST_TYPE_INDEX_REGISTER_CLASS.html | 76 +++++ BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS.html | 54 ++++ BOOST_TYPE_INDEX_REGISTER_STL_CLASS.html | 54 ++++ BOOST_TYPE_INDEX_USER_TYPEINDEX.html | 54 ++++ boost/template_id.html | 54 ---- boost/template_id_with_cvr.html | 54 ---- boost/template_index.html | 54 ---- boost/template_info.html | 120 -------- boost/type_id.html | 54 ---- boost/type_id_rtti_on_idp5820176.html | 54 ---- boost/type_id_rtti_on_idp5823984.html | 54 ---- boost/type_id_with_cvr.html | 54 ---- boost/type_index.html | 121 -------- boost/type_info.html | 151 ---------- boost/typeind/ctti_type_index.html | 105 +++++++ boost/typeind/stl_type_index.html | 113 +++++++ boost/typeind/type_id.html | 85 ++++++ boost/typeind/type_id_runtime.html | 92 ++++++ boost/typeind/type_id_with_cvr.html | 86 ++++++ boost/typeind/type_index.html | 55 ++++ boost/typeind/type_index_facade.html | 277 +++++++++++++++++ boost/typeind/type_info.html | 56 ++++ boost_typeindex/acknowledgements.html | 13 +- boost_typeindex/code_bloat.html | 10 +- boost_typeindex/compiler_support.html | 16 +- boost_typeindex/examples.html | 74 ++--- boost_typeindex/getting_started.html | 201 +++++++----- boost_typeindex/how_it_works.html | 58 ++++ boost_typeindex/making_own_type_index.html | 285 ++++++++++++++++++ .../mixing_sources_with_rtti_on_and_.html | 15 +- boost_typeindex/space_and_performance.html | 26 +- boost_typeindex_header_reference.html | 171 +++++------ index.html | 42 ++- standalone_HTML.manifest | 28 +- 38 files changed, 1780 insertions(+), 1252 deletions(-) delete mode 100644 BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP.html delete mode 100644 BOOST_TYPE_INDEX_CTTI_END_SKIP.html delete mode 100644 BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY.html delete mode 100644 BOOST_TYPE_INDEX_FUNCTION_SIGNATURE.html create mode 100644 BOOST_TYPE_INDEX_REGISTER_CLASS.html create mode 100644 BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS.html create mode 100644 BOOST_TYPE_INDEX_REGISTER_STL_CLASS.html create mode 100644 BOOST_TYPE_INDEX_USER_TYPEINDEX.html delete mode 100644 boost/template_id.html delete mode 100644 boost/template_id_with_cvr.html delete mode 100644 boost/template_index.html delete mode 100644 boost/template_info.html delete mode 100644 boost/type_id.html delete mode 100644 boost/type_id_rtti_on_idp5820176.html delete mode 100644 boost/type_id_rtti_on_idp5823984.html delete mode 100644 boost/type_id_with_cvr.html delete mode 100644 boost/type_index.html delete mode 100644 boost/type_info.html create mode 100644 boost/typeind/ctti_type_index.html create mode 100644 boost/typeind/stl_type_index.html create mode 100644 boost/typeind/type_id.html create mode 100644 boost/typeind/type_id_runtime.html create mode 100644 boost/typeind/type_id_with_cvr.html create mode 100644 boost/typeind/type_index.html create mode 100644 boost/typeind/type_index_facade.html create mode 100644 boost/typeind/type_info.html create mode 100644 boost_typeindex/how_it_works.html create mode 100644 boost_typeindex/making_own_type_index.html diff --git a/BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP.html b/BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP.html deleted file mode 100644 index e7577c5..0000000 --- a/BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Macro BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Macro BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP

-

BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP

-
-

Synopsis

-
// In header: <boost/type_index/template_info.hpp>
-
-BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP
-
-

Description

-

BOOST_TYPE_INDEX_FUNCTION_SIGNATURE, BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP and BOOST_TYPE_INDEX_CTTI_END_SKIP macroses are used for adding a support for compilers, that by default are not recognized by TypeIndex library.

-

See Compiler support for more info

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/BOOST_TYPE_INDEX_CTTI_END_SKIP.html b/BOOST_TYPE_INDEX_CTTI_END_SKIP.html deleted file mode 100644 index 215279a..0000000 --- a/BOOST_TYPE_INDEX_CTTI_END_SKIP.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Macro BOOST_TYPE_INDEX_CTTI_END_SKIP - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Macro BOOST_TYPE_INDEX_CTTI_END_SKIP

-

BOOST_TYPE_INDEX_CTTI_END_SKIP

-
-

Synopsis

-
// In header: <boost/type_index/template_info.hpp>
-
-BOOST_TYPE_INDEX_CTTI_END_SKIP
-
-

Description

-

BOOST_TYPE_INDEX_FUNCTION_SIGNATURE, BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP and BOOST_TYPE_INDEX_CTTI_END_SKIP macroses are used for adding a support for compilers, that by default are not recognized by TypeIndex library.

-

See Compiler support for more info

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY.html b/BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY.html deleted file mode 100644 index 280045f..0000000 --- a/BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY.html +++ /dev/null @@ -1,53 +0,0 @@ - - - -Macro BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Macro BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY

-

BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY

-
-

Synopsis

-
// In header: <boost/type_index/type_info.hpp>
-
-BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
-
-

Description

-

Define the BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro if you are mixing objects compiled with different RTTI flags. This will force the usage of boost::template_index class instead of boost::type_index.

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/BOOST_TYPE_INDEX_FUNCTION_SIGNATURE.html b/BOOST_TYPE_INDEX_FUNCTION_SIGNATURE.html deleted file mode 100644 index 4c943f3..0000000 --- a/BOOST_TYPE_INDEX_FUNCTION_SIGNATURE.html +++ /dev/null @@ -1,55 +0,0 @@ - - - -Macro BOOST_TYPE_INDEX_FUNCTION_SIGNATURE - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Macro BOOST_TYPE_INDEX_FUNCTION_SIGNATURE

-

BOOST_TYPE_INDEX_FUNCTION_SIGNATURE

-
-

Synopsis

-
// In header: <boost/type_index/template_info.hpp>
-
-BOOST_TYPE_INDEX_FUNCTION_SIGNATURE
-
-

Description

-

BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is used by boost::template_info class to deduce the name of a template parameter. If your compiler is not recognized by the TypeIndex library and you wish to work with boost::template_info, you may define this macro by yourself.

-

BOOST_TYPE_INDEX_FUNCTION_SIGNATURE must be defined to a compiler specific macro, that outputs the WHOLE function signature, including template parameters.

-

If your compiler is not recognised and BOOST_TYPE_INDEX_FUNCTION_SIGNATURE is not defined, then a compile-time error will arise at any attempt to use boost::template_info or boost::template_index classes.

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/BOOST_TYPE_INDEX_REGISTER_CLASS.html b/BOOST_TYPE_INDEX_REGISTER_CLASS.html new file mode 100644 index 0000000..396c7f5 --- /dev/null +++ b/BOOST_TYPE_INDEX_REGISTER_CLASS.html @@ -0,0 +1,76 @@ + + + +Macro BOOST_TYPE_INDEX_REGISTER_CLASS + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Macro BOOST_TYPE_INDEX_REGISTER_CLASS

+

BOOST_TYPE_INDEX_REGISTER_CLASS

+
+

Synopsis

+
// In header: <boost/type_index.hpp>
+
+BOOST_TYPE_INDEX_REGISTER_CLASS
+
+

Description

+

BOOST_TYPE_INDEX_REGISTER_CLASS is a helper macro that is used to help to emulate RTTI. Put this macro into the public section of polymorphic class to allow runtime type detection.

+

Depending on the typeid() availability this macro will expand to nothing or to virtual helper function virtual const type_info& type_id_runtime() const.

+

Example:

+
class A {
+public:
+    BOOST_TYPE_INDEX_REGISTER_CLASS
+    virtual ~A(){}
+};
+
+struct B: public A {
+    BOOST_TYPE_INDEX_REGISTER_CLASS
+};
+
+struct C: public B {
+    BOOST_TYPE_INDEX_REGISTER_CLASS
+};
+
+...
+
+C c1;
+A* pc1 = &c1;
+assert(boost::typeind::type_id<C>() == boost::typeind::type_id_runtime(*pc1));
+
+

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS.html b/BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS.html new file mode 100644 index 0000000..13e5aee --- /dev/null +++ b/BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS.html @@ -0,0 +1,54 @@ + + + +Macro BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Macro BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS

+

BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS

+
+

Synopsis

+
// In header: <boost/type_index/ctti_register_class.hpp>
+
+BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS
+
+

Description

+

BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS is used by BOOST_TYPE_INDEX_REGISTER_CLASS when RTTI is off and typeid() does not work.

+

BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS macro expands to declaration and implementation of virtual const detail::ctti_data& type_id_runtime() const method.

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/BOOST_TYPE_INDEX_REGISTER_STL_CLASS.html b/BOOST_TYPE_INDEX_REGISTER_STL_CLASS.html new file mode 100644 index 0000000..ca57b47 --- /dev/null +++ b/BOOST_TYPE_INDEX_REGISTER_STL_CLASS.html @@ -0,0 +1,54 @@ + + + +Macro BOOST_TYPE_INDEX_REGISTER_STL_CLASS + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Macro BOOST_TYPE_INDEX_REGISTER_STL_CLASS

+

BOOST_TYPE_INDEX_REGISTER_STL_CLASS

+
+

Synopsis

+
// In header: <boost/type_index/stl_register_class.hpp>
+
+BOOST_TYPE_INDEX_REGISTER_STL_CLASS
+
+

Description

+

BOOST_TYPE_INDEX_REGISTER_STL_CLASS is used by BOOST_TYPE_INDEX_REGISTER_CLASS when RTTI is off and typeid() does work.

+

BOOST_TYPE_INDEX_REGISTER_STL_CLASS macro expands to declaration and implementation of virtual const std::type_info& type_id_runtime() const method.

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/BOOST_TYPE_INDEX_USER_TYPEINDEX.html b/BOOST_TYPE_INDEX_USER_TYPEINDEX.html new file mode 100644 index 0000000..5d32266 --- /dev/null +++ b/BOOST_TYPE_INDEX_USER_TYPEINDEX.html @@ -0,0 +1,54 @@ + + + +Macro BOOST_TYPE_INDEX_USER_TYPEINDEX + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Macro BOOST_TYPE_INDEX_USER_TYPEINDEX

+

BOOST_TYPE_INDEX_USER_TYPEINDEX

+
+

Synopsis

+
// In header: <boost/type_index.hpp>
+
+BOOST_TYPE_INDEX_USER_TYPEINDEX
+
+

Description

+

BOOST_TYPE_INDEX_USER_TYPEINDEX can be defined to the path to header file with user provided implementation of type_index.

+

See "Making own type_index" section of documentation for usage example.

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/template_id.html b/boost/template_id.html deleted file mode 100644 index 6d84167..0000000 --- a/boost/template_id.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Function template template_id - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Function template template_id

-

boost::template_id

-
-

Synopsis

-
// In header: <boost/type_index/template_info.hpp>
-
-
-template<typename T> const template_info & template_id();
-
-

Description

-

Method for constructing template_info instance for type T. Strips const, volatile and & modifiers from T.

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/template_id_with_cvr.html b/boost/template_id_with_cvr.html deleted file mode 100644 index a10a27b..0000000 --- a/boost/template_id_with_cvr.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Function template template_id_with_cvr - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Function template template_id_with_cvr

-

boost::template_id_with_cvr

-
-

Synopsis

-
// In header: <boost/type_index/template_info.hpp>
-
-
-template<typename T> const template_info & template_id_with_cvr();
-
-

Description

-

Method for constructing template_info instance for type T. Does not strip const, volatile and & modifiers from T. If T has no const, volatile, & and && modifiers, then returns exactly the same result as in case of calling template_id<T>().

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/template_index.html b/boost/template_index.html deleted file mode 100644 index 7734882..0000000 --- a/boost/template_index.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Type definition template_index - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Type definition template_index

-

template_index

-
-

Synopsis

-
// In header: <boost/type_index/template_index.hpp>
-
-
-typedef template_info template_index;
-
-

Description

-

boost::template_index is just a typedef of boost::template_info, that combines functionality of boost::type_info and boost::type_index but can work with RTTI disabled.

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/template_info.html b/boost/template_info.html deleted file mode 100644 index 18f0d80..0000000 --- a/boost/template_info.html +++ /dev/null @@ -1,120 +0,0 @@ - - - -Class template_info - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Class template_info

-

boost::template_info

-
-

Synopsis

-
// In header: <boost/type_index/template_info.hpp>
-
-
-class template_info {
-public:
-  // construct/copy/destruct
-  template_info() noexcept;
-
-  // public member functions
-  bool before(const template_info &) const noexcept;
-  const char * name() const noexcept;
-  std::string name_demangled() const;
-  bool operator==(const template_info &) const noexcept;
-  bool operator!=(const template_info &) const noexcept;
-  bool operator<(const template_info &) const noexcept;
-  bool operator>(const template_info &) const noexcept;
-  bool operator<=(const template_info &) const noexcept;
-  bool operator>=(const template_info &) const noexcept;
-  std::size_t hash_code() const noexcept;
-
-  // public static functions
-  template<typename T> static const template_info & construct();
-  template<typename T> static const template_info & construct_with_cvr();
-};
-
-

Description

-

Copyable type_info class that does not require RTTI. When RTTI is disabled this class will be used instead of boost::type_info and boost::type_index.

-
-

-template_info - public - construct/copy/destruct

-
  1. -
    template_info() noexcept;
    Default constructor.
-
-
-

-template_info public member functions

-
    -
  1. -
    bool before(const template_info & rhs) const noexcept;
    -

    Returns true if the type precedes the type of rhs in the collation order. The collation order is just an internal order.

    -
  2. -
  3. -
    const char * name() const noexcept;
    Returns raw name.
  4. -
  5. -
    std::string name_demangled() const;
    Returns user-friendly name.
  6. -
  7. bool operator==(const template_info & rhs) const noexcept;
  8. -
  9. bool operator!=(const template_info & rhs) const noexcept;
  10. -
  11. bool operator<(const template_info & rhs) const noexcept;
  12. -
  13. bool operator>(const template_info & rhs) const noexcept;
  14. -
  15. bool operator<=(const template_info & rhs) const noexcept;
  16. -
  17. bool operator>=(const template_info & rhs) const noexcept;
  18. -
  19. -
    std::size_t hash_code() const noexcept;
    Function for getting hash value.
  20. -
-
-
-

-template_info public static functions

-
    -
  1. -
    template<typename T> static const template_info & construct();
    -

    Factory method for constructing boost::template_info instance for type T. Strips const, volatile and & modifiers from T.

    -

    Works exactly like boost::template_id().

    -
  2. -
  3. -
    template<typename T> static const template_info & construct_with_cvr();
    -

    Factory method for constructing template_info instance for type T. Does not strip const, volatile and & modifiers from T.

    -

    Works exactly like boost::template_id_with_cvr().

    -
  4. -
-
-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/type_id.html b/boost/type_id.html deleted file mode 100644 index e58dc6f..0000000 --- a/boost/type_id.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Function template type_id - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Function template type_id

-

boost::type_id

-
-

Synopsis

-
// In header: <boost/type_index/type_info.hpp>
-
-
-template<typename T> const type_info & type_id();
-
-

Description

-

Function to get boost::type_info for a type T. Strips const, volatile and & modifiers from T.

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/type_id_rtti_on_idp5820176.html b/boost/type_id_rtti_on_idp5820176.html deleted file mode 100644 index 452a4eb..0000000 --- a/boost/type_id_rtti_on_idp5820176.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Function template type_id_rtti_only - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Function template type_id_rtti_only

-

boost::type_id_rtti_only

-
-

Synopsis

-
// In header: <boost/type_index/type_info.hpp>
-
-
-template<typename T> const type_info & type_id_rtti_only(T & rtti_val);
-
-

Description

-

Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_info. This method available only with RTTI enabled. Without RTTI support it won't compile, producing a compile-time error with message: "boost::type_id_rtti_only(T&) requires RTTI"

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/type_id_rtti_on_idp5823984.html b/boost/type_id_rtti_on_idp5823984.html deleted file mode 100644 index 8bea982..0000000 --- a/boost/type_id_rtti_on_idp5823984.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Function template type_id_rtti_only - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Function template type_id_rtti_only

-

boost::type_id_rtti_only

-
-

Synopsis

-
// In header: <boost/type_index/type_info.hpp>
-
-
-template<typename T> const type_info & type_id_rtti_only(T * rtti_val);
-
-

Description

-

Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_info. This method available only with RTTI enabled. Without RTTI support it won't compile, producing a compile-time error with message: "boost::type_id_rtti_only(T*) requires RTTI"

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/type_id_with_cvr.html b/boost/type_id_with_cvr.html deleted file mode 100644 index 5715084..0000000 --- a/boost/type_id_with_cvr.html +++ /dev/null @@ -1,54 +0,0 @@ - - - -Function template type_id_with_cvr - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Function template type_id_with_cvr

-

boost::type_id_with_cvr

-
-

Synopsis

-
// In header: <boost/type_index/type_info.hpp>
-
-
-template<typename T> const type_info & type_id_with_cvr();
-
-

Description

-

Function for constructing boost::type_info instance for type T. Does not strip const, volatile, & and && modifiers from T. If T has no const, volatile, & and && modifiers, then returns exactly the same result as in case of calling type_id<T>().

-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/type_index.html b/boost/type_index.html deleted file mode 100644 index bd499e0..0000000 --- a/boost/type_index.html +++ /dev/null @@ -1,121 +0,0 @@ - - - -Class type_index - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Class type_index

-

boost::type_index

-
-

Synopsis

-
// In header: <boost/type_index/type_index.hpp>
-
-
-class type_index {
-public:
-  // construct/copy/destruct
-  type_index() noexcept;
-  type_index(const type_info &) noexcept;
-  type_index(const std::type_info &) noexcept;
-
-  // public member functions
-  bool before(type_index const &) const noexcept;
-  const char * name() const noexcept;
-  std::string name_demangled() const;
-  bool operator==(type_index const &) const noexcept;
-  bool operator!=(type_index const &) const noexcept;
-  bool operator<(type_index const &) const noexcept;
-  bool operator>(type_index const &) const noexcept;
-  bool operator<=(type_index const &) const noexcept;
-  bool operator>=(type_index const &) const noexcept;
-  bool operator==(std::type_info const &) const noexcept;
-  bool operator!=(std::type_info const &) const noexcept;
-  bool operator<(std::type_info const &) const noexcept;
-  bool operator>(std::type_info const &) const noexcept;
-  bool operator<=(std::type_info const &) const noexcept;
-  bool operator>=(std::type_info const &) const noexcept;
-  std::size_t hash_code() const noexcept;
-};
-
-

Description

-

This class is designed to be a drop-in replacement for C++11 std::type_index class.

-

Copyable std::type_index class that requires RTTI. When RTTI is disabled boost::template_index will be used instead of this class.

-
-

-type_index - public - construct/copy/destruct

-
    -
  1. -
    type_index() noexcept;
    Default constructor.
  2. -
  3. -
    type_index(const type_info & inf) noexcept;
    Constructs type_index from an instance of boost::type_info.
  4. -
  5. -
    type_index(const std::type_info & inf) noexcept;
    Constructs type_index from an instance of std::type_info.
  6. -
-
-
-

-type_index public member functions

-
    -
  1. -
    bool before(type_index const & rhs) const noexcept;
    -

    Returns true if the type precedes the type of rhs in the collation order. The collation order is just an internal order.

    -
  2. -
  3. -
    const char * name() const noexcept;
    Returns raw name.
  4. -
  5. -
    std::string name_demangled() const;
    Returns user-friendly name.
  6. -
  7. bool operator==(type_index const & rhs) const noexcept;
  8. -
  9. bool operator!=(type_index const & rhs) const noexcept;
  10. -
  11. bool operator<(type_index const & rhs) const noexcept;
  12. -
  13. bool operator>(type_index const & rhs) const noexcept;
  14. -
  15. bool operator<=(type_index const & rhs) const noexcept;
  16. -
  17. bool operator>=(type_index const & rhs) const noexcept;
  18. -
  19. bool operator==(std::type_info const & rhs) const noexcept;
  20. -
  21. bool operator!=(std::type_info const & rhs) const noexcept;
  22. -
  23. bool operator<(std::type_info const & rhs) const noexcept;
  24. -
  25. bool operator>(std::type_info const & rhs) const noexcept;
  26. -
  27. bool operator<=(std::type_info const & rhs) const noexcept;
  28. -
  29. bool operator>=(std::type_info const & rhs) const noexcept;
  30. -
  31. -
    std::size_t hash_code() const noexcept;
    Function for getting hash value.
  32. -
-
-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/type_info.html b/boost/type_info.html deleted file mode 100644 index a48b876..0000000 --- a/boost/type_info.html +++ /dev/null @@ -1,151 +0,0 @@ - - - -Class type_info - - - - - - - - - - - - - - - -
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
-
-
-PrevUpHomeNext -
-
-
-
-

Class type_info

-

boost::type_info

-
-

Synopsis

-
// In header: <boost/type_index/type_info.hpp>
-
-
-class type_info {
-public:
-  // construct/copy/destruct
-  type_info();
-  type_info(const type_info &);
-
-  // public static functions
-  template<typename T> static const boost::type_info & construct() noexcept;
-  template<typename T> 
-    static const boost::type_info & construct_with_cvr() noexcept;
-  template<typename T> 
-    static const type_info & construct_rtti_only(T &) noexcept;
-  template<typename T> static const type_info & construct_rtti_only(T *);
-
-  // public member functions
-  const char * name() const noexcept;
-  std::string name_demangled() const;
-  bool operator==(type_info const &) const noexcept;
-  bool operator!=(type_info const &) const noexcept;
-  bool operator==(std::type_info const &) const noexcept;
-  bool operator!=(std::type_info const &) const noexcept;
-  bool before(type_info const &) const noexcept;
-  bool before(std::type_info const &) const noexcept;
-  std::size_t hash_code() const noexcept;
-};
-
-

Description

-

boost::type_info is a class that can be used as a drop-in replacement for std::type_info.

-

boost::type_info class is used in situations when RTTI is enabled. When RTTI is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined boost::template_info is used instead of it.

-

Unlike std::type_info this class:

-
    -
  • has a name_demangled() function for getting human-readable type names

  • -
  • name() function always noexcept and returns simple mangled name as character a character array

  • -
  • contains workarounds for some compiler issues

  • -
-

-

-

boost::type_info is not copyable and is not default constructible. Use boost::type_id* functions to get const references to instances of boost::type_info objects.

-
-

-type_info - public - construct/copy/destruct

-
    -
  1. type_info();
  2. -
  3. type_info(const type_info &);
  4. -
-
-
-

-type_info public static functions

-
    -
  1. -
    template<typename T> static const boost::type_info & construct() noexcept;
    -

    Factory method for constructing boost::type_info instance for type T. Strips const, volatile and & modifiers from T.

    -

    Works exactly like boost::type_id().

    -
  2. -
  3. -
    template<typename T> 
    -  static const boost::type_info & construct_with_cvr() noexcept;
    -

    Factory method for constructing boost::type_info instance for type T. Does not strip const, volatile, & and && modifiers from T. If T has no const, volatile, & and && modifiers, then returns exactly the same result as in case of calling construct<T>().

    -

    Works exactly like boost::type_id_with_cvr().

    -
  4. -
  5. -
    template<typename T> 
    -  static const type_info & construct_rtti_only(T & rtti_val) noexcept;
    -

    Factory function, that works exactly like C++ typeid(rtti_val) call, but returns boost::type_info. This method available only with RTTI enabled.

    -

    Same as boost::type_id_rtti_only().

    -
  6. -
  7. -
    template<typename T> 
    -  static const type_info & construct_rtti_only(T * rtti_val);
    -

    Factory function, that works exactly like C++ typeid(rtti_val) call, but returns boost::type_info. This method available only with RTTI enabled.

    -

    Same as boost::type_id_rtti_only().

    -
  8. -
-
-
-

-type_info public member functions

-
    -
  1. -
    const char * name() const noexcept;
    Returns mangled type name.
  2. -
  3. -
    std::string name_demangled() const;
    Returns user-friendly name.
  4. -
  5. bool operator==(type_info const & rhs) const noexcept;
  6. -
  7. bool operator!=(type_info const & rhs) const noexcept;
  8. -
  9. bool operator==(std::type_info const & rhs) const noexcept;
  10. -
  11. bool operator!=(std::type_info const & rhs) const noexcept;
  12. -
  13. -
    bool before(type_info const & rhs) const noexcept;
    -

    Returns true if the type precedes the type of rhs in the collation order. The collation order is just an internal order. Works exactly like operator <

    -
  14. -
  15. -
    bool before(std::type_info const & rhs) const noexcept;
    -

    Returns true if the type precedes the type of rhs in the collation order. The collation order is just an internal order. Works exactly like operator <

    -
  16. -
  17. -
    std::size_t hash_code() const noexcept;
    Function for getting hash value.
  18. -
-
-
-
- - - -
-
-
-PrevUpHomeNext -
- - diff --git a/boost/typeind/ctti_type_index.html b/boost/typeind/ctti_type_index.html new file mode 100644 index 0000000..e8bd99e --- /dev/null +++ b/boost/typeind/ctti_type_index.html @@ -0,0 +1,105 @@ + + + +Class ctti_type_index + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Class ctti_type_index

+

boost::typeind::ctti_type_index

+
+

Synopsis

+
// In header: <boost/type_index/ctti_type_index.hpp>
+
+
+class ctti_type_index {
+public:
+  // types
+  typedef unspecified type_info_t;
+
+  // construct/copy/destruct
+  ctti_type_index() noexcept;
+  ctti_type_index(const type_info_t &) noexcept;
+
+  // public member functions
+  const type_info_t & type_info() const noexcept;
+  const char * raw_name() const noexcept;
+  std::string pretty_name() const;
+  std::size_t hash_code() const noexcept;
+
+  // public static functions
+  template<typename T> static ctti_type_index type_id() noexcept;
+  template<typename T> static ctti_type_index type_id_with_cvr() noexcept;
+  template<typename T> 
+    static ctti_type_index type_id_runtime(const T &) noexcept;
+};
+
+

Description

+

This class is a wrapper that pretends to work exactly like stl_type_info, but does not require RTTI support. For description of functions see type_index_facade.

+

This class produces slightly longer type names, so consider using stl_type_index in situations when typeid() is working.

+
+

+ctti_type_index + public + construct/copy/destruct

+
    +
  1. ctti_type_index() noexcept;
  2. +
  3. ctti_type_index(const type_info_t & data) noexcept;
  4. +
+
+
+

+ctti_type_index public member functions

+
    +
  1. const type_info_t & type_info() const noexcept;
  2. +
  3. const char * raw_name() const noexcept;
  4. +
  5. std::string pretty_name() const;
  6. +
  7. std::size_t hash_code() const noexcept;
  8. +
+
+
+

+ctti_type_index public static functions

+
    +
  1. template<typename T> static ctti_type_index type_id() noexcept;
  2. +
  3. template<typename T> static ctti_type_index type_id_with_cvr() noexcept;
  4. +
  5. template<typename T> 
    +  static ctti_type_index type_id_runtime(const T & variable) noexcept;
  6. +
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/typeind/stl_type_index.html b/boost/typeind/stl_type_index.html new file mode 100644 index 0000000..9158ec5 --- /dev/null +++ b/boost/typeind/stl_type_index.html @@ -0,0 +1,113 @@ + + + +Class stl_type_index + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Class stl_type_index

+

boost::typeind::stl_type_index

+
+

Synopsis

+
// In header: <boost/type_index/stl_type_index.hpp>
+
+
+class stl_type_index :
+  public boost::typeind::type_index_facade< stl_type_index, std::type_info >
+{
+public:
+  // types
+  typedef std::type_info type_info_t;
+
+  // construct/copy/destruct
+  stl_type_index() noexcept;
+  stl_type_index(const type_info_t &) noexcept;
+
+  // public member functions
+  const type_info_t & type_info() const noexcept;
+  const char * raw_name() const noexcept;
+  const char * name() const noexcept;
+  std::string pretty_name() const;
+  std::size_t hash_code() const noexcept;
+  bool equal(const stl_type_index &) const noexcept;
+  bool before(const stl_type_index &) const noexcept;
+
+  // public static functions
+  template<typename T> static stl_type_index type_id() noexcept;
+  template<typename T> static stl_type_index type_id_with_cvr() noexcept;
+  template<typename T> 
+    static stl_type_index type_id_runtime(const T &) noexcept;
+};
+
+

Description

+

This class is a wrapper around std::type_info, that workarounds issues and provides much more rich interface. For description of functions see type_index_facade.

+

This class requires typeid() to work. For cases when RTTI is disabled see ctti_type_index.

+
+

+stl_type_index + public + construct/copy/destruct

+
    +
  1. stl_type_index() noexcept;
  2. +
  3. stl_type_index(const type_info_t & data) noexcept;
  4. +
+
+
+

+stl_type_index public member functions

+
    +
  1. const type_info_t & type_info() const noexcept;
  2. +
  3. const char * raw_name() const noexcept;
  4. +
  5. const char * name() const noexcept;
  6. +
  7. std::string pretty_name() const;
  8. +
  9. std::size_t hash_code() const noexcept;
  10. +
  11. bool equal(const stl_type_index & rhs) const noexcept;
  12. +
  13. bool before(const stl_type_index & rhs) const noexcept;
  14. +
+
+
+

+stl_type_index public static functions

+
    +
  1. template<typename T> static stl_type_index type_id() noexcept;
  2. +
  3. template<typename T> static stl_type_index type_id_with_cvr() noexcept;
  4. +
  5. template<typename T> 
    +  static stl_type_index type_id_runtime(const T & value) noexcept;
  6. +
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/typeind/type_id.html b/boost/typeind/type_id.html new file mode 100644 index 0000000..93a9f02 --- /dev/null +++ b/boost/typeind/type_id.html @@ -0,0 +1,85 @@ + + + +Function template type_id + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Function template type_id

+

boost::typeind::type_id

+
+

Synopsis

+
// In header: <boost/type_index.hpp>
+
+
+template<typename T> type_index type_id();
+
+

Description

+

Function to get boost::type_index for a type T. Removes const, volatile && and & modifiers from T.

+

Example:

+
type_index ti = type_id<int&>();
+std::cout << ti.pretty_name();  // Outputs 'int'
+
+

+ + +

+
++ + + + + + + + + + + + + + +

Template Parameters:

++ + + + +

T

Type for which type_index must be created.

Returns:

boost::typeind::type_index with information about the specified type T.

Throws:

Nothing.
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/typeind/type_id_runtime.html b/boost/typeind/type_id_runtime.html new file mode 100644 index 0000000..99e0d09 --- /dev/null +++ b/boost/typeind/type_id_runtime.html @@ -0,0 +1,92 @@ + + + +Function template type_id_runtime + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Function template type_id_runtime

+

boost::typeind::type_id_runtime

+
+

Synopsis

+
// In header: <boost/type_index.hpp>
+
+
+template<typename T> type_index type_id_runtime(const T & runtime_val);
+
+

Description

+

Function that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index.

+

Retunrs runtime information about specified type.

+

Requirements: RTTI available or Base and Derived classes must be marked with BOOST_TYPE_INDEX_REGISTER_CLASS.

+

Example:

+
struct Base { virtual ~Base(){} };
+struct Derived: public Base  {};
+...
+Derived d;
+Base& b = d;
+type_index ti = type_id_runtime(b);
+std::cout << ti.pretty_name();  // Outputs 'Derived'
+
+

+ + +

+
++ + + + + + + + + + + + + + +

Parameters:

++ + + + +

runtime_val

Varaible which runtime type must be returned.

Returns:

boost::typeind::type_index with information about the specified variable.

Throws:

Nothing.
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/typeind/type_id_with_cvr.html b/boost/typeind/type_id_with_cvr.html new file mode 100644 index 0000000..99253aa --- /dev/null +++ b/boost/typeind/type_id_with_cvr.html @@ -0,0 +1,86 @@ + + + +Function template type_id_with_cvr + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Function template type_id_with_cvr

+

boost::typeind::type_id_with_cvr

+
+

Synopsis

+
// In header: <boost/type_index.hpp>
+
+
+template<typename T> type_index type_id_with_cvr();
+
+

Description

+

Function for constructing boost::type_index instance for type T. Does not remove const, volatile, & and && modifiers from T.

+

If T has no const, volatile, & and && modifiers, then returns exactly the same result as in case of calling type_id<T>().

+

Example:

+
type_index ti = type_id_with_cvr<int&>();
+std::cout << ti.pretty_name();  // Outputs 'int&'
+
+

+ + +

+
++ + + + + + + + + + + + + + +

Template Parameters:

++ + + + +

T

Type for which type_index must be created.

Returns:

boost::typeind::type_index with information about the specified type T.

Throws:

Nothing.
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/typeind/type_index.html b/boost/typeind/type_index.html new file mode 100644 index 0000000..a6de3ef --- /dev/null +++ b/boost/typeind/type_index.html @@ -0,0 +1,55 @@ + + + +Type definition type_index + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Type definition type_index

+

type_index

+
+

Synopsis

+
// In header: <boost/type_index.hpp>
+
+
+typedef platform specific type_index;
+
+

Description

+

Depending on a compiler flags, optimal implementation of type_index will be used as a default boost::typeind::type_index.

+

Could be a boost::typeind::stl_type_index, boost::typeind::ctti_type_index or user defined type_index class.

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/typeind/type_index_facade.html b/boost/typeind/type_index_facade.html new file mode 100644 index 0000000..8b0efaf --- /dev/null +++ b/boost/typeind/type_index_facade.html @@ -0,0 +1,277 @@ + + + +Class template type_index_facade + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Class template type_index_facade

+

boost::typeind::type_index_facade

+
+

Synopsis

+
// In header: <boost/type_index/type_index_facade.hpp>
+
+template<typename Derived, typename TypeInfo> 
+class type_index_facade {
+public:
+  // types
+  typedef TypeInfo type_info_t;
+
+  // public member functions
+  const type_info_t & type_info() const noexcept;
+  const char * raw_name() const noexcept;
+  std::string pretty_name() const;
+  const char * name() const noexcept;
+  bool equal(const Derived &) const noexcept;
+  bool before(const Derived &) const noexcept;
+  std::size_t hash_code() const noexcept;
+
+  // protected static functions
+  template<typename T> static Derived type_id() noexcept;
+  template<typename T> static Derived type_id_with_cvr() noexcept;
+  template<typename T> static Derived type_id_runtime(const T &) noexcept;
+};
+
+

Description

+

This class takes care about the comparison operators, hash functions and ostream operators. Use this class as a public base class for defining new type_info-conforming classes.

+

Example:

+
class stl_type_index: public type_index_facade<stl_type_index, std::type_info> 
+{
+public:
+    typedef std::type_info type_info_t;
+private:
+    const type_info_t* data_;
+
+public:
+    stl_type_index(const type_info_t& data) noexcept
+        : data_(&data)
+    {}
+// ...
+};
+
+

+

+
+

Template Parameters

+
    +
  1. +
    typename Derived
    +

    Class derived from type_index_facade.

    +
  2. +
  3. +
    typename TypeInfo
    +

    Class that will be used as a base type_info class.

    +
  4. +
+
+
+

+type_index_facade public member functions

+
    +
  1. +
    const type_info_t & type_info() const noexcept;
    +

    Override: This function must be redefined in Derived class. Overrides must not throw. +

    +
    ++ + + + +

    Returns:

    Const reference to underlying low level type_info_t.

    +
  2. +
  3. +
    const char * raw_name() const noexcept;
    +

    Override: This function must be redefined in Derived class. Overrides must not throw. +

    +
    ++ + + + +

    Returns:

    Pointer to unredable/raw type name.

    +
  4. +
  5. +
    std::string pretty_name() const;
    +

    Override: This function must be redefined in Derived class. Overrides may throw. +

    +
    ++ + + + +

    Returns:

    Human redable type name.

    +
  6. +
  7. +
    const char * name() const noexcept;
    +

    Override: This function may be redefined in Derived class. Overrides must not throw. +

    +
    ++ + + + +

    Returns:

    Name of a type. By default retuns raw_name().

    +
  8. +
  9. +
    bool equal(const Derived & rhs) const noexcept;
    +

    Override: This function may be redefined in Derived class. Overrides must not throw. +

    +
    ++ + + + +

    Returns:

    True if two types are equal. By default compares types by raw_name().

    +
  10. +
  11. +
    bool before(const Derived & rhs) const noexcept;
    +

    Override: This function may be redefined in Derived class. Overrides must not throw. +

    +
    ++ + + + +

    Returns:

    True if rhs is greater than this. By default compares types by raw_name().

    +
  12. +
  13. +
    std::size_t hash_code() const noexcept;
    +

    Override: This function may be redefined in Derived class. Overrides must not throw. +

    +
    ++ + + + +

    Returns:

    Hash code of a type. By default hashes types by raw_name().

    +
  14. +
+
+
+

+type_index_facade protected static functions

+
    +
  1. +
    template<typename T> static Derived type_id() noexcept;
    +

    This is a factory method that is used to create instances of Derived classes. boost::typeind::type_id() will call this method, if Derived has same type as boost::typeind::type_index.

    +

    Override: This function may be redefined and made public in Derived class. Overrides must not throw. Overrides must remove const, volatile && and & modifiers from T. + +

    +
    ++ + + + + + + + + + +

    Template Parameters:

    ++ + + + +

    T

    Type for which type_index must be created.

    Returns:

    type_index for type T.

    +
  2. +
  3. +
    template<typename T> static Derived type_id_with_cvr() noexcept;
    +

    This is a factory method that is used to create instances of Derived classes. boost::typeind::type_id_with_cvr() will call this method, if Derived has same type as boost::typeind::type_index.

    +

    Override: This function may be redefined and made public in Derived class. Overrides must not throw. Overrides must not remove const, volatile && and & modifiers from T. + +

    +
    ++ + + + + + + + + + +

    Template Parameters:

    ++ + + + +

    T

    Type for which type_index must be created.

    Returns:

    type_index for type T.

    +
  4. +
  5. +
    template<typename T> 
    +  static Derived type_id_runtime(const T & variable) noexcept;
    +

    This is a factory method that is used to create instances of Derived classes. boost::typeind::type_id_runtime(const T&) will call this method, if Derived has same type as boost::typeind::type_index.

    +

    Override: This function may be redefined and made public in Derived class. + +

    +
    ++ + + + + + + + + + +

    Parameters:

    ++ + + + +

    variable

    Variable which runtime type will be stored in type_index.

    Returns:

    type_index with runtime type of variable.

    +
  6. +
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost/typeind/type_info.html b/boost/typeind/type_info.html new file mode 100644 index 0000000..8c875c5 --- /dev/null +++ b/boost/typeind/type_info.html @@ -0,0 +1,56 @@ + + + +Type definition type_info + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Type definition type_info

+

type_info

+
+

Synopsis

+
// In header: <boost/type_index.hpp>
+
+
+typedef type_index::type_info_t type_info;
+
+

Description

+

Depending on a compiler flags, optimal implementation of type_info will be used as a default boost::typeind::type_info.

+

Could be a std::type_info, boost::typeind::detail::ctti_data or some user defined class.

+

type_info is not copyable or default constructible. It is not assignable too!

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost_typeindex/acknowledgements.html b/boost_typeindex/acknowledgements.html index 363ab53..714278d 100644 --- a/boost_typeindex/acknowledgements.html +++ b/boost_typeindex/acknowledgements.html @@ -4,8 +4,8 @@ Acknowledgements - - + + @@ -30,20 +30,21 @@

-

- Without RTTI TypeIndex library will switch from using boost::type_info - class to boost::template_info. boost::template_info + Without RTTI TypeIndex library will switch from using boost::typeind::stl_type_info + class to boost::typeind::ctti_type_info. boost::typeind::ctti_type_info uses macro for getting full text representation of function name for each type that is passed to type_id() and type_id_with_cvr() @@ -50,7 +50,7 @@ -

- TypeIndex has been tested and successfully work on MSVC2010, GCC-4.5, Clang-2.9. + TypeIndex has been tested and successfully work on MSVC2010, GCC-4.6, Clang-2.9. If your compiler is not in a list of tested compilers, you must correctly define BOOST_TYPE_INDEX_FUNCTION_SIGNATURE, BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP @@ -77,18 +77,18 @@

With BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP and BOOST_TYPE_INDEX_CTTI_END_SKIP - set to 0, boost::template_id<int>().name() returns - "const char *__cdecl boost::detail::ctti<int>::n(void)". Then - you shall set BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP + set to 0, boost::typeind::ctti_type_info::construct<int>().raw_name() + returns "const char *__cdecl boost::detail::ctti<int>::n(void)". + Then you shall set BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP to sizeof("const char *__cdecl boost::detail::ctti<") - 1 and BOOST_TYPE_INDEX_CTTI_END_SKIP to sizeof(">::n(void)") - - 1 + - 1.

-

-PrevUpHomeNext +PrevUpHomeNext

@@ -45,13 +45,14 @@ The following example shows how short (mangled) and human readable type names could be obtained from a type. Works with and without RTTI.

-
#include <boost/type_index/type_info.hpp>
+
#include <boost/type_index.hpp>
 #include <iostream>
+namespace bti = boost::typeind;
 
 template <class T>
 void foo(T) {
-    std::cout << "\n Short name: " << boost::type_id<T>().name();
-    std::cout << "\n Readable name: " << boost::type_id<T>().name_demangled();
+    std::cout << "\n Short name: " << bti::type_id<T>().raw_name();
+    std::cout << "\n Readable name: " << bti::type_id<T>().pretty_name();
 }
 
 struct user_defined_type{};
@@ -92,27 +93,29 @@
         The following example shows how an information about a type could be stored.
         Example works with and without RTTI.
       

-
#include <boost/type_index/type_index.hpp>
+
#include <boost/type_index.hpp>
 #include <boost/unordered_set.hpp>
+#include <boost/functional/hash.hpp>
 #include <cassert>
+namespace bti = boost::typeind;
 
 int main() {
-    boost::unordered_set<boost::type_index> types;
+    boost::unordered_set<bti::type_index> types;
 
     // Storing some `boost::type_info`s
-    types.insert(boost::type_id<int>());
-    types.insert(boost::type_id<float>());
+    types.insert(bti::type_id<int>());
+    types.insert(bti::type_id<float>());
 
     // `types` variable contains two `boost::type_index`es:
     assert(types.size() == 2);
 
     // Const, volatile and reference will be striped from the type:
-    bool is_inserted = types.insert(boost::type_id<const int>()).second;
+    bool is_inserted = types.insert(bti::type_id<const int>()).second;
     assert(!is_inserted);
-    assert(types.erase(boost::type_id<float&>()) == 1);
+    assert(types.erase(bti::type_id<float&>()) == 1);
 
     // We have erased the `float` type, only `int` remains
-    assert(*types.begin() == boost::type_id<int>());
+    assert(*types.begin() == bti::type_id<int>());
 }
 

@@ -122,23 +125,25 @@ through the inheritance to receive a real type name

- The following example shows that boost::type_info + The following example shows that type_info is able to store the real type, successfully getting through all the inheritances.

- Example works with RTTI only. Without RTTI support it won't compile, producing - a compile-time error with message: "boost::type_id_rtti_only(T&) - requires RTTI" + Example works with and without RTTI."

-
#include <boost/type_index/type_info.hpp>
+
#include <boost/type_index.hpp>
 #include <iostream>
+namespace bti = boost::typeind;
 
-struct A { virtual ~A(){} };
-struct B: public A {};
-struct C: public B {};
+struct A {
+    BOOST_TYPE_INDEX_REGISTER_CLASS
+    virtual ~A(){}
+};
+struct B: public A { BOOST_TYPE_INDEX_REGISTER_CLASS };
+struct C: public B { BOOST_TYPE_INDEX_REGISTER_CLASS };
 
 void print_real_type(const A& a) {
-    std::cout << boost::type_id_rtti_only(a).name_demangled() << '\n';
+    std::cout << bti::type_id_runtime(a).pretty_name() << '\n';
 }
 
 int main() {
@@ -155,10 +160,10 @@
       type match: storing type with const, volatile and reference 
 
 

- The following example shows that boost::type_index - (and boost::type_info) is able to store the exact type, - without stripping const, volatile and references. Example works with and - without RTTI. + The following example shows that type_index + (and type_info) is able to + store the exact type, without stripping const, volatile and references. Example + works with and without RTTI.

In this example we'll create a class, that stores pointer to function and @@ -166,25 +171,26 @@ to call the stored function will be made, type of input parameter will be checked for exact match with initaily erased type of function.

-
#include <boost/type_index/type_index.hpp>
+
#include <boost/type_index.hpp>
 #include <iostream>
 #include <stdexcept>
 #include <cassert>
+namespace bti = boost::typeind;
 
 class type_erased_unary_function {
-    void*                   function_ptr_;
-    boost::type_index       exact_param_t_;
+    void*               function_ptr_;
+    bti::type_index     exact_param_t_;
 
 public:
     template <class ParamT>
     type_erased_unary_function(void(*ptr)(ParamT))
         : function_ptr_(reinterpret_cast<void*>(ptr)) // ptr - is a pointer to function returning `void` and accepting parameter of type `ParamT`
-        , exact_param_t_(boost::type_id_with_cvr<ParamT>())
+        , exact_param_t_(bti::type_id_with_cvr<ParamT>())
     {}
 
     template <class ParamT>
     void call(ParamT v) {
-        if (exact_param_t_ != boost::type_id_with_cvr<ParamT>()) {
+        if (exact_param_t_ != bti::type_id_with_cvr<ParamT>()) {
             throw std::runtime_error("Incorrect `ParamT`");
         }
 
@@ -212,7 +218,7 @@
 
 
-

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/boost_typeindex/getting_started.html b/boost_typeindex/getting_started.html index 5ce43a3..67f6dbc 100644 --- a/boost_typeindex/getting_started.html +++ b/boost_typeindex/getting_started.html @@ -4,10 +4,10 @@ Getting started - - - - + + + + @@ -20,43 +20,59 @@

-PrevUpHomeNext +PrevUpHomeNext
+

- boost::type_info is a drop-in replacement for std::type_info - and boost::type_index is a drop-in replacement for + boost::typeind::type_info is a drop-in replacement for std::type_info + and boost::typeind::type_index is a drop-in replacement for std::type_index. Unlike Standard Library versions those classes may work without RTTI.

- boost::type_index provides the full set of comparison - operators, hashing functions and ostream operators, so it can be used with - any container class. + type_index provides the full + set of comparison operators, hashing functions and ostream operators, so it + can be used with any container class.

- To start using Boost.TypeIndex: + Through all the examples, we'll assume that the following namespace alias is + in effect:

+
namespace bti = boost::typeind;
+
+ +

+ To start using Boost.TypeIndex: +

- +
+

+ Replace this: +

+ +

+ With the following: +

+ @@ -64,29 +80,32 @@
#include <typeinfo>
 #include <typeindex>
 
- + + + + + + + + + +
-

- Replace this: -

-
-

- With the following: -

-
-
#include <boost/type_index/type_info.hpp>
-#include <boost/type_index/type_index.hpp>
-
-

- or -

#include <boost/type_index.hpp>
 
-
-
std::type_info
-std::type_index
+
std::type_index
 
-
-
boost::type_info
-boost::type_index
+
bti::type_index
 
-
+
const std::type_info&
+
+
+
const bti::type_info&   // when reference to `std::type_info` is required
+bti::type_index         // other cases
+
+
@@ -95,47 +114,58 @@ typeid(T).name() // not human readable typeid(variable) - -
boost::type_id<T>()
-boost::type_id_with_cvr<T>()
-boost::type_id<T>().name_demangled() // human readable
-boost::type_id_rtti_only(variable)
+
bti::type_id<T>()
+bti::type_id_with_cvr<T>()
+bti::type_id<T>().pretty_name() // human readable
+bti::type_id_runtime(variable)
 
-

- Here is how TypeIndex could be used in boost/any.hpp: -

+ If you are using type_id_runtime() methods and RTTI is disabled, make sure + that classes that are passed to type_id_runtime() are marked with BOOST_TYPE_INDEX_REGISTER_CLASS + macro. +

+
+
+ +

+ Here is how TypeIndex could be used in boost/any.hpp: +

- +
+

+ Before +

+ +

+ With TypeIndex +

+ + +
#include <boost/type_index.hpp>
+ + +
-

- Before -

-
-

- With TypeIndex -

-
#include <typeinfo>
-
-
#include <boost/type_index/type_info.hpp>
-
@@ -145,39 +175,45 @@ return typeid(ValueType); } - -
virtual const boost::type_info & type() const BOOST_NOEXCEPT
+
virtual const bti::type_info & type() const BOOST_NOEXCEPT
 {
     // now works even with RTTI disabled
-    return boost::type_id<ValueType>();
+    return bti::type_id<ValueType>()->type_info();
 }
 
-
+
+
+

- Here is how TypeIndex could be used in boost/variant/variant.hpp: -

+ Here is how TypeIndex could be used in boost/variant/variant.hpp: +

- +
+

+ Before +

+ +

+ With TypeIndex +

+ @@ -186,11 +222,11 @@ #include<typeinfo>// for typeid, std::type_info#endif// BOOST_NO_TYPEID - + + + + + +
-

- Before -

-
-

- With TypeIndex -

-
-
#include <boost/type_info/type_info.hpp>
+
#include <boost/type_index.hpp>
 
-
@@ -211,22 +247,22 @@ #endif // BOOST_NO_TYPEID -
class reflect
-    : public static_visitor<const boost::type_info&>
+    : public static_visitor<const bti::type_info&>
 {
 public: // visitor interfaces
 
     template <typename T>
-    const boost::type_info& operator()(const T&) const BOOST_NOEXCEPT
+    const bti::type_info& operator()(const T&) const BOOST_NOEXCEPT
     {
-        return boost::type_id<T>();
+        return bti::type_id<T>()->type_info();
     }
 
 };
 
-
@@ -238,23 +274,24 @@ } #endif - -
const boost::type_info& type() const
+
const bti::type_info& type() const
 {
     detail::variant::reflect visitor;
     return this->apply_visitor(visitor);
 }
 
-
+
-

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/boost_typeindex/how_it_works.html b/boost_typeindex/how_it_works.html new file mode 100644 index 0000000..e83f073 --- /dev/null +++ b/boost_typeindex/how_it_works.html @@ -0,0 +1,58 @@ + + + +How it works + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ type_index is just a typedef + for stl_type_index or ctti_type_index. +

+

+ Depending on the typeid() + availability TypeIndex library will choose an optimal class for type_index. In cases when at least basic + support for typeid() + is available boost::typeind::stl_type_index will be used. +

+

+ BOOST_TYPE_INDEX_REGISTER_CLASS + macro is a helper macro that places some virtual helper functions or expands + to nothing. +

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost_typeindex/making_own_type_index.html b/boost_typeindex/making_own_type_index.html new file mode 100644 index 0000000..235fa76 --- /dev/null +++ b/boost_typeindex/making_own_type_index.html @@ -0,0 +1,285 @@ + + + +Making own type_index + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +

+ Sometimes there may be a need to create your own type info system. This may + be usefull if you wish to store some more info about types (PODness, size of + a type, pointers to common functions...) or if you have an idea of a more compact + types representations. +

+
+

+Basics +

+

+ The following example shows how a user defined type_info can be created and + used. Example works with and without RTTI. +

+

+ Consider situation when user uses only those types in typeid(): +

+
#include <vector>
+#include <string>
+
+namespace my_namespace {
+
+class my_class;
+struct my_struct;
+
+typedef std::vector<my_class> my_classes;
+typedef std::string my_string;
+
+} // namespace my_namespace
+
+

+ In that case user may wish to save space in binary and create it's own type + system. For that case detail::typenum<> meta function is added. Depending + on the input type T this function will return different numeric values. +

+
#include <boost/type_index/type_index_facade.hpp>
+
+namespace my_namespace { namespace detail {
+    template <class T> struct typenum;
+    template <> struct typenum<void>{       enum {value = 0}; };
+    template <> struct typenum<my_class>{   enum {value = 1}; };
+    template <> struct typenum<my_struct>{  enum {value = 2}; };
+    template <> struct typenum<my_classes>{ enum {value = 3}; };
+    template <> struct typenum<my_string>{  enum {value = 4}; };
+
+    // my_typeinfo structure is used to save type number
+    struct my_typeinfo {
+        const char* const type_;
+    };
+
+    const my_typeinfo infos[5] = {
+        {"void"}, {"my_class"}, {"my_struct"}, {"my_classes"}, {"my_string"}
+    };
+
+    template <class T>
+    inline const my_typeinfo& my_typeinfo_construct() {
+        return infos[typenum<T>::value];
+    }
+}} // my_namespace::detail
+
+

+ my_type_index is a user created + type_index class. If in doubt during this phase, you can always take a look + at the <boost/type_index/ctti_type_index.hpp> + or <boost/type_index/stl_type_index.hpp> + files. Documentation for type_index_facade + could be also useful. +

+

+ See implementation of my_type_index: +

+
namespace my_namespace {
+
+class my_type_index: public boost::typeind::type_index_facade<my_type_index, detail::my_typeinfo> {
+    const detail::my_typeinfo* data_;
+
+public:
+    typedef detail::my_typeinfo type_info_t;
+
+    inline my_type_index() BOOST_NOEXCEPT
+        : data_(&detail::my_typeinfo_construct<void>())
+    {}
+
+    inline my_type_index(const type_info_t& data) BOOST_NOEXCEPT
+        : data_(&data)
+    {}
+
+    inline const type_info_t&  type_info() const BOOST_NOEXCEPT {
+        return *data_;
+    }
+
+    inline const char*  raw_name() const BOOST_NOEXCEPT {
+        return data_->type_;
+    }
+
+    inline std::string  pretty_name() const {
+        return data_->type_;
+    }
+
+    template <class T>
+    inline static my_type_index type_id() BOOST_NOEXCEPT {
+        return detail::my_typeinfo_construct<T>();
+    }
+
+    template <class T>
+    inline static my_type_index type_id_with_cvr() BOOST_NOEXCEPT {
+        return detail::my_typeinfo_construct<T>();
+    }
+
+    template <class T>
+    inline static my_type_index type_id_runtime(const T& variable) BOOST_NOEXCEPT;
+};
+
+} // namespace my_namespace
+
+

+ Note that we have used the boost::typeind::type_index_facade class as base. + That class took care about all the helper function and operators (comparison, + hashing, ostreaming and others). +

+

+ Finally we can use the my_type_index class for getting type indexes: +

+
my_type_index
+    cl1 = my_type_index::type_id<my_class>(),
+    st1 = my_type_index::type_id<my_struct>(),
+    st2 = my_type_index::type_id<my_struct>(),
+    vec = my_type_index::type_id<my_classes>()
+;
+
+assert(cl1 != st1);
+assert(st2 == st1);
+assert(vec.pretty_name() == "my_classes");
+assert(cl1.pretty_name() == "my_class");
+
+
+
+ +

+ Usually to allow runtime type info we need to register class with some macro. + Let's see how a MY_TYPEINDEX_REGISTER_CLASS + macro could be implemented for our my_type_index + class: +

+
namespace my_namespace { namespace detail {
+
+    template <class T>
+    inline const my_typeinfo& my_typeinfo_construct_ref(const T*) {
+        return my_typeinfo_construct<T>();
+    }
+
+#define MY_TYPEINDEX_REGISTER_CLASS                                             \
+    virtual const my_namespace::detail::my_typeinfo& type_id_runtime() const {  \
+        return my_namespace::detail::my_typeinfo_construct_ref(this);           \
+    }
+
+}} // namespace my_namespace::detail
+
+

+ Now when we have a MY_TYPEINDEX_REGISTER_CLASS, let's implement a my_type_index::type_id_runtime method: +

+
namespace my_namespace {
+    template <class T>
+    my_type_index my_type_index::type_id_runtime(const T& variable) BOOST_NOEXCEPT {
+        // Classes that were marked with `MY_TYPEINDEX_REGISTER_CLASS` will have a
+        // `type_id_runtime()` method.
+        return variable.type_id_runtime();
+    }
+}
+
+

+ Consider the situation, when my_class + and my_struct are polymorphic + classes: +

+
namespace my_namespace {
+
+class my_class {
+public:
+    MY_TYPEINDEX_REGISTER_CLASS
+    virtual ~my_class() {}
+};
+
+struct my_struct: public my_class {
+    MY_TYPEINDEX_REGISTER_CLASS
+};
+
+} // namespace my_namespace
+
+

+ Now the follwoing example will compile and work. +

+
my_struct str;
+my_class& reference = str;
+assert(my_type_index::type_id<my_struct>() == my_type_index::type_id_runtime(reference));
+
+
+
+ +

+ There is an easy way to force boost::typeind::type_id + to use your own type_index class. +

+

+ All we need to do is just define BOOST_TYPE_INDEX_USER_TYPEINDEX + to the full path to header file of your type index class: +

+
// BOOST_TYPE_INDEX_USER_TYPEINDEX must be defined *BEFORE* first inclusion of <boost/type_index.hpp>
+#define BOOST_TYPE_INDEX_USER_TYPEINDEX <boost/../libs/type_index/examples/user_defined_typeinfo.hpp>
+#include <boost/type_index.hpp>
+
+

+ You'll also need to add some typedefs and macro to your "user_defined_typeinfo.hpp" + header file: +

+
#define BOOST_TYPE_INDEX_REGISTER_CLASS MY_TYPEINDEX_REGISTER_CLASS
+namespace boost { namespace typeind {
+    typedef my_namespace::my_type_index type_index;
+}}
+
+

+ That's it! Now all TypeIndex global methods and typedefs will be using your + class: +

+
boost::typeind::type_index worldwide = boost::typeind::type_id<my_classes>();
+assert(worldwide.pretty_name() == "my_classes");
+assert(worldwide == my_type_index::type_id<my_classes>());
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/boost_typeindex/mixing_sources_with_rtti_on_and_.html b/boost_typeindex/mixing_sources_with_rtti_on_and_.html index 8ed0525..ba7bb78 100644 --- a/boost_typeindex/mixing_sources_with_rtti_on_and_.html +++ b/boost_typeindex/mixing_sources_with_rtti_on_and_.html @@ -4,8 +4,8 @@ Mixing sources with RTTI on and RTTI off - - + + @@ -32,9 +32,8 @@ is not a very good idea and may lead to a lot of surprises. However if there is a very strong need, TypeIndex library provides a solution for mixing sources: just define BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY - macro. This would lead to usage of boost::template_index - instead of boost::type_index class and boost::template_info - instead of boost::type_info class. + macro. This would lead to usage of boost::typeind::ctti_type_info + instead of boost::typeind::stl_type_info class.

@@ -76,12 +75,12 @@ @@ -104,7 +103,7 @@

- boost::type_index get_integer(); + boost::typeind::stl_type_info get_integer();

- boost::template_index get_integer(); + boost::typeind::ctti_type_info get_integer();

-

-PrevUpHomeNext +PrevUpHomeNext

@@ -28,17 +28,17 @@

  • - template_info uses macro + ctti_type_info uses macro for getting full text representation of function name which could lead - to code bloat, so prefer using type_info - type. + to code bloat, so prefer using stl_type_info + type when possible.
  • - type_index and template_index classes hold a single - pointer, so they are easy and fast to copy. + type_index class hold a + single pointer, so it is easy and fast to copy.
  • - Calls to const char* name() do not require dynamic memory allocation + Calls to const char* raw_name() do not require dynamic memory allocation and usually just return a pointer to an array of chars in a read-only section of the binary image.
  • @@ -47,7 +47,7 @@ execute a single std::strcmp.
  • - Calls to std::string name_demangled() usually require dynamic memory allocation + Calls to std::string pretty_name() usually require dynamic memory allocation and some computations, so they are not recommended for usage in performance critical sections.
  • @@ -55,7 +55,7 @@
-

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/boost_typeindex_header_reference.html b/boost_typeindex_header_reference.html index 6e2e0b3..7608b39 100644 --- a/boost_typeindex_header_reference.html +++ b/boost_typeindex_header_reference.html @@ -4,10 +4,10 @@ Boost.TypeIndex Header Reference - - + + - + @@ -20,112 +20,115 @@

-PrevUpHomeNext +PrevUpHomeNext

Boost.TypeIndex Header Reference

-

Includes all the headers of the Boost.TypeIndex library.

-

By inclusion of this file all classes (boost::type_info + boost::type_index if RTTI is on and boost::template_info + boost::template_index) will be available.

-

Consider including <boost/type_index/type_index.hpp> if you do not want to include boost::template_info and boost::template_index class while RTTI is available.

-

Consider including <boost/type_index/type_info.hpp> if you need only boost::type_info class and boost::type_id* functions.

-
-
- -

Contains implementation of boost::type_index class.

-

boost::type_index class is used in situations when RTTI is enabled, it is designed to be a drop-in replacement for C++11 std::type_index class.

-

When RTTI is disabled boost::template_index will be usually (some compilers allow calling typeid(T) even if RTTI is disabled) used instead of this class.

-
namespace boost {
-  class type_index;
-  bool operator==(std::type_info const & lhs, type_index const & rhs);
-  bool operator!=(std::type_info const & lhs, type_index const & rhs);
-  bool operator<(std::type_info const & lhs, type_index const & rhs);
-  bool operator>(std::type_info const & lhs, type_index const & rhs);
-  bool operator<=(std::type_info const & lhs, type_index const & rhs);
-  bool operator>=(std::type_info const & lhs, type_index const & rhs);
-
-  // Ostream operator that will output demangled name. 
-  template<typename CharT, typename TriatT> 
-    std::basic_ostream< CharT, TriatT > & 
-    operator<<(std::basic_ostream< CharT, TriatT > & ostr, 
-               type_index const & ind);
-
-  // hash_value function overload for type_index. 
-  std::size_t hash_value(type_index const & v);
-}
-
-
- -

Contains implementation of boost::template_index class.

-

boost::template_index is just a typedef of boost::template_info, that combines functionality of boost::type_info and boost::type_index but can work with RTTI disabled.

-
namespace boost {
-  typedef template_info template_index;
-}
-
-
- -

Contains implementation of boost::template_info class.

-

boost::template_info class is used instead of boost::type_info and boost::type_index classes in situations when RTTI is disabled.

-

It combines functionality of std::type_info and std::type_index.

+

Includes minimal set of headers required to use the Boost.TypeIndex library.

+

By inclusion of this file most optimal type index classes will be included and used as a boost::typeind::type_index and boost::typeind::type_info.

 
-BOOST_TYPE_INDEX_FUNCTION_SIGNATURE
-BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP
-BOOST_TYPE_INDEX_CTTI_END_SKIP
+BOOST_TYPE_INDEX_USER_TYPEINDEX +BOOST_TYPE_INDEX_REGISTER_CLASS
namespace boost {
-  class template_info;
-  template<typename T> const template_info & template_id();
-  template<typename T> const template_info & template_id_with_cvr();
-
-  // Ostream operator that will output demangled name. 
-  template<typename CharT, typename TriatT> 
-    std::basic_ostream< CharT, TriatT > & 
-    operator<<(std::basic_ostream< CharT, TriatT > & ostr, 
-               template_info const & ind);
-
-  // hash_value function overload for template_info
-  std::size_t hash_value(template_info const & v);
+  namespace typeind {
+    typedef platform specific type_index;
+    typedef type_index::type_info_t type_info;
+    template<typename T> type_index type_id();
+    template<typename T> type_index type_id_with_cvr();
+    template<typename T> type_index type_id_runtime(const T &);
+  }
 }
-

Contains implementation of boost::type_info class.

-

boost::type_info class can be used as a drop-in replacement for std::type_info, but unlike std::type_info this class has a name_demangled() function for getting human-readable type names.

-

boost::type_info class is used in situations when RTTI is enabled. When RTTI is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined boost::template_info is usually used instead of it (some compilers allow calling typeid(T) even if RTTI is disabled, those copilers will continue to use boost::type_info class).

+Header <boost/type_index/ctti_register_class.hpp>
+

Contains BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS macro.

 
-BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
+BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS
+ +
+ +

Contains boost::typeind::ctti_type_index class.

+

boost::typeind::ctti_type_index class can be used as a drop-in replacement for std::type_index.

+

It is used in situations when typeid() method is not available or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined.

namespace boost {
-  class type_info;
-  template<typename T> const type_info & type_id();
-  template<typename T> const type_info & type_id_with_cvr();
-  template<typename T> const type_info & type_id_rtti_only(T &);
-  template<typename T> const type_info & type_id_rtti_only(T *);
-  bool operator==(std::type_info const & lhs, type_info const & rhs);
-  bool operator!=(std::type_info const & lhs, type_info const & rhs);
+  namespace typeind {
+    class ctti_type_index;
 
-  // hash_value function overload for boost::type_info. 
-  std::size_t hash_value(type_info const & v);
+    // Helper method for getting detail::ctti_data of a tempalte patameter T. 
+    template<typename T> unspecified ctti_construct();
+  }
+}
+
+
+ +

Contains BOOST_TYPE_INDEX_REGISTER_STL_CLASS macro.

+
+
+BOOST_TYPE_INDEX_REGISTER_STL_CLASS
+
+
+ +

Contains boost::typeind::stl_type_index class.

+

boost::typeind::stl_type_index class can be used as a drop-in replacement for std::type_index.

+

It is used in situations when RTTI is enabled or typeid() method is available. When typeid() is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined boost::typeind::ctti is usually used instead of boost::typeind::stl_type_index.

+
namespace boost {
+  namespace typeind {
+    class stl_type_index;
+  }
+}
+
+
+ +
namespace boost {
+  namespace typeind {
+    template<typename Derived, typename TypeInfo> class type_index_facade;
+
+    // noexcept comparison operators for type_index_facade classes. 
+    bool operator?(const type_index_facade & lhs, 
+                   const type_index_facade & rhs);
+
+    // noexcept comparison operators for type_index_facade and it's TypeInfo classes. 
+    bool operator?(const type_index_facade & lhs, const TypeInfo & rhs);
+
+    // noexcept comparison operators for type_index_facade's TypeInfo and type_index_facade classes. 
+    bool operator?(const TypeInfo & lhs, const type_index_facade & rhs);
+
+    // Ostream operator that will output demangled name. 
+    template<typename CharT, typename TriatT, typename Derived, 
+             typename TypeInfo> 
+      std::basic_ostream< CharT, TriatT > & 
+      operator<<(std::basic_ostream< CharT, TriatT > & ostr, 
+                 const type_index_facade< Derived, TypeInfo > & ind);
+
+    // This free function is used by Boost's unordered containers. 
+    template<typename Derived, typename TypeInfo> 
+      std::size_t hash_value(const type_index_facade< Derived, TypeInfo > & lhs);
+  }
 }
-

-PrevUpHomeNext +PrevUpHomeNext
diff --git a/index.html b/index.html index c9f11e3..26ab626 100644 --- a/index.html +++ b/index.html @@ -1,10 +1,10 @@ -Chapter 1. Boost.TypeIndex 2.1 +Chapter 1. Boost.TypeIndex 3.0 - + @@ -21,8 +21,8 @@

-Chapter 1. Boost.TypeIndex 2.1

-
+Chapter 1. Boost.TypeIndex 3.0
+

Boost.TypeIndex library was designed to work around all those issues. @@ -114,15 +134,13 @@

Warning

- During the Boost review was decided, that it is better to use interface close - to v1.0 of this library. Version 3.0 will attempt to fix all the issues found - during the review. + Version 3.0 of this library is waitning for Boost mini-review.

- +

Last revised: January 11, 2014 at 14:36:03 GMT

Last revised: February 21, 2014 at 08:59:15 GMT


diff --git a/standalone_HTML.manifest b/standalone_HTML.manifest index 7c8fccc..b358b27 100644 --- a/standalone_HTML.manifest +++ b/standalone_HTML.manifest @@ -1,21 +1,21 @@ index.html boost_typeindex/getting_started.html +boost_typeindex/how_it_works.html boost_typeindex/examples.html boost_typeindex_header_reference.html -boost/type_index.html -boost/template_index.html -boost/template_info.html -boost/template_id.html -boost/template_id_with_cvr.html -BOOST_TYPE_INDEX_FUNCTION_SIGNATURE.html -BOOST_TYPE_INDEX_CTTI_BEGIN_SKIP.html -BOOST_TYPE_INDEX_CTTI_END_SKIP.html -boost/type_info.html -boost/type_id.html -boost/type_id_with_cvr.html -boost/type_id_rtti_on_idp5820176.html -boost/type_id_rtti_on_idp5823984.html -BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY.html +boost/typeind/type_index.html +boost/typeind/type_info.html +boost/typeind/type_id.html +boost/typeind/type_id_with_cvr.html +boost/typeind/type_id_runtime.html +BOOST_TYPE_INDEX_USER_TYPEINDEX.html +BOOST_TYPE_INDEX_REGISTER_CLASS.html +BOOST_TYPE_INDEX_REGISTER_CTTI_CLASS.html +boost/typeind/ctti_type_index.html +BOOST_TYPE_INDEX_REGISTER_STL_CLASS.html +boost/typeind/stl_type_index.html +boost/typeind/type_index_facade.html +boost_typeindex/making_own_type_index.html boost_typeindex/space_and_performance.html boost_typeindex/code_bloat.html boost_typeindex/compiler_support.html