SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Related Functions
RWTReferenceWrapper< T > Class Template Reference

Stores a reference to an object. More...

#include <rw/tools/refwrap.h>

Public Member Functions

 RWTReferenceWrapper (T &ref)
 
 RWTReferenceWrapper (const RWTReferenceWrapper &rhs)
 
 operator T & () const
 
RWTReferenceWrapperoperator= (const RWTReferenceWrapper &rhs)
 

Related Functions

(Note that these are not member functions.)

template<typename T >
RWTReferenceWrapper< const T > rwCRef (const T &ref)
 
template<typename T >
RWTReferenceWrapper< T > rwRef (T &ref)
 

Detailed Description

template<typename T>
class RWTReferenceWrapper< T >

RWTReferenceWrapper stores a reference to an object.

Constructor & Destructor Documentation

template<typename T >
RWTReferenceWrapper< T >::RWTReferenceWrapper ( T &  ref)
inline

Constructs a reference wrapper for the object referenced by ref

template<typename T >
RWTReferenceWrapper< T >::RWTReferenceWrapper ( const RWTReferenceWrapper< T > &  rhs)
inline

Constructs a reference wrapper for the object referenced by rhs.

Member Function Documentation

template<typename T >
RWTReferenceWrapper< T >::operator T & ( ) const
inline

Conversion operator.

template<typename T >
RWTReferenceWrapper& RWTReferenceWrapper< T >::operator= ( const RWTReferenceWrapper< T > &  rhs)
inline

Assignment operator. Self will reference the same instance as rhs.

Friends And Related Function Documentation

template<typename T >
RWTReferenceWrapper< const T > rwCRef ( const T &  ref)
related

Constructs an RWTReferenceWrapper for ref.

template<typename T >
RWTReferenceWrapper< T > rwRef ( T &  ref)
related

Constructs an RWTReferenceWrapper for ref.

Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.