00001 #ifndef DOMBuilder_HEADER_GUARD_
00002 #define DOMBuilder_HEADER_GUARD_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <xercesc/util/XercesDefs.hpp>
00027
00028 XERCES_CPP_NAMESPACE_BEGIN
00029
00030
00031 class DOMErrorHandler;
00032 class DOMEntityResolver;
00033 class DOMInputSource;
00034 class DOMBuilderFilter;
00035 class DOMNode;
00036 class DOMDocument;
00037 class Grammar;
00038
00049 class CDOM_EXPORT DOMBuilder
00050 {
00051 protected :
00052
00053
00054
00057 DOMBuilder() {};
00059
00060 private:
00061
00062
00063
00066 DOMBuilder(const DOMBuilder &);
00067 DOMBuilder & operator = (const DOMBuilder &);
00069
00070 public:
00071
00072
00073
00080 virtual ~DOMBuilder() {};
00082
00083
00084
00085
00115 enum ActionType
00116 {
00117 ACTION_REPLACE = 1,
00118 ACTION_APPEND_AS_CHILDREN = 2,
00119 ACTION_INSERT_AFTER = 3,
00120 ACTION_INSERT_BEFORE = 4
00121 };
00123
00124
00125
00126
00129
00130
00131
00132
00133
00145 virtual DOMErrorHandler* getErrorHandler() = 0;
00146
00158 virtual const DOMErrorHandler* getErrorHandler() const = 0;
00159
00171 virtual DOMEntityResolver* getEntityResolver() = 0;
00172
00184 virtual const DOMEntityResolver* getEntityResolver() const = 0;
00185
00197 virtual DOMBuilderFilter* getFilter() = 0;
00198
00210 virtual const DOMBuilderFilter* getFilter() const = 0;
00211
00212
00213
00214
00232 virtual void setErrorHandler(DOMErrorHandler* const handler) = 0;
00233
00253 virtual void setEntityResolver(DOMEntityResolver* const handler) = 0;
00254
00276 virtual void setFilter(DOMBuilderFilter* const filter) = 0;
00277
00278
00279
00280
00304 virtual void setFeature(const XMLCh* const name, const bool state) = 0;
00305
00321 virtual bool getFeature(const XMLCh* const name) const = 0;
00322
00339 virtual bool canSetFeature(const XMLCh* const name, const bool state) const = 0;
00340
00341
00342
00343
00374 virtual DOMDocument* parse(const DOMInputSource& source) = 0;
00375
00403 virtual DOMDocument* parseURI(const XMLCh* const systemId) = 0;
00404
00431 virtual DOMDocument* parseURI(const char* const systemId) = 0;
00432
00461 virtual void parseWithContext
00462 (
00463 const DOMInputSource& source
00464 , DOMNode* const contextNode
00465 , const short action
00466 ) = 0;
00468
00469
00470
00471
00474
00496 virtual void* getProperty(const XMLCh* const name) const = 0 ;
00497
00519 virtual void setProperty(const XMLCh* const name, void* value) = 0 ;
00520
00527 virtual void release() = 0;
00528
00552 virtual void resetDocumentPool() = 0;
00553
00581 virtual Grammar* loadGrammar(const DOMInputSource& source,
00582 const short grammarType,
00583 const bool toCache = false) = 0;
00584
00610 virtual Grammar* loadGrammar(const XMLCh* const systemId,
00611 const short grammarType,
00612 const bool toCache = false) = 0;
00613
00639 virtual Grammar* loadGrammar(const char* const systemId,
00640 const short grammarType,
00641 const bool toCache = false) = 0;
00642
00649 virtual Grammar* getGrammar(const XMLCh* const nameSpaceKey) const = 0;
00650
00656 virtual Grammar* getRootGrammar() const = 0;
00657
00664 virtual const XMLCh* getURIText(unsigned int uriId) const = 0;
00665
00669 virtual void resetCachedGrammarPool() = 0;
00670
00676 virtual unsigned int getSrcOffset() const = 0;
00677
00679
00680 };
00681
00682
00683 XERCES_CPP_NAMESPACE_END
00684
00685 #endif