xrootd
Loading...
Searching...
No Matches
XrdOucName2Name.hh
Go to the documentation of this file.
1#ifndef __XRDOUCNAME2NAME_H__
2#define __XRDOUCNAME2NAME_H__
3/******************************************************************************/
4/* */
5/* X r d O u c n a m e 2 n a m e . h h */
6/* */
7/* (c) 2006 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* All Rights Reserved */
9/* Produced by Andrew Hanushevsky for Stanford University under contract */
10/* DE-AC02-76-SFO0515 with the Department of Energy */
11/* */
12/* This file is part of the XRootD software suite. */
13/* */
14/* XRootD is free software: you can redistribute it and/or modify it under */
15/* the terms of the GNU Lesser General Public License as published by the */
16/* Free Software Foundation, either version 3 of the License, or (at your */
17/* option) any later version. */
18/* */
19/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22/* License for more details. */
23/* */
24/* You should have received a copy of the GNU Lesser General Public License */
25/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27/* */
28/* The copyright holder's institutional names and contributor's names may not */
29/* be used to endorse or promote products derived from this software without */
30/* specific prior written permission of the institution or contributor. */
31/******************************************************************************/
32
33#include <string>
34#include <vector>
35
36/******************************************************************************/
37/* X r d O u c N a m e 2 N a m e */
38/******************************************************************************/
39
47
49{
50public:
51
52//------------------------------------------------------------------------------
64//------------------------------------------------------------------------------
65
66virtual int lfn2pfn(const char *lfn, char *buff, int blen) = 0;
67
68//------------------------------------------------------------------------------
82//------------------------------------------------------------------------------
83
84virtual int lfn2rfn(const char *lfn, char *buff, int blen) = 0;
85
86//------------------------------------------------------------------------------
100//------------------------------------------------------------------------------
101
102virtual int pfn2lfn(const char *pfn, char *buff, int blen) = 0;
103
104//------------------------------------------------------------------------------
106//------------------------------------------------------------------------------
107
109
110//------------------------------------------------------------------------------
112//------------------------------------------------------------------------------
113
115};
116
117/******************************************************************************/
118/* X r d O u c N a m e 2 N a m e V e c */
119/******************************************************************************/
120
135
137
142
144{
145public:
146
147//------------------------------------------------------------------------------
154//------------------------------------------------------------------------------
155
156virtual std::vector<std::string *> *n2nVec(const char *lfn)=0;
157
158//------------------------------------------------------------------------------
162//------------------------------------------------------------------------------
163
164virtual void Recycle(std::vector<std::string *> *nvP)
165 {if (nvP)
166 {for (unsigned int i = 0; i < nvP->size(); i++)
167 {delete (*nvP)[i];}
168 delete nvP;
169 }
170 }
171
172//------------------------------------------------------------------------------
174//------------------------------------------------------------------------------
175
178};
179
180/******************************************************************************/
181/* X r d O u c g e t N a m e 2 N a m e */
182/******************************************************************************/
183
184//------------------------------------------------------------------------------
209//------------------------------------------------------------------------------
210
211class XrdSysError;
212
213#define XrdOucgetName2NameArgs XrdSysError *eDest, \
214 const char *confg, \
215 const char *parms, \
216 const char *lroot, \
217 const char *rroot
218
220
221//------------------------------------------------------------------------------
227//------------------------------------------------------------------------------
228
234#endif
XrdOucName2Name * XrdOucgetName2Name(XrdOucgetName2NameArgs)
#define XrdOucgetName2NameArgs
Definition XrdOucName2Name.hh:213
XrdOucName2NameVec *Name2NameVec;.
Definition XrdOucName2Name.hh:144
XrdOucName2NameVec()
Constructor and Destructor.
Definition XrdOucName2Name.hh:176
virtual std::vector< std::string * > * n2nVec(const char *lfn)=0
virtual ~XrdOucName2NameVec()
Definition XrdOucName2Name.hh:177
virtual void Recycle(std::vector< std::string * > *nvP)
Definition XrdOucName2Name.hh:164
Definition XrdOucName2Name.hh:49
virtual int lfn2pfn(const char *lfn, char *buff, int blen)=0
XrdOucName2Name()
Constructor.
Definition XrdOucName2Name.hh:108
virtual int pfn2lfn(const char *pfn, char *buff, int blen)=0
virtual int lfn2rfn(const char *lfn, char *buff, int blen)=0
virtual ~XrdOucName2Name()
Destructor.
Definition XrdOucName2Name.hh:114
Definition XrdSysError.hh:90