ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
flann::any Class Reference

#include <any.h>

Public Member Functions

template<typename T >
 any (const T &x)
 Initializing constructor. More...
 
 any ()
 Empty constructor. More...
 
 any (const char *x)
 Special initializing constructor for string literals. More...
 
 any (const any &x)
 Copy constructor. More...
 
 ~any ()
 Destructor. More...
 
anyassign (const any &x)
 Assignment function from another any. More...
 
template<typename T >
any_tassign (const T &x)
 Assignment function. More...
 
template<typename T >
any_toperator= (const T &x)
 Assignment operator. More...
 
anyoperator= (const char *x)
 
anyswap (any &x)
 Utility functions. More...
 
template<typename T >
T & cast ()
 Cast operator. You can only cast to the original type. More...
 
template<typename T >
const T & cast () const
 Cast operator. You can only cast to the original type. More...
 
bool empty () const
 Returns true if the any contains no value. More...
 
void reset ()
 Frees any allocated memory, and sets the value to NULL. More...
 
bool compatible (const any &x) const
 Returns true if the two types are the same. More...
 
template<typename T >
bool has_type ()
 Returns if the type is compatible with the policy. More...
 
const std::type_info & type () const
 

Detailed Description

Definition at line 153 of file any.h.

Constructor & Destructor Documentation

◆ any() [1/4]

template<typename T >
flann::any::any ( const T &  x)
inline

Initializing constructor.

Definition at line 164 of file any.h.

References assign().

◆ any() [2/4]

flann::any::any ( )
inline

Empty constructor.

Definition at line 171 of file any.h.

◆ any() [3/4]

flann::any::any ( const char *  x)
inline

Special initializing constructor for string literals.

Definition at line 176 of file any.h.

References assign().

◆ any() [4/4]

flann::any::any ( const any x)
inline

Copy constructor.

Definition at line 183 of file any.h.

References assign().

◆ ~any()

flann::any::~any ( )
inline

Destructor.

Definition at line 190 of file any.h.

References flann::anyimpl::base_any_policy::static_delete().

Member Function Documentation

◆ assign() [1/2]

any& flann::any::assign ( const any x)
inline

Assignment function from another any.

Definition at line 196 of file any.h.

References flann::anyimpl::base_any_policy::clone(), and reset().

Referenced by any(), and operator=().

◆ assign() [2/2]

template<typename T >
any_t& flann::any::assign ( const T &  x)
inline

Assignment function.

Definition at line 206 of file any.h.

References flann::anyimpl::base_any_policy::copy_from_value(), and reset().

◆ cast() [1/2]

template<typename T >
T& flann::any::cast ( )
inline

Cast operator. You can only cast to the original type.

Definition at line 238 of file any.h.

References flann::anyimpl::base_any_policy::get_value(), and flann::anyimpl::base_any_policy::type().

◆ cast() [2/2]

template<typename T >
const T& flann::any::cast ( ) const
inline

Cast operator. You can only cast to the original type.

Definition at line 247 of file any.h.

References flann::anyimpl::base_any_policy::get_value(), and flann::anyimpl::base_any_policy::type().

◆ compatible()

bool flann::any::compatible ( const any x) const
inline

Returns true if the two types are the same.

Definition at line 268 of file any.h.

References flann::anyimpl::base_any_policy::type().

◆ empty()

bool flann::any::empty ( ) const
inline

Returns true if the any contains no value.

Definition at line 255 of file any.h.

References flann::anyimpl::base_any_policy::type().

◆ has_type()

template<typename T >
bool flann::any::has_type ( )
inline

Returns if the type is compatible with the policy.

Definition at line 275 of file any.h.

References flann::anyimpl::base_any_policy::type().

◆ operator=() [1/2]

any& flann::any::operator= ( const char *  x)
inline

Assignment operator, specialed for literal strings. They have types like const char [6] which don't work as expected.

Definition at line 223 of file any.h.

References assign().

◆ operator=() [2/2]

template<typename T >
any_t& flann::any::operator= ( const T &  x)
inline

Assignment operator.

Definition at line 216 of file any.h.

References assign().

◆ reset()

void flann::any::reset ( )
inline

Frees any allocated memory, and sets the value to NULL.

Definition at line 261 of file any.h.

References flann::anyimpl::base_any_policy::static_delete().

Referenced by assign().

◆ swap()

any& flann::any::swap ( any x)
inline

Utility functions.

Definition at line 229 of file any.h.

References std::swap().

◆ type()

const std::type_info& flann::any::type ( ) const
inline

Definition at line 280 of file any.h.

References flann::anyimpl::base_any_policy::type().


The documentation for this class was generated from the following file: