mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-30 08:38:15 +01:00
CDATASection constructor fixes
This commit is contained in:
parent
7b9f9999cb
commit
a395a7e20e
2 changed files with 6 additions and 3 deletions
|
@ -21,10 +21,10 @@ class CDATASection : public Text<stringT>
|
||||||
CDATASection() : Text<stringT>() { }
|
CDATASection() : Text<stringT>() { }
|
||||||
explicit CDATASection(CDATASection_impl<stringT>* impl) : Text<stringT>(impl) { }
|
explicit CDATASection(CDATASection_impl<stringT>* impl) : Text<stringT>(impl) { }
|
||||||
CDATASection(const CDATASection& rhs) : Text<stringT>(rhs) { }
|
CDATASection(const CDATASection& rhs) : Text<stringT>(rhs) { }
|
||||||
explicit CDATASection(const Node<stringT>& rhs) : Text<stringT>(rhs)
|
explicit CDATASection(const Node<stringT>& rhs) : Text<stringT>(rhs, 0)
|
||||||
{
|
{
|
||||||
if(dynamic_cast<CDATASection_impl<stringT>*>(rhs.impl()) == 0)
|
if(rhs.getNodeType() != CDATA_SECTION_NODE)
|
||||||
throw std::bad_cast();
|
throw std::bad_cast("Cannot convert Node to CDATA section");
|
||||||
} // CDATASection
|
} // CDATASection
|
||||||
|
|
||||||
CDATASection<stringT> splitText(int offset)
|
CDATASection<stringT> splitText(int offset)
|
||||||
|
|
|
@ -28,6 +28,9 @@ class Text : public CharacterData<stringT>
|
||||||
throw std::bad_cast("Cannot cast Node to Text");
|
throw std::bad_cast("Cannot cast Node to Text");
|
||||||
} // Text
|
} // Text
|
||||||
|
|
||||||
|
protected:
|
||||||
|
Text(const Node<stringT>& rhs, int dummy) : CharacterData<stringT>(rhs, 0) { }
|
||||||
|
|
||||||
Text splitText(int offset)
|
Text splitText(int offset)
|
||||||
{
|
{
|
||||||
return tImpl()->splitText(offset);
|
return tImpl()->splitText(offset);
|
||||||
|
|
Loading…
Add table
Reference in a new issue