summaryrefslogtreecommitdiff
path: root/ACE/ACEXML/common/SAXExceptions.h
blob: ac7cf70b1abf23879520052e4faba5be1abd24d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
// -*- C++ -*-

//=============================================================================
/**
 *  @file    SAXExceptions.h
 *
 *  $Id$
 *
 *  @author Nanbor Wang <nanbor@cs.wustl.edu>
 */
//=============================================================================

#ifndef _ACEXML_SAXEXCEPTIONS_H_
#define _ACEXML_SAXEXCEPTIONS_H_

#include /**/ "ace/pre.h"
#include "ACEXML/common/ACEXML_Export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "ACEXML/common/Exception.h"

/**
 * @class ACEXML_SAXException
 *
 * @brief ACEXML_SAXException
 *
 * ACEXML_SAXException is the mother of all SAX related exceptions.
 */
class ACEXML_Export ACEXML_SAXException : public ACEXML_Exception
{
public:
  /// Default constructor.
  ACEXML_SAXException (void);

  /// Constructor initializing the exception message.
  ACEXML_SAXException (const ACEXML_Char *msg);

  /// Assignment operator
  ACEXML_SAXException& operator= (const ACEXML_SAXException& src);

  /// Copy constructor.
  ACEXML_SAXException (const ACEXML_SAXException &ex);

  /// Destructor.
  virtual ~ACEXML_SAXException (void);

  /// Throw the exception.
  virtual void _raise (void);

  /// Static narrow operation.
  static ACEXML_SAXException* _downcast (ACEXML_Exception* ex);

  /// Return the name of the exception.
  virtual const ACEXML_Char *id (void) const;

  /// Return the extra message accompanying the exception.
  const ACEXML_Char *message (void) const;

  virtual ACEXML_Exception *duplicate (void) const;

  virtual int is_a (const ACEXML_Char *name);

  virtual void print (void) const;

protected:
  static const ACEXML_Char * exception_name_;

  /// A message providing more information about the exception being thrown.
  ACEXML_Char *message_;
};

/**
 * @class ACEXML_SAXNotSupportedException SAXExceptions.h "ACEXML/common/SAXExceptions.h"
 *
 * @brief ACEXML_SAXNotSupportedException
 */
class ACEXML_Export ACEXML_SAXNotSupportedException
  : public ACEXML_SAXException
{
public:
  /// Default constructor.
  ACEXML_SAXNotSupportedException (void);

  /// Copy constructor.
  ACEXML_SAXNotSupportedException (const ACEXML_SAXNotSupportedException &ex);

  /// Assignment operator
  ACEXML_SAXNotSupportedException& operator= (const ACEXML_SAXNotSupportedException &ex);

  /// Constructor which accepts an informational message
  ACEXML_SAXNotSupportedException (const ACEXML_Char* msg);

  /// Destructor.
  virtual ~ACEXML_SAXNotSupportedException (void);

  /// Throw the exception.
  virtual void _raise (void);

  /// Static narrow operation.
  static ACEXML_SAXNotSupportedException* _downcast (ACEXML_Exception* ex);

  virtual const ACEXML_Char *id (void) const;

  virtual ACEXML_Exception *duplicate (void) const;

  virtual int is_a (const ACEXML_Char *name);

  virtual void print (void) const;

protected:
  static const ACEXML_Char exception_name_[];
};

/**
 * @class ACEXML_SAXNotRecognizedException SAXExceptions.h "ACEXML/common/SAXExceptions.h"
 *
 * @brief ACEXML_SAXNotRecognizedException
 */
class ACEXML_Export ACEXML_SAXNotRecognizedException
  : public ACEXML_SAXException
{
public:
  /// Default constructor.
  ACEXML_SAXNotRecognizedException (void);

  /// Constructor with an initializing exception message.
  ACEXML_SAXNotRecognizedException (const ACEXML_Char *msg);

  /// Copy constructor.
  ACEXML_SAXNotRecognizedException (const ACEXML_SAXNotRecognizedException &ex);

  /// Assignment operator.
  ACEXML_SAXNotRecognizedException& operator= (const ACEXML_SAXNotRecognizedException &ex);

  /// Destructor.
  virtual ~ACEXML_SAXNotRecognizedException (void);

  /// Throw the exception.
  virtual void _raise (void);

  /// Static narrow operation.
  static ACEXML_SAXNotRecognizedException* _downcast (ACEXML_Exception* ex);

  virtual const ACEXML_Char *id (void) const;

  virtual ACEXML_Exception *duplicate (void) const;

  virtual int is_a (const ACEXML_Char *name);

  virtual void print (void) const;

protected:
  static const ACEXML_Char exception_name_[];
};

/**
 * @class ACEXML_SAXParseException SAXExceptions.h "ACEXML/common/SAXExceptions.h"
 *
 * @brief ACEXML_SAXParseException
 *
 */
class ACEXML_Export ACEXML_SAXParseException
  : public ACEXML_SAXException
{
public:
  /// Default constructor.
  ACEXML_SAXParseException (void);

  /// Constructor with an initializing exception message.
  ACEXML_SAXParseException (const ACEXML_Char *msg);

  /// Copy constructor.
  ACEXML_SAXParseException (const ACEXML_SAXParseException &ex);

  /// Assignment operator.
  ACEXML_SAXParseException& operator= (const ACEXML_SAXParseException &ex);

  /// Destructor.
  virtual ~ACEXML_SAXParseException (void);

  /// Throw the exception.
  virtual void _raise (void);

  /// Static narrow operation.
  static ACEXML_SAXParseException* _downcast (ACEXML_Exception* ex);

  virtual const ACEXML_Char *id (void) const;

  virtual ACEXML_Exception *duplicate (void) const;

  virtual int is_a (const ACEXML_Char *name);

  virtual void print (void) const;

protected:
  static const ACEXML_Char exception_name_[];
};

#if defined (__ACEXML_INLINE__)
# include "ACEXML/common/SAXExceptions.inl"
#endif /* __ACEXML_INLINE__ */

#include /**/ "ace/post.h"

#endif /* _ACEXML_SAXEXCEPTIONS_H_ */