xrootd
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
XrdCl::FSExecutor Class Reference

Execute queries given as a commandline. More...

#include <XrdClFSExecutor.hh>

Collaboration diagram for XrdCl::FSExecutor:
Collaboration graph
[legend]

Public Types

typedef std::vector< std::string > CommandParams
 Definition of command argument list. More...
 
typedef XRootDStatus(* Command )(FileSystem *fs, Env *env, const CommandParams &args)
 Definition of a command. More...
 

Public Member Functions

 FSExecutor (const URL &url, Env *env=0)
 
 ~FSExecutor ()
 Destructor. More...
 
bool AddCommand (const std::string &name, Command command)
 
XRootDStatus Execute (const std::string &commandline)
 
EnvGetEnv ()
 Get the environment. More...
 

Private Types

typedef std::map< std::string,
Command
CommandMap
 

Private Attributes

FileSystempFS
 
EnvpEnv
 
CommandMap pCommands
 

Detailed Description

Execute queries given as a commandline.

Member Typedef Documentation

typedef XRootDStatus(* XrdCl::FSExecutor::Command)(FileSystem *fs, Env *env, const CommandParams &args)

Definition of a command.

typedef std::map<std::string, Command> XrdCl::FSExecutor::CommandMap
private
typedef std::vector<std::string> XrdCl::FSExecutor::CommandParams

Definition of command argument list.

Constructor & Destructor Documentation

XrdCl::FSExecutor::FSExecutor ( const URL url,
Env env = 0 
)

Constructor

Parameters
urlthe server that the executor should contact
envexecution environment, the executor takes ownership over it

References pEnv, and pFS.

XrdCl::FSExecutor::~FSExecutor ( )

Destructor.

References pEnv, and pFS.

Member Function Documentation

bool XrdCl::FSExecutor::AddCommand ( const std::string &  name,
Command  command 
)

Add a command to the set of known commands

Parameters
namename of the command
commandfunction pointer
Returns
status

References XrdCl::AppMsg, XrdCl::Log::Error(), XrdCl::DefaultEnv::GetLog(), and pCommands.

Referenced by CreateExecutor().

XRootDStatus XrdCl::FSExecutor::Execute ( const std::string &  commandline)

Execute the given commandline

Parameters
commandlinethe commandline to be executed, a space separated list of parameters, first of which is the command name
Returns
status of the execution

References XrdCl::AppMsg, XrdCl::Log::Debug(), XrdCl::Log::Dump(), XrdCl::Log::Error(), XrdCl::errUnknownCommand, XrdCl::DefaultEnv::GetLog(), pCommands, pEnv, pFS, XrdCl::Utils::splitString(), and XrdCl::stError.

Referenced by ExecuteCommand().

Env* XrdCl::FSExecutor::GetEnv ( )
inline

Get the environment.

References pEnv.

Member Data Documentation

CommandMap XrdCl::FSExecutor::pCommands
private

Referenced by AddCommand(), and Execute().

Env* XrdCl::FSExecutor::pEnv
private
FileSystem* XrdCl::FSExecutor::pFS
private

Referenced by Execute(), FSExecutor(), and ~FSExecutor().


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