xrootd
Loading...
Searching...
No Matches
Public Member Functions | List of all members
XrdCl::Fwd< T > Struct Template Reference

#include <XrdClFwd.hh>

Inheritance diagram for XrdCl::Fwd< T >:
Inheritance graph
[legend]
Collaboration diagram for XrdCl::Fwd< T >:
Collaboration graph
[legend]

Public Member Functions

 Fwd ()
 
 Fwd (const Fwd &fwd)
 Copy constructor.
 
 Fwd (Fwd &&fwd)
 Move constructor.
 
 Fwd (std::shared_ptr< FwdStorage< T > > &&ptr)
 Initialize from shared_ptr.
 
 Fwd (const T &value)
 Constructor from value.
 
 Fwd (T &&value)
 Move construct from value.
 
Fwdoperator= (const T &value)
 
Fwdoperator= (T &&value)
 
T & operator* () const
 
T * operator-> () const
 
bool Valid () const
 Check if it contains a valid value.
 

Detailed Description

template<typename T>
struct XrdCl::Fwd< T >

A helper class for forwarding arguments between operations. In practice it's a wrapper around std::shared_ptr using FwdStorage as underlying memory.

Constructor & Destructor Documentation

◆ Fwd() [1/6]

template<typename T >
XrdCl::Fwd< T >::Fwd ( )
inline

Default constructor.

Allocates memory for the underlying value object without callying its constructor.

◆ Fwd() [2/6]

template<typename T >
XrdCl::Fwd< T >::Fwd ( const Fwd< T > &  fwd)
inline

Copy constructor.

◆ Fwd() [3/6]

template<typename T >
XrdCl::Fwd< T >::Fwd ( Fwd< T > &&  fwd)
inline

Move constructor.

◆ Fwd() [4/6]

template<typename T >
XrdCl::Fwd< T >::Fwd ( std::shared_ptr< FwdStorage< T > > &&  ptr)
inline

Initialize from shared_ptr.

◆ Fwd() [5/6]

template<typename T >
XrdCl::Fwd< T >::Fwd ( const T &  value)
inlineexplicit

Constructor from value.

◆ Fwd() [6/6]

template<typename T >
XrdCl::Fwd< T >::Fwd ( T &&  value)
inlineexplicit

Move construct from value.

Member Function Documentation

◆ operator*()

template<typename T >
T & XrdCl::Fwd< T >::operator* ( ) const
inline

Dereferencing operator. Note if Fwd has not been assigned with a value this will trigger an exception

Returns
: reference to the underlying value
Exceptions
std::logic_error

◆ operator->()

template<typename T >
T * XrdCl::Fwd< T >::operator-> ( ) const
inline

Dereferencing member operator. Note if Fwd has not been assigned with a value this will trigger an exception

Returns
: pointer to the underlying value
Exceptions
std::logic_error

◆ operator=() [1/2]

template<typename T >
Fwd & XrdCl::Fwd< T >::operator= ( const T &  value)
inline

Assignment operator.

Parameters
value: forwarded value
Exceptions
std::logic_error

◆ operator=() [2/2]

template<typename T >
Fwd & XrdCl::Fwd< T >::operator= ( T &&  value)
inline

Move assignment operator.

Parameters
value: forwarded value
Exceptions
std::logic_error

◆ Valid()

template<typename T >
bool XrdCl::Fwd< T >::Valid ( ) const
inline

Check if it contains a valid value.


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