Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template binding

boost::type_erasure::binding

Synopsis

// In header: <boost/type_erasure/binding.hpp>

template<typename Concept> 
class binding {
public:

  // friend functions
  bool (const  binding &, const  binding &);
  bool (const  binding &, const  binding &);

  // public member functions
  ();
  template<typename Map> (const  Map &);
  template<typename Map> (const  static_binding< Map > &);
  template<typename Concept2, typename Map> 
    (const  binding< Concept2 > &, const  Map &);
  template<typename Concept2, typename Map> 
    (const  binding< Concept2 > &, const  static_binding< Map > &);
  template<typename Placeholders, typename Map> 
    (const  dynamic_binding< Placeholders > &, 
            const  static_binding< Map > &);
};

Description

Stores the binding of a Concept to a set of actual types. Concept is interpreted in the same way as with any.

binding friend functions

  1. bool (const  binding & lhs, const  binding & rhs);

    Returns:

    true iff the sets of types that the placeholders bind to are the same for both arguments.

    Throws:

    Nothing.
  2. bool (const  binding & lhs, const  binding & rhs);

    Returns:

    true iff the arguments do not map to identical sets of types.

    Throws:

    Nothing.

binding public member functions

  1. ();

    Requires:

    relaxed must be in Concept.

    Throws:

    Nothing.
  2. template<typename Map> (const  Map &);

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept.

    Throws:

    Nothing.
  3. template<typename Map> (const  static_binding< Map > &);

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept.

    Throws:

    Nothing.
  4. template<typename Concept2, typename Map> 
      (const  binding< Concept2 > & other, const  Map &);

    Converts from another set of bindings.

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept. The mapped type should be the corresponding placeholder in Concept2.

    Throws:

    std::bad_alloc
  5. template<typename Concept2, typename Map> 
      (const  binding< Concept2 > & other, const  static_binding< Map > &);

    Converts from another set of bindings.

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept. The mapped type should be the corresponding placeholder in Concept2.

    Throws:

    std::bad_alloc
  6. template<typename Placeholders, typename Map> 
      (const  dynamic_binding< Placeholders > & other, 
              const  static_binding< Map > &);

    Converts from another set of bindings.

    Requires:

    Map must be an MPL map with an entry for each placeholder referred to by Concept. The mapped type should be the corresponding placeholder in Concept2.

    Throws:

    std::bad_alloc

    std::bad_any_cast


PrevUpHomeNext