Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:27:55

0001 #ifndef __XRDOUCPINOBJECT_HH__
0002 #define __XRDOUCPINOBJECT_HH__
0003 /******************************************************************************/
0004 /*                                                                            */
0005 /*                    X r d O u c P i n O b j e c t . h h                     */
0006 /*                                                                            */
0007 /* (c) 2020 by the Board of Trustees of the Leland Stanford, Jr., University  */
0008 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
0009 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
0010 /*                                                                            */
0011 /* This file is part of the XRootD software suite.                            */
0012 /*                                                                            */
0013 /* XRootD is free software: you can redistribute it and/or modify it under    */
0014 /* the terms of the GNU Lesser General Public License as published by the     */
0015 /* Free Software Foundation, either version 3 of the License, or (at your     */
0016 /* option) any later version.                                                 */
0017 /*                                                                            */
0018 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
0019 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
0020 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
0021 /* License for more details.                                                  */
0022 /*                                                                            */
0023 /* You should have received a copy of the GNU Lesser General Public License   */
0024 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file  */
0025 /* COPYING (GPL license).  If not, see <http://www.gnu.org/licenses/>.        */
0026 /*                                                                            */
0027 /* The copyright holder's institutional names and contributor's names may not */
0028 /* be used to endorse or promote products derived from this software without  */
0029 /* specific prior written permission of the institution or contributor.       */
0030 /******************************************************************************/
0031 
0032 /*! The XrdOucPinObject defines a generic interface to obtain an instance of a
0033     plugin. Post R5 plugins must have an instance of this class in the shared
0034     library that implements the plugin named in the template parameter. The
0035     plugin handler calls getInstance() to obtain an actual instance of it.
0036 */
0037 
0038 class XrdOucEnv;
0039 class XrdSysLogger;
0040 
0041 template<class T>
0042 class XrdOucPinObject
0043 {
0044 public:
0045 
0046 //------------------------------------------------------------------------------
0047 //! Get the an instance of a plugin.
0048 //!
0049 //! @param parms  Pointer to any parameters, may be nil or the null string.
0050 //! @param envR   Reference to the environment. If the server was started with
0051 //!               a configuration file then key "configFN" holds its path.
0052 //! @param logR   Pointer to logging object that should be assocaited with
0053 //!               and XrdSysError object to relay messages.
0054 //! @param prevP  Pointer to the previous instance if stacked, else nil.
0055 //------------------------------------------------------------------------------
0056 
0057 virtual
0058 T              *getInstance(const char   *parms,
0059                             XrdOucEnv    &envR,
0060                             XrdSysLogger &logR,
0061                             T            *prevP) = 0;
0062 
0063 //------------------------------------------------------------------------------
0064 //! Constructor & Destructor
0065 //------------------------------------------------------------------------------
0066 
0067                 XrdOucPinObject() {}
0068 
0069 virtual        ~XrdOucPinObject() {}
0070 };
0071 #endif