XRootD
Loading...
Searching...
No Matches
XrdCl::OpenFileImpl< HasHndl > Class Template Reference

OpenFile operation (. More...

#include <XrdClZipOperations.hh>

Inheritance diagram for XrdCl::OpenFileImpl< HasHndl >:
Collaboration diagram for XrdCl::OpenFileImpl< HasHndl >:

Public Types

enum  {
  FnArg ,
  FlagsArg ,
  SizeArg ,
  Crc32Arg
}
 Argument indexes in the args tuple. More...
enum  Flags
 Open flags, may be or'd when appropriate. More...

Public Member Functions

std::string ToString ()
Public Member Functions inherited from XrdCl::ZipOperation< OpenFileImpl, HasHndl, Resp< void >, Arg< std::string >, Arg< OpenFlags::Flags >, Arg< uint64_t >, Arg< uint32_t > >
virtual ~ZipOperation ()
 Destructor.
Public Member Functions inherited from XrdCl::ConcreteOperation< OpenFileImpl, HasHndl, Resp< void >, Arguments... >
Operation< HasHndl > * Move ()
OpenFileImpl< true > operator>> (Hdlr &&hdlr)
OpenFileImpl< true > operator| (Operation< true > &op)
OpenFileImpl< HasHndl > Timeout (uint16_t timeout)
 Set operation timeout.
Operation< true > * ToHandled ()
Public Member Functions inherited from XrdCl::Operation< HasHndl >
 Operation ()
 Constructor.
template<bool from>
 Operation (Operation< from > &&op)
 Move constructor between template instances.
virtual ~Operation ()
 Destructor.

Protected Member Functions

XRootDStatus RunImpl (PipelineHandler *handler, uint16_t pipelineTimeout)
Protected Member Functions inherited from XrdCl::ConcreteOperation< OpenFileImpl, HasHndl, Resp< void >, Arguments... >
OpenFileImpl< true > StreamImpl (ResponseHandler *handler)
OpenFileImpl< toTransform ()
Protected Member Functions inherited from XrdCl::Operation< HasHndl >
void AddOperation (Operation< true > *op)
void Run (Timeout timeout, std::promise< XRootDStatus > prms, std::function< void(const XRootDStatus &)> final)

Additional Inherited Members

Static Protected Member Functions inherited from XrdCl::ConcreteOperation< OpenFileImpl, HasHndl, Resp< void >, Arguments... >
static void AllocHandler (ConcreteOperation< OpenFileImpl, true, Resp< void >, Args... > &me)
static OpenFileImpl< true > PipeImpl (ConcreteOperation< OpenFileImpl, HasHndl, Resp< void >, Args... > &me, Operation< true > &op)
Protected Attributes inherited from XrdCl::ZipOperation< OpenFileImpl, HasHndl, Resp< void >, Arg< std::string >, Arg< OpenFlags::Flags >, Arg< uint64_t >, Arg< uint32_t > >
Ctx< ZipArchivezip
 The file object itself.
Protected Attributes inherited from XrdCl::ConcreteOperation< OpenFileImpl, HasHndl, Resp< void >, Arguments... >
std::tuple< Args... > args
 Operation arguments.
uint16_t timeout
 Operation timeout.
Protected Attributes inherited from XrdCl::Operation< HasHndl >
std::unique_ptr< PipelineHandlerhandler
 Operation handler.
bool valid
 Flag indicating if it is a valid object.

Detailed Description

template<bool HasHndl>
class XrdCl::OpenFileImpl< HasHndl >

OpenFile operation (.

See also
ZipOperation)

Definition at line 135 of file XrdClZipOperations.hh.

Member Enumeration Documentation

◆ anonymous enum

template<bool HasHndl>
anonymous enum

Argument indexes in the args tuple.

Enumerator
FnArg 
FlagsArg 
SizeArg 
Crc32Arg 

Definition at line 149 of file XrdClZipOperations.hh.

◆ Flags

template<bool HasHndl>
enum XrdCl::OpenFlags::Flags

Open flags, may be or'd when appropriate.

Definition at line 75 of file XrdClFileSystem.hh.

76 {
77 None = 0,
86 New = kXR_new,
94// Append = kXR_open_apnd, //!< Open only for appending
98 POSC = kXR_posc,
104 SeqIO = kXR_seqio,
109 };
OpenFile operation (.

Member Function Documentation

◆ RunImpl()

template<bool HasHndl>
XRootDStatus XrdCl::OpenFileImpl< HasHndl >::RunImpl ( PipelineHandler * handler,
uint16_t pipelineTimeout )
inlineprotectedvirtual

RunImpl operation (

See also
Operation)
Parameters
params: container with parameters forwarded from previous operation
Returns
: status of the operation

Implements XrdCl::Operation< HasHndl >.

Definition at line 168 of file XrdClZipOperations.hh.

169 {
170 std::string &fn = std::get<FnArg>( this->args ).Get();
172 uint64_t size = std::get<SizeArg>( this->args ).Get();
173 uint32_t crc32 = std::get<Crc32Arg>( this->args ).Get();
174 XRootDStatus st = this->zip->OpenFile( fn, flags, size, crc32 );
175 if( !st.IsOK() ) return st;
176 handler->HandleResponse( new XRootDStatus(), nullptr );
177 return XRootDStatus();
178 }
std::unique_ptr< PipelineHandler > handler
Operation handler.

References XrdCl::ConcreteOperation< OpenFileImpl, HasHndl, Resp< void >, Arguments... >::args, XrdCl::Operation< HasHndl >::handler, XrdCl::Status::IsOK(), and XrdCl::ZipOperation< OpenFileImpl, HasHndl, Resp< void >, Arg< std::string >, Arg< OpenFlags::Flags >, Arg< uint64_t >, Arg< uint32_t > >::zip.

Here is the call graph for this function:

◆ ToString()

template<bool HasHndl>
std::string XrdCl::OpenFileImpl< HasHndl >::ToString ( )
inlinevirtual
Returns
: name of the operation (
See also
Operation)

Implements XrdCl::Operation< HasHndl >.

Definition at line 154 of file XrdClZipOperations.hh.

155 {
156 return "ZipOpenFile";
157 }

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