STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::container_wrapper_ref< T > Class Template Reference

A wrapper for storing containers as the value_type of another container. This is needed because we want to store a reference to the container as a p_object in a base container. More...

Public Member Functions

 container_wrapper_ref (void)
 Create an invalid reference, setting the pointer to NULL.
 
 container_wrapper_ref (T const &t)
 Initialize the reference with the value to wrap. More...
 
container_wrapper_refoperator= (T const &t)
 
 operator T const & (void) const
 Cast the value of the wrapper to its original reference type.
 
 operator T & (void)
 Cast the value of the wrapper to its original reference type.
 
T & get (void)
 Retrieve the original reference from the wrapper.
 
T const & get (void) const
 Retrieve the original reference as a const reference from the wrapper.
 
T * get_pointer (void) const
 Retrieve the pointer to the wrapped value.
 

Public Types

typedef T type
 The type that this wrapper is holding.
 

Detailed Description

template<typename T>
class stapl::container_wrapper_ref< T >

A wrapper for storing containers as the value_type of another container. This is needed because we want to store a reference to the container as a p_object in a base container.

This class is similar in spirit to boost::ref.

Template Parameters
TThe container to wrap.

Constructor & Destructor Documentation

◆ container_wrapper_ref()

template<typename T >
stapl::container_wrapper_ref< T >::container_wrapper_ref ( T const &  t)
explicit

Initialize the reference with the value to wrap.

Parameters
tThe value to wrap

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