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 #include <xercesc/util/XercesDefs.hpp>
00025
00026 XERCES_CPP_NAMESPACE_BEGIN
00027
00028 class DOMNode;
00029 class DOMDocumentFragment;
00030
00035 class CDOM_EXPORT DOMRange {
00036 protected:
00037
00038
00039
00042 DOMRange() {}
00043 DOMRange(const DOMRange &) {}
00045
00046 private:
00047
00048
00049
00052 DOMRange & operator = (const DOMRange &);
00054
00055 public:
00056
00057
00058
00065 virtual ~DOMRange() {};
00067
00068
00069
00070
00098 enum CompareHow {
00099 START_TO_START = 0,
00100 START_TO_END = 1,
00101 END_TO_END = 2,
00102 END_TO_START = 3
00103 };
00104
00106
00107
00108
00109
00112
00113
00114
00123 virtual DOMNode* getStartContainer() const = 0;
00124
00133 virtual XMLSize_t getStartOffset() const = 0;
00134
00143 virtual DOMNode* getEndContainer() const = 0;
00144
00153 virtual XMLSize_t getEndOffset() const = 0;
00154
00163 virtual bool getCollapsed() const = 0;
00164
00174 virtual const DOMNode* getCommonAncestorContainer() const = 0;
00175
00176
00177
00178
00201 virtual void setStart(const DOMNode *refNode, XMLSize_t offset) = 0;
00202
00225 virtual void setEnd(const DOMNode *refNode, XMLSize_t offset) = 0;
00226
00243 virtual void setStartBefore(const DOMNode *refNode) = 0;
00244
00261 virtual void setStartAfter(const DOMNode *refNode) = 0;
00262
00279 virtual void setEndBefore(const DOMNode *refNode) = 0;
00280
00297 virtual void setEndAfter(const DOMNode *refNode) = 0;
00298
00299
00300
00301
00312 virtual void collapse(bool toStart) = 0;
00313
00330 virtual void selectNode(const DOMNode *refNode) = 0;
00331
00346 virtual void selectNodeContents(const DOMNode *refNode) = 0;
00347
00365 virtual short compareBoundaryPoints(CompareHow how, const DOMRange* sourceRange) const = 0;
00366
00380 virtual void deleteContents() = 0;
00381
00397 virtual DOMDocumentFragment* extractContents() = 0;
00398
00411 virtual DOMDocumentFragment* cloneContents() const = 0;
00412
00441 virtual void insertNode(DOMNode *newNode) = 0;
00442
00468 virtual void surroundContents(DOMNode *newParent) = 0;
00469
00480 virtual DOMRange* cloneRange() const = 0;
00481
00492 virtual const XMLCh* toString() const = 0;
00493
00506 virtual void detach() = 0;
00507
00509
00510
00511
00512
00522 virtual void release() = 0;
00524 };
00525
00526
00527 XERCES_CPP_NAMESPACE_END
00528
00529 #endif