--- parser3/src/include/pa_exception.h 2003/01/23 15:38:05 1.38.2.1 +++ parser3/src/include/pa_exception.h 2003/01/28 15:16:49 1.38.2.9 @@ -8,24 +8,24 @@ #ifndef PA_EXCEPTION_H #define PA_EXCEPTION_H -static const char* IDENT_EXCEPTION_H="$Date: 2003/01/23 15:38:05 $"; - -//#include "pa_types.h" -#include "pa_pool.h" +static const char* IDENT_EXCEPTION_H="$Date: 2003/01/28 15:16:49 $"; // forwards -class String; +typedef object_ptr ConstStringPtr; // defines class Exception { public: + static const char *undefined_type; + static const ConstStringPtr undefined_source; + Exception(); Exception( const char *atype, - object_ptr aproblem_source, + ConstStringPtr aproblem_source, const char *comment_fmt, ...); Exception(const Exception& src): ftype(src.ftype), @@ -41,7 +41,7 @@ public: #ifdef XML Exception( - const String *aproblem_source, + ConstStringPtr aproblem_source, GdomeException& exc); #endif @@ -53,9 +53,9 @@ public: return ftype?ftype:""; } /// extracts exception problem_source - object_ptr problem_source() const; /// extracts exception comment + ConstStringPtr problem_source() const; /// extracts exception comment const char *comment(bool can_be_empty=false) const { - const char *result=fcomment.get()!=0 && *fcomment?fcomment.get():0; + const char *result=fcomment.get()!=0 && *fcomment.get()?fcomment.get():0; if(can_be_empty) return result; else @@ -65,9 +65,12 @@ public: private: const char *ftype; - object_ptr fproblem_source; - smart_ptr fcomment; + ConstStringPtr fproblem_source; + CharPtr fcomment; }; +const char *undefined_type=0; +const ConstStringPtr Exception::undefined_source(0); + #endif