Adobe Source Libraries 1.49.0
A collection of C++ libraries.
Loading...
Searching...
No Matches

Support for creating Regular, runtime-polymorphic objects with value semantics. More...

Classes

struct  is_base_derived_or_same< T, U >
struct  poly_copyable_interface
 Abstract interface providing signatures needed to implement "handle" objects modeling a Value (Copyable/Movable) concept. Authors of poly classes must derive their interfaces from this. See poly_placeable_interface for an example. More...
struct  optimized_storage_type< ConcreteType, Interface >
 Authors of poly concept representatives must derive their instance class from this. See of poly_placeable_instance, for example. This metafunction is used in the implementation of the small storage optimization. More...
struct  poly_base< I, Instance >
 Authors of a Concept representative F, intended as a template parameter to poly, will inherit from poly_base. The first template parameter for poly_base provides the virtual interface for the concept representative. The second template parameter for poly_base must inherit from the Concept interface representative. The author's third duty is to provide forwarding functions in a their Concept representative. See the placeable_concept.hpp header file for details. More...
class  poly< F >
 poly<foo> will be a runtime polymorphic value type wrapper modelling a concept represented by foo More...
struct  poly_copyable_instance< T >
 Implementation of a trivial poly interface in terms of types modeling Copyable . Used in poly<copyable> implementation. More...
struct  copyable
 "Handle" class used in poly<copyable> implementation. More...
struct  poly_regular_interface
 Virtual interface for RegularConcept. Used in poly<regular> implementation. More...
struct  poly_regular_instance< T >
 Implementation of a trivial poly interface in terms of types modeling regular . Used in poly<regular> implementation. More...
struct  regular
 "Handle" class used in poly<regular> implementation. More...

Functions

template<class J, template< typename > class K>
boost::enable_if< implementation::has_equals< J >, bool >::type operator== (const poly_base< J, K > &x, const poly_base< J, K > &y)
template<typename T, typename U>
poly_cast (poly< U > &x)
template<typename T, typename U>
poly_cast (const poly< U > &x)
template<typename T, typename U>
poly_cast (poly< U > *x)
template<typename T, typename U>
poly_cast (const poly< U > *x)
template<class T>
bool operator!= (const poly< T > &x, const poly< T > &y)
 inequality comparison

Detailed Description

Function Documentation

◆ operator==()

template<class J, template< typename > class K>
boost::enable_if< implementation::has_equals< J >, bool >::type operator== ( const poly_base< J, K > & x,
const poly_base< J, K > & y )

Definition at line 385 of file poly.hpp.

◆ poly_cast() [1/4]

template<typename T, typename U>
T poly_cast ( poly< U > & x)

Polymorphic cast from poly <U> & to T&, where T is another poly instance. Throws bad_cast if x does not dynamically model T's Concept requirement. For example,

//...
poly<foo> will be a runtime polymorphic value type wrapper modelling a concept represented by foo
Definition poly.hpp:403

Definition at line 441 of file poly.hpp.

◆ poly_cast() [2/4]

template<typename T, typename U>
T poly_cast ( const poly< U > & x)
See also
poly_cast(poly <U>& x);

Definition at line 459 of file poly.hpp.

◆ poly_cast() [3/4]

template<typename T, typename U>
T poly_cast ( poly< U > * x)

Polymorphic cast from poly <U> * to T *, where T is another poly instance. Returns NULL if x does not dynamically model T's Concept requirement. For example,

Definition at line 485 of file poly.hpp.

◆ poly_cast() [4/4]

template<typename T, typename U>
T poly_cast ( const poly< U > * x)
See also
poly_cast(poly <U>* x);

Definition at line 503 of file poly.hpp.

◆ operator!=()

template<class T>
bool operator!= ( const poly< T > & x,
const poly< T > & y )

Definition at line 520 of file poly.hpp.