oaIExceptionImpl.h

Go to the documentation of this file.
00001 // *****************************************************************************
00002 // *****************************************************************************
00003 // oaIExceptionImpl.h
00004 // 
00005 // This file contains the definition of the IExceptionImpl class. This class
00006 // derives from the oaCommon::IExceptio class and serves as a base class for
00007 // derived, plug-in exception classes that implement the IException
00008 // functionality and have their message strings defined in an array of strings
00009 // mapped to an associated set of enumerated msgId values.
00010 //
00011 // *****************************************************************************
00012 // Except as specified in the OpenAccess terms of use of Cadence or Silicon
00013 // Integration Initiative, this material may not be copied, modified,
00014 // re-published, uploaded, executed, or distributed in any way, in any medium,
00015 // in whole or in part, without prior written permission from Cadence.
00016 //
00017 //                Copyright 2002-2008 Cadence Design Systems, Inc.
00018 //                           All Rights Reserved.
00019 //
00020 //  $Author: pdsim $
00021 //  $Revision: #2 $
00022 //  $Date: 2006/08/30 $
00023 //  $State: Exp $
00024 // *****************************************************************************
00025 // *****************************************************************************
00026 
00027 
00028 
00029 #if !defined(oaIExceptionImpl_P)
00030 #define oaIExceptionImpl_P
00031 
00032 
00033 
00034 // *****************************************************************************
00035 // Nested includes
00036 // *****************************************************************************
00037 #include "oaCommonIBase.h"
00038 #include "oaString.h"
00039 
00040 
00041 
00042 // *****************************************************************************
00043 // Declare and define types in the OpenAccess namespace.
00044 // *****************************************************************************
00045 BEGIN_OA_NAMESPACE
00046 
00047 
00048 
00049 // *****************************************************************************
00050 // IExceptionImpl
00051 // *****************************************************************************
00052 class OA_BASE_DLL_API IExceptionImpl : public oaCommon::IException {
00053 public:
00054     virtual oaUInt4         getMsgId() const;
00055     virtual const char      *getMsg() const;
00056 
00057 protected:
00058                             IExceptionImpl(oaUInt4 msgIdIn);
00059 
00060     virtual const oaString  *getMsgsTable() const = 0;
00061     virtual oaUInt4         getMsgIdStartValue() const = 0;
00062     virtual oaUInt4         getMsgIdEndValue() const = 0;
00063 
00064     const oaString          &getFormatString() const;
00065     void                    format(va_list &args);
00066     static oaUInt4          getOSErrorStr(oaString &errStr);
00067 
00068     oaString                msg;
00069     oaUInt4                 msgId;
00070 };
00071 
00072 
00073 
00074 END_OA_NAMESPACE
00075 
00076 #endif

Return to top of page