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 #include <xercesc/util/XercesDefs.hpp>
00026
00027 XERCES_CPP_NAMESPACE_BEGIN
00028
00029 class DOMNode;
00030 class DOMDocumentFragment;
00031
00036 class CDOM_EXPORT DOMRange {
00037 protected:
00038
00039
00040
00043 DOMRange() {}
00044 DOMRange(const DOMRange &) {}
00046
00047 private:
00048
00049
00050
00053 DOMRange & operator = (const DOMRange &);
00055
00056 public:
00057
00058
00059
00066 virtual ~DOMRange() {};
00068
00069
00070
00071
00099 enum CompareHow {
00100 START_TO_START = 0,
00101 START_TO_END = 1,
00102 END_TO_END = 2,
00103 END_TO_START = 3
00104 };
00105
00107
00108
00109
00110
00113
00114
00115
00124 virtual DOMNode* getStartContainer() const = 0;
00125
00134 virtual XMLSize_t getStartOffset() const = 0;
00135
00144 virtual DOMNode* getEndContainer() const = 0;
00145
00154 virtual XMLSize_t getEndOffset() const = 0;
00155
00164 virtual bool getCollapsed() const = 0;
00165
00175 virtual const DOMNode* getCommonAncestorContainer() const = 0;
00176
00177
00178
00179
00202 virtual void setStart(const DOMNode *refNode, XMLSize_t offset) = 0;
00203
00226 virtual void setEnd(const DOMNode *refNode, XMLSize_t offset) = 0;
00227
00244 virtual void setStartBefore(const DOMNode *refNode) = 0;
00245
00262 virtual void setStartAfter(const DOMNode *refNode) = 0;
00263
00280 virtual void setEndBefore(const DOMNode *refNode) = 0;
00281
00298 virtual void setEndAfter(const DOMNode *refNode) = 0;
00299
00300
00301
00302
00313 virtual void collapse(bool toStart) = 0;
00314
00331 virtual void selectNode(const DOMNode *refNode) = 0;
00332
00347 virtual void selectNodeContents(const DOMNode *refNode) = 0;
00348
00366 virtual short compareBoundaryPoints(CompareHow how, const DOMRange* sourceRange) const = 0;
00367
00381 virtual void deleteContents() = 0;
00382
00398 virtual DOMDocumentFragment* extractContents() = 0;
00399
00412 virtual DOMDocumentFragment* cloneContents() const = 0;
00413
00442 virtual void insertNode(DOMNode *newNode) = 0;
00443
00469 virtual void surroundContents(DOMNode *newParent) = 0;
00470
00481 virtual DOMRange* cloneRange() const = 0;
00482
00493 virtual const XMLCh* toString() const = 0;
00494
00507 virtual void detach() = 0;
00508
00510
00511
00512
00513
00523 virtual void release() = 0;
00525 };
00526
00527
00528 XERCES_CPP_NAMESPACE_END
00529
00530 #endif