# MEDversionedApi.hxx

Aller à la documentation de ce fichier.

    00001 /*  This file is part of MED.
    00002  *
    00003  *  COPYRIGHT (C) 1999 - 2012  EDF R&D, CEA/DEN
    00004  *  MED is free software: you can redistribute it and/or modify
    00005  *  it under the terms of the GNU Lesser General Public License as published by
    00006  *  the Free Software Foundation, either version 3 of the License, or
    00007  *  (at your option) any later version.
    00008  *
    00009  *  MED is distributed in the hope that it will be useful,
    00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    00012  *  GNU Lesser General Public License for more details.
    00013  *
    00014  *  You should have received a copy of the GNU Lesser General Public License
    00015  *  along with MED.  If not, see <http://www.gnu.org/licenses/>.
    00016  */
    00017 #ifndef MED_VERSIONED_API_HXX
    00018 #define MED_VERSIONED_API_HXX
    00019
    00020 #include <string>
    00021 #include <map>
    00022 #include <cassert>
    00023 #include <cstdarg>
    00024
    00025 #include <med_misc.h>
    00026
    00027 typedef std::string     keyType;
    00028
    00029 class MEDC_EXPORT MED_VERSIONED_API : public std::map<keyType,
    00030                                           MedFuncType >
    00031 {
    00032 public :
    00033   static MED_VERSIONED_API& Instance();
    00034   MedFuncType operator[]( const keyType & c ) const;
    00035   void f77ApiIsSet();
    00036
    00037 private:
    00038   bool _f77ApiIsSet;
    00039   MED_VERSIONED_API();
    00040   MED_VERSIONED_API(const MED_VERSIONED_API &){};
    00041   //MED_VERSIONED_API& operator =(const MED_VERSIONED_API &){};
    00042   ~MED_VERSIONED_API(){};
    00043 };
    00044
    00045
    00046 extern "C" MedFuncType
    00047 getVersionedApi(const char * const keycharpart,
    00048                 const char * const keynumpart);
    00049
    00050 extern "C" void MEDC_EXPORT f77ApiIsSet(void * obj);
    00051
    00052 #endif