xrootd
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args > Class Template Reference

#include <XrdClOperations.hh>

Inheritance diagram for XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >:
Inheritance graph
[legend]
Collaboration diagram for XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >:
Collaboration graph
[legend]

Public Member Functions

 ConcreteOperation (Args &&... args)
 
template<bool from>
 ConcreteOperation (ConcreteOperation< Derived, from, HdlrFactory, Args... > &&op)
 
template<typename Hdlr >
Derived< true > operator>> (Hdlr &&hdlr)
 
Derived< true > operator| (Operation< true > &op)
 
Derived< true > operator| (Operation< true > &&op)
 
Derived< true > operator| (Operation< false > &op)
 
Derived< true > operator| (Operation< false > &&op)
 
Derived< true > operator| (FinalOperation &&fo)
 Adds a final operation to the pipeline. More...
 
Operation< HasHndl > * Move ()
 
Operation< true > * ToHandled ()
 
Derived< HasHndl > Timeout (uint16_t timeout)
 Set operation timeout. More...
 
- Public Member Functions inherited from XrdCl::Operation< HasHndl >
 Operation ()
 Constructor. More...
 
template<bool from>
 Operation (Operation< from > &&op)
 Move constructor between template instances. More...
 
virtual ~Operation ()
 Destructor. More...
 
virtual std::string ToString ()=0
 Name of the operation. More...
 

Protected Member Functions

template<bool to>
Derived< to > Transform ()
 
Derived< true > StreamImpl (ResponseHandler *handler)
 
- Protected Member Functions inherited from XrdCl::Operation< HasHndl >
void Run (Timeout timeout, std::promise< XRootDStatus > prms, std::function< void(const XRootDStatus &)> final)
 
virtual XRootDStatus RunImpl (PipelineHandler *handler, uint16_t timeout)=0
 
void AddOperation (Operation< true > *op)
 

Static Protected Member Functions

static void AllocHandler (ConcreteOperation< Derived, true, HdlrFactory, Args... > &me)
 
static void AllocHandler (ConcreteOperation< Derived, false, HdlrFactory, Args... > &me)
 
static Derived< true > PipeImpl (ConcreteOperation< Derived, HasHndl, HdlrFactory, Args... > &me, Operation< true > &op)
 
static Derived< true > PipeImpl (ConcreteOperation< Derived, HasHndl, HdlrFactory, Args... > &me, Operation< false > &op)
 

Protected Attributes

std::tuple< Args... > args
 Operation arguments. More...
 
uint16_t timeout
 Operation timeout. More...
 
- Protected Attributes inherited from XrdCl::Operation< HasHndl >
std::unique_ptr< PipelineHandlerhandler
 Operation handler. More...
 
bool valid
 Flag indicating if it is a valid object. More...
 

Friends

template<template< bool > class, bool , typename , typename ... >
class ConcreteOperation
 

Detailed Description

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
class XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >

Concrete Operation template Defines | and >> operator as well as operation arguments.

Constructor & Destructor Documentation

◆ ConcreteOperation() [1/2]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::ConcreteOperation ( Args &&...  args)
inline

Constructor

Parameters
args: operation arguments

◆ ConcreteOperation() [2/2]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
template<bool from>
XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::ConcreteOperation ( ConcreteOperation< Derived, from, HdlrFactory, Args... > &&  op)
inline

Move constructor from other states

  • from : state from which the object is being converted
Parameters
op: the object that is being converted

Member Function Documentation

◆ AllocHandler() [1/2]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
static void XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::AllocHandler ( ConcreteOperation< Derived, true, HdlrFactory, Args... > &  me)
inlinestaticprotected

◆ AllocHandler() [2/2]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
static void XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::AllocHandler ( ConcreteOperation< Derived, false, HdlrFactory, Args... > &  me)
inlinestaticprotected

◆ Move()

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
Operation<HasHndl>* XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::Move ( )
inlinevirtual

Move current object into newly allocated instance

Returns
: the new instance

Implements XrdCl::Operation< HasHndl >.

◆ operator>>()

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
template<typename Hdlr >
Derived<true> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::operator>> ( Hdlr &&  hdlr)
inline

Adds ResponseHandler/function/functor/lambda/future handler for the operation.

Note: due to reference collapsing this covers both l-value and r-value references.

Parameters
func: function/functor/lambda

◆ operator|() [1/5]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
Derived<true> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::operator| ( Operation< true > &  op)
inline

Creates a pipeline of 2 or more operations

Parameters
op: operation to add
Returns
: handled operation

◆ operator|() [2/5]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
Derived<true> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::operator| ( Operation< true > &&  op)
inline

Creates a pipeline of 2 or more operations

Parameters
op: operation to add
Returns
: handled operation

◆ operator|() [3/5]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
Derived<true> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::operator| ( Operation< false > &  op)
inline

Creates a pipeline of 2 or more operations

Parameters
opoperation to add
Returns
handled operation

◆ operator|() [4/5]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
Derived<true> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::operator| ( Operation< false > &&  op)
inline

Creates a pipeline of 2 or more operations

Parameters
op: operation to add
Returns
: handled operation

◆ operator|() [5/5]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
Derived<true> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::operator| ( FinalOperation &&  fo)
inline

Adds a final operation to the pipeline.

◆ PipeImpl() [1/2]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
static Derived<true> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::PipeImpl ( ConcreteOperation< Derived, HasHndl, HdlrFactory, Args... > &  me,
Operation< true > &  op 
)
inlinestaticprotected

Implements operator| functionality

Parameters
me: reference to myself (*this)
op: reference to the other operation
Returns
: move-copy of myself

Referenced by XrdCl::ConcreteOperation< VectorWriteImpl, HasHndl, Resp< void >, Arguments... >::operator|().

◆ PipeImpl() [2/2]

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
static Derived<true> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::PipeImpl ( ConcreteOperation< Derived, HasHndl, HdlrFactory, Args... > &  me,
Operation< false > &  op 
)
inlinestaticprotected

Implements operator| functionality

Parameters
me: reference to myself (*this)
op: reference to the other operation
Returns
: move-copy of myself

◆ StreamImpl()

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
Derived<true> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::StreamImpl ( ResponseHandler handler)
inlineprotected

Implements operator>> functionality

Parameters
h: handler to be added @
Returns
: return an instance of Derived<true>

Referenced by XrdCl::ConcreteOperation< VectorWriteImpl, HasHndl, Resp< void >, Arguments... >::operator>>().

◆ Timeout()

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
Derived<HasHndl> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::Timeout ( uint16_t  timeout)
inline

Set operation timeout.

◆ ToHandled()

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
Operation<true>* XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::ToHandled ( )
inlinevirtual

Transform operation to handled

Returns
Operation<true>&

Implements XrdCl::Operation< HasHndl >.

◆ Transform()

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
template<bool to>
Derived<to> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::Transform ( )
inlineprotected

Transform into a new instance with desired state

Returns
: new instance in the desired state

Friends And Related Function Documentation

◆ ConcreteOperation

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
template<template< bool > class, bool , typename , typename ... >
friend class ConcreteOperation
friend

Member Data Documentation

◆ args

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
std::tuple<Args...> XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::args
protected

Operation arguments.

◆ timeout

template<template< bool > class Derived, bool HasHndl, typename HdlrFactory, typename ... Args>
uint16_t XrdCl::ConcreteOperation< Derived, HasHndl, HdlrFactory, Args >::timeout
protected

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