00001 #ifndef DOMRange_HEADER_GUARD_
00002 #define DOMRange_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
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 #include <xercesc/util/XercesDefs.hpp>
00065
00066 XERCES_CPP_NAMESPACE_BEGIN
00067
00068 class DOMNode;
00069 class DOMDocumentFragment;
00070
00075 class DOMRange {
00076 protected:
00077
00078
00079
00082 DOMRange() {};
00084
00085 private:
00086
00087
00088
00091 DOMRange(const DOMRange &);
00092 DOMRange & operator = (const DOMRange &);
00094
00095 public:
00096
00097
00098
00105 virtual ~DOMRange() {};
00107
00108
00109
00110
00138 enum CompareHow {
00139 START_TO_START = 0,
00140 START_TO_END = 1,
00141 END_TO_END = 2,
00142 END_TO_START = 3
00143 };
00144
00146
00147
00148
00149
00152
00153
00154
00163 virtual DOMNode* getStartContainer() const = 0;
00164
00173 virtual XMLSize_t getStartOffset() const = 0;
00174
00183 virtual DOMNode* getEndContainer() const = 0;
00184
00193 virtual XMLSize_t getEndOffset() const = 0;
00194
00203 virtual bool getCollapsed() const = 0;
00204
00214 virtual const DOMNode* getCommonAncestorContainer() const = 0;
00215
00216
00217
00218
00241 virtual void setStart(const DOMNode *refNode, XMLSize_t offset) = 0;
00242
00265 virtual void setEnd(const DOMNode *refNode, XMLSize_t offset) = 0;
00266
00283 virtual void setStartBefore(const DOMNode *refNode) = 0;
00284
00301 virtual void setStartAfter(const DOMNode *refNode) = 0;
00302
00319 virtual void setEndBefore(const DOMNode *refNode) = 0;
00320
00337 virtual void setEndAfter(const DOMNode *refNode) = 0;
00338
00339
00340
00341
00352 virtual void collapse(bool toStart) = 0;
00353
00370 virtual void selectNode(const DOMNode *refNode) = 0;
00371
00386 virtual void selectNodeContents(const DOMNode *refNode) = 0;
00387
00405 virtual short compareBoundaryPoints(CompareHow how, const DOMRange* sourceRange) const = 0;
00406
00420 virtual void deleteContents() = 0;
00421
00437 virtual DOMDocumentFragment* extractContents() = 0;
00438
00451 virtual DOMDocumentFragment* cloneContents() const = 0;
00452
00481 virtual void insertNode(DOMNode *newNode) = 0;
00482
00508 virtual void surroundContents(DOMNode *newParent) = 0;
00509
00520 virtual DOMRange* cloneRange() const = 0;
00521
00532 virtual const XMLCh* toString() const = 0;
00533
00546 virtual void detach() = 0;
00547
00549
00550
00551
00552
00562 virtual void release() = 0;
00564 };
00565
00566
00567 XERCES_CPP_NAMESPACE_END
00568
00569 #endif