http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PanicHandler.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2003,2004 The Apache Software Foundation.
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 /*
00018  * $Log: PanicHandler.hpp,v $
00019  * Revision 1.7  2004/09/08 13:56:22  peiyongz
00020  * Apache License Version 2.0
00021  *
00022  * Revision 1.6  2003/12/24 17:12:21  cargilld
00023  * Memory management update.
00024  *
00025  * Revision 1.5  2003/12/24 15:24:13  cargilld
00026  * More updates to memory management so that the static memory manager.
00027  *
00028  * Revision 1.4  2003/05/22 18:15:16  neilg
00029  * The PanicHandler interface should not inherit from XMemory.
00030  * The reason for this is that the default implementation does not
00031  * allocate memory dynamically and if such an inheritance relation existed,
00032  * a user would have to be very careful about installing a memory
00033  * handler on their own PanicHandler before handing it to the
00034  * XMLPlatformUtils::Initialize() method, since otherwise
00035  * the (uninitialized) XMLPlatformUtils::fgMemoryManager would be used
00036  * upon construction of their PanicHandler implementation.
00037  *
00038  * Revision 1.3  2003/05/15 19:04:35  knoaman
00039  * Partial implementation of the configurable memory manager.
00040  *
00041  * Revision 1.2  2003/03/10 16:05:11  peiyongz
00042  * assignment operator
00043  *
00044  * Revision 1.1  2003/03/09 17:06:16  peiyongz
00045  * PanicHandler
00046  *
00047  * $Id: PanicHandler.hpp,v 1.7 2004/09/08 13:56:22 peiyongz Exp $
00048  *
00049  */
00050 
00051 #ifndef PANICHANDLER_HPP
00052 #define PANICHANDLER_HPP
00053 
00054 #include <xercesc/util/XMemory.hpp>
00055 
00056 XERCES_CPP_NAMESPACE_BEGIN
00057 
00073 class  PanicHandler
00074 {
00075 public:
00076 
00079     enum PanicReasons
00080     {
00081           Panic_NoTransService
00082         , Panic_NoDefTranscoder
00083         , Panic_CantFindLib
00084         , Panic_UnknownMsgDomain
00085         , Panic_CantLoadMsgDomain
00086         , Panic_SynchronizationErr
00087         , Panic_SystemInit
00088 
00089         , PanicReasons_Count
00090     };
00092 
00093 protected:
00094 
00098     PanicHandler(){};
00099 
00100 public:
00101 
00103     virtual ~PanicHandler(){};   
00105 
00123     virtual void panic(const PanicHandler::PanicReasons reason) = 0;
00125 
00126     static const char* getPanicReasonString(const PanicHandler::PanicReasons reason);
00127     
00128 private:
00129 
00130     /* Unimplemented Constructors and operators */
00131     /* Copy constructor */
00132     PanicHandler(const PanicHandler&);
00133     
00135     PanicHandler& operator=(const PanicHandler&);
00136 };
00137 
00138 XERCES_CPP_NAMESPACE_END
00139 
00140 #endif


Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.