• Classes
  • Modules
  • Namespaces
  • Files
  • Related Pages
  • File List
  • File Members

baciRecovery.h

Go to the documentation of this file.
00001 #ifndef baciRecovery_h
00002 #define baciRecovery_h
00003 
00004 /*******************************************************************
00005 * ALMA - Atacama Large Millimiter Array
00006 * (c) European Southern Observatory, 2003 
00007 *
00008 *This library is free software; you can redistribute it and/or
00009 *modify it under the terms of the GNU Lesser General Public
00010 *License as published by the Free Software Foundation; either
00011 *version 2.1 of the License, or (at your option) any later version.
00012 *
00013 *This library is distributed in the hope that it will be useful,
00014 *but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 *Lesser General Public License for more details.
00017 *
00018 *You should have received a copy of the GNU Lesser General Public
00019 *License along with this library; if not, write to the Free Software
00020 *Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00021 *
00022 * "@(#) $Id: baciRecovery.h,v 1.101 2011/09/02 11:39:00 bjeram Exp $"
00023 *
00024 * who       when        what
00025 * --------  ----------  ----------------------------------------------
00026 * msekoran  2001/02/20  completely modified
00027 */
00028 
00034 #ifndef __cplusplus
00035 #error This is a C++ include file and cannot be used from plain C
00036 #endif
00037 
00038 #include <acsutil.h>
00039 #include <baciExport.h>
00040 
00041 #include <recoveryStore.h>
00042 #include <baciRecoverableObject.h>
00043 
00044 #include <ace/SString.h>
00045 #include <vector>
00046 
00047 namespace baci {
00048 
00052 #define BACI_RECOVERY_FILE_NAME "baci_recovery"
00053 
00057 #define MAX_IOR_LENGTH 800
00058 
00062 #define MAX_NAME_LENGTH 50
00063 
00077 class baci_EXPORT BACIRecoveryManager {
00078 
00079 public:
00080 
00084   BACIRecoveryManager();
00085   
00089   ~BACIRecoveryManager();
00090 
00095   static void loadRecovery(bool load);
00096 
00101   static void enableRecovery(bool enable);
00102 
00107   static void activatorName(const char * activatorName);
00108 
00113   static BACIRecoveryManager* getInstance(void);
00114  
00118   static void destroyInstance();
00119 
00124   void addRecoverableObject(RecoverableObject *object);
00125 
00130   void updateRecoverableObject(RecoverableObject *object);
00131 
00136   void removeRecoverableObject(RecoverableObject *object);
00137 
00142   ACE_CString_Vector getObjectsStartingWith(const char* namePrefix);
00143 
00148   const char* getObjectState(const char* name);
00149 
00155    char* generateObjectName(const char* namePrefix);
00156 
00157 private:
00158   
00163   recovery::RecoveryStore* store_mp;
00164 
00168   static BACIRecoveryManager* instance_mp;
00169 
00173   static bool load_m;
00174 
00178   static bool enabled_m;
00179 
00183   static const char * activatorName_mp;
00184     
00188     void operator=(const BACIRecoveryManager&);
00189     
00190 
00194     BACIRecoveryManager(const BACIRecoveryManager&);  
00195 };
00196 
00197  }; 
00198 
00199 #endif /* baciRecovery_h */
00200 
00201 
00202 
00203 
00204 
00205 

Generated on Mon May 4 2015 08:27:42 for ACS-2015.4 C++ API by  doxygen 1.7.0