STK++ 1.0

STK::ConstProxy< TYPE > Class Template Reference

The ConstProxy class allow to surdefine operators and methods for every kind of constant class and type without using dynamic_cast. More...

#include <STK_Proxy.h>

Inheritance diagram for STK::ConstProxy< TYPE >:

List of all members.

Public Member Functions

 ConstProxy (TYPE const &x)
 Default constructor : create a reference of the value x.
virtual ~ConstProxy ()
 Virtual destructor.
 operator TYPE const & () const
 Constant conversion operator to TYPE.

Protected Attributes

TYPE const & x_
 A constant reference on the object wrapped.

Detailed Description

template<class TYPE>
class STK::ConstProxy< TYPE >

The ConstProxy class allow to surdefine operators and methods for every kind of constant class and type without using dynamic_cast.

This class allow:

  • To avoid the use of dynamic_cast
  • To surdefine the predefined operators (like << and >>) for the C++ fundamental types.
  • To handle in a transparent way the NA values.

Definition at line 63 of file STK_Proxy.h.


Constructor & Destructor Documentation

template<class TYPE>
STK::ConstProxy< TYPE >::ConstProxy ( TYPE const &  x) [inline]

Default constructor : create a reference of the value x.

Parameters:
xthe value to wrap

Definition at line 72 of file STK_Proxy.h.

                                      : x_(x)
     { ;}
template<class TYPE>
virtual STK::ConstProxy< TYPE >::~ConstProxy ( ) [inline, virtual]

Virtual destructor.

Definition at line 77 of file STK_Proxy.h.

{}

Member Function Documentation

template<class TYPE>
STK::ConstProxy< TYPE >::operator TYPE const & ( ) const [inline]

Constant conversion operator to TYPE.

Definition at line 81 of file STK_Proxy.h.

References STK::ConstProxy< TYPE >::x_.

     { return x_;}

Member Data Documentation

template<class TYPE>
TYPE const& STK::ConstProxy< TYPE >::x_ [protected]

A constant reference on the object wrapped.

Definition at line 66 of file STK_Proxy.h.

Referenced by STK::ConstProxy< TYPE >::operator TYPE const &().


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