00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ACEXML_SVCCONF_HANDLER_H
00014 #define ACEXML_SVCCONF_HANDLER_H
00015
00016 #include "ACEXML/common/DefaultHandler.h"
00017 #include "ace/Service_Types.h"
00018
00019 #if (ACE_USES_CLASSIC_SVC_CONF == 0)
00020
00021 class ACE_Parsed_Info
00022 {
00023 public:
00024 ACE_Parsed_Info ();
00025 ~ACE_Parsed_Info ();
00026
00027
00028
00029
00030 int name (const ACEXML_Char *n);
00031 const ACEXML_Char *name (void);
00032
00033
00034
00035
00036 int service_type (int type);
00037 int service_type (void);
00038
00039
00040
00041
00042 int active (int a);
00043 int active (void);
00044
00045
00046
00047
00048 int path (const ACEXML_Char *n);
00049 const ACEXML_Char *path (void);
00050
00051
00052
00053
00054 int init_func (const ACEXML_Char *n);
00055 const ACEXML_Char *init_func (void);
00056
00057
00058
00059
00060 int init_params (const ACEXML_Char *n);
00061 const ACEXML_Char *init_params (void);
00062
00063
00064
00065
00066 void reset (void);
00067
00068 protected:
00069 ACEXML_Char *name_;
00070 int service_type_;
00071 int active_;
00072 ACEXML_Char *path_;
00073 ACEXML_Char *init_func_;
00074 ACEXML_Char *init_params_;
00075 };
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 class ACEXML_Svcconf_Handler : public ACEXML_DefaultHandler
00086 {
00087 public:
00088
00089
00090
00091 ACEXML_Svcconf_Handler (void);
00092
00093
00094
00095
00096 virtual ~ACEXML_Svcconf_Handler (void);
00097
00098
00099
00100
00101
00102
00103 virtual void characters (const ACEXML_Char *ch,
00104 int start,
00105 int length ACEXML_ENV_ARG_DECL)
00106 ;
00107
00108
00109
00110
00111 virtual void endDocument (ACEXML_ENV_SINGLE_ARG_DECL)
00112 ;
00113
00114
00115
00116
00117 virtual void endElement (const ACEXML_Char *namespaceURI,
00118 const ACEXML_Char *localName,
00119 const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
00120 ;
00121
00122
00123
00124
00125 virtual void endPrefixMapping (const ACEXML_Char *prefix ACEXML_ENV_ARG_DECL)
00126 ;
00127
00128
00129
00130
00131 virtual void ignorableWhitespace (const ACEXML_Char *ch,
00132 int start,
00133 int length ACEXML_ENV_ARG_DECL)
00134 ;
00135
00136
00137
00138
00139 virtual void processingInstruction (const ACEXML_Char *target,
00140 const ACEXML_Char *data ACEXML_ENV_ARG_DECL)
00141 ;
00142
00143
00144
00145
00146 virtual void setDocumentLocator (ACEXML_Locator *locator) ;
00147
00148
00149
00150
00151 virtual void skippedEntity (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
00152 ;
00153
00154
00155
00156
00157 virtual void startDocument (ACEXML_ENV_SINGLE_ARG_DECL)
00158 ;
00159
00160
00161
00162
00163 virtual void startElement (const ACEXML_Char *namespaceURI,
00164 const ACEXML_Char *localName,
00165 const ACEXML_Char *qName,
00166 ACEXML_Attributes *atts ACEXML_ENV_ARG_DECL)
00167 ;
00168
00169
00170
00171
00172 virtual void startPrefixMapping (const ACEXML_Char *prefix,
00173 const ACEXML_Char *uri ACEXML_ENV_ARG_DECL)
00174 ;
00175
00176
00177
00178
00179
00180
00181 virtual void notationDecl (const ACEXML_Char *name,
00182 const ACEXML_Char *publicId,
00183 const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
00184 ;
00185
00186
00187
00188
00189 virtual void unparsedEntityDecl (const ACEXML_Char *name,
00190 const ACEXML_Char *publicId,
00191 const ACEXML_Char *systemId,
00192 const ACEXML_Char *notationName ACEXML_ENV_ARG_DECL)
00193 ;
00194
00195
00196
00197
00198
00199
00200 virtual ACEXML_InputSource *resolveEntity (const ACEXML_Char *publicId,
00201 const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL)
00202 ;
00203
00204
00205
00206
00207
00208
00209 virtual void error (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00210 ;
00211
00212
00213
00214
00215 virtual void fatalError (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00216 ;
00217
00218
00219
00220
00221 virtual void warning (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00222 ;
00223
00224 protected:
00225
00226
00227
00228 int get_stream_id (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
00229
00230
00231
00232
00233 int get_id (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
00234
00235
00236
00237
00238 int get_dynamic_attrs (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
00239
00240
00241
00242
00243 int get_initializer_attrs (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
00244
00245
00246
00247
00248 int get_static_attrs (ACEXML_Attributes *alist ACEXML_ENV_ARG_DECL);
00249
00250 private:
00251
00252 int in_stream_def_;
00253
00254
00255 int in_module_;
00256
00257
00258 ACE_Service_Type *stream_svc_type_;
00259 ACE_Stream_Type *stream_;
00260
00261
00262
00263 ACE_Parsed_Info parsed_info_;
00264
00265 ACE_Parsed_Info stream_info_;
00266
00267 ACEXML_Locator* locator_;
00268 };
00269
00270 #if defined (__ACEXML_INLINE__)
00271 # include "Svcconf_Handler.inl"
00272 #endif
00273
00274 #endif
00275
00276 #endif