XRootD
XrdOucName2NameVec Class Referenceabstract

XrdOucName2NameVec *Name2NameVec;. More...

#include <XrdOucName2Name.hh>

+ Inheritance diagram for XrdOucName2NameVec:
+ Collaboration diagram for XrdOucName2NameVec:

Public Member Functions

 XrdOucName2NameVec ()
 Constructor and Destructor. More...
 
virtual ~XrdOucName2NameVec ()
 
virtual std::vector< std::string * > * n2nVec (const char *lfn)=0
 
virtual void Recycle (std::vector< std::string * > *nvP)
 

Detailed Description

XrdOucName2NameVec *Name2NameVec;.

Class XrdOucName2NameVec must be used to define a companion name translation mechanism. It is optional but highly recommended and may in fact be required by certain statlib plug-ins specific by the 'oss.statlib' directive. Refer to plug-in documentation to see if it requires this form of name2name translator. This translator should return all possible translations of a given logical file name. After an instance of the XrdOucName2Name translator is obtained (which implies it's full initilization) the default oss plug-in check if the symbol 'Name2NameVec' is present in the shared library. If it does, it obtains the contents of the symbol which should be a pointer to an object derived from the following class. That object is used to obtain a list of possible name translations. Initialization is is simplified if your implementation inherits XrdOucName2Name as well as XrdOucName2Namevec. The symbol that contains the pointer must be defined at file level as follows: It should be set during XrdOucName2Name initialization to point to an instance of the object. The methods defined for this class must be thread-safe. The default XrdOucName2Name translator also includes the XrdOucName2NameVec translator.

Definition at line 143 of file XrdOucName2Name.hh.

Constructor & Destructor Documentation

◆ XrdOucName2NameVec()

XrdOucName2NameVec::XrdOucName2NameVec ( )
inline

Constructor and Destructor.

Definition at line 176 of file XrdOucName2Name.hh.

176 {}

◆ ~XrdOucName2NameVec()

virtual XrdOucName2NameVec::~XrdOucName2NameVec ( )
inlinevirtual

Definition at line 177 of file XrdOucName2Name.hh.

177 {}

Member Function Documentation

◆ n2nVec()

virtual std::vector<std::string *>* XrdOucName2NameVec::n2nVec ( const char *  lfn)
pure virtual

Map a logical file name to all of its possible physical file names.

Parameters
lfn-> Logical file name.
Returns
Success: Pointer to a vector of strings of physical file names. Failure: A nil pointer indicating that no translation exists.

Implemented in XrdOucN2N.

◆ Recycle()

virtual void XrdOucName2NameVec::Recycle ( std::vector< std::string * > *  nvP)
inlinevirtual

Release all storage occupied by the vector returned by n2nVec().

Parameters
nvP-> Vector returned by n2nVec().

Definition at line 164 of file XrdOucName2Name.hh.

165  {if (nvP)
166  {for (unsigned int i = 0; i < nvP->size(); i++)
167  {delete (*nvP)[i];}
168  delete nvP;
169  }
170  }

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