CoreComponents 4.0.0
A Modern C++ Toolkit
Loading...
Searching...
No Matches
InOut< T > Class Template Reference

Call by reference function arguments. More...

#include <cc/InOut>

Public Member Functions

 InOut (T *x)
 Construct a call by reference argument.
 InOut (const None &)
 Construct a default call by reference argument.
InOutoperator= (const T &y)
 Assign a value y to be returned.
InOutoperator<< (const T &y)
 Assign a value y to be returned.
 operator T () const
 Access return value.
bool requested () const
 Check if a return value is requested.
bool operator== (const None &) const
 Check if a return value is requested.
bool operator!= (const None &) const
 Check if a return value is not requested.
template<class U>
 operator InOut< U > ()
 Automatically cast to a compatible return value type.
T & operator() ()
 Get reference to return value.
const T & operator() () const
 Get constant reference to return value.
T & operator* ()
 Get reference to return value.
const T & operator* () const
 Get constant reference to return value.
T * operator-> ()
 Get access to the return value.
const T * operator-> () const
 Get access to the return value.
template<class B>
InOutoperator+= (const B &b)
 Addition assignment.
template<class B>
InOutoperator-= (const B &b)
 Subtraction assignment.
template<class B>
InOutoperator*= (const B &b)
 Multiplication assignment.
template<class B>
InOutoperator/= (const B &b)
 Division assignment.
T * operator& ()
 Get address of.
template<class B>
B & as ()
 Get return value statically casted to type B.

Detailed Description

template<class T>
class cc::InOut< T >

Call by reference function arguments.

Template Parameters
Treturn value type

Constructor & Destructor Documentation

◆ InOut() [1/2]

template<class T>
InOut ( T * x)

Construct a call by reference argument.

◆ InOut() [2/2]

template<class T>
InOut ( const None & )

Construct a default call by reference argument.

Member Function Documentation

◆ operator=()

template<class T>
InOut & operator= ( const T & y)

Assign a value y to be returned.

◆ operator<<()

template<class T>
InOut & operator<< ( const T & y)

Assign a value y to be returned.

◆ operator T()

template<class T>
operator T ( ) const

Access return value.

◆ requested()

template<class T>
bool requested ( ) const

Check if a return value is requested.

◆ operator==()

template<class T>
bool operator== ( const None & ) const

Check if a return value is requested.

◆ operator!=()

template<class T>
bool operator!= ( const None & ) const

Check if a return value is not requested.

◆ operator InOut< U >()

template<class T>
template<class U>
operator InOut< U > ( )

Automatically cast to a compatible return value type.

◆ operator()() [1/2]

template<class T>
T & operator() ( )

Get reference to return value.

◆ operator()() [2/2]

template<class T>
const T & operator() ( ) const

Get constant reference to return value.

◆ operator*() [1/2]

template<class T>
T & operator* ( )

Get reference to return value.

◆ operator*() [2/2]

template<class T>
const T & operator* ( ) const

Get constant reference to return value.

◆ operator->() [1/2]

template<class T>
T * operator-> ( )

Get access to the return value.

◆ operator->() [2/2]

template<class T>
const T * operator-> ( ) const

Get access to the return value.

◆ operator+=()

template<class T>
template<class B>
InOut & operator+= ( const B & b)

Addition assignment.

◆ operator-=()

template<class T>
template<class B>
InOut & operator-= ( const B & b)

Subtraction assignment.

◆ operator*=()

template<class T>
template<class B>
InOut & operator*= ( const B & b)

Multiplication assignment.

◆ operator/=()

template<class T>
template<class B>
InOut & operator/= ( const B & b)

Division assignment.

◆ operator&()

template<class T>
T * operator& ( )

Get address of.

◆ as()

template<class T>
template<class B>
B & as ( )

Get return value statically casted to type B.