mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-30 08:38:15 +01:00
Got conformance tests compiling and running on Linux
This commit is contained in:
parent
b22d91ff3e
commit
ef878d91a2
4 changed files with 22 additions and 16 deletions
|
@ -20,6 +20,8 @@ class CDATASection : public Text<stringT, string_adaptorT>
|
|||
{
|
||||
typedef Text<stringT, string_adaptorT> TextT;
|
||||
public:
|
||||
typedef Node<stringT, string_adaptorT> NodeT;
|
||||
|
||||
CDATASection() : Text<stringT, string_adaptorT>() { }
|
||||
explicit CDATASection(CDATASection_impl<stringT, string_adaptorT>* impl) : Text<stringT, string_adaptorT>(impl) { }
|
||||
CDATASection(const CDATASection& rhs) : Text<stringT, string_adaptorT>(rhs) { }
|
||||
|
|
|
@ -19,6 +19,8 @@ template<class stringT, class string_adaptorT = Arabica::default_string_adaptor<
|
|||
class Comment : public CharacterData<stringT, string_adaptorT>
|
||||
{
|
||||
public:
|
||||
typedef Node<stringT, string_adaptorT> NodeT;
|
||||
|
||||
Comment() : CharacterData<stringT, string_adaptorT>() { }
|
||||
explicit Comment(Comment_impl<stringT, string_adaptorT>* impl) : CharacterData<stringT, string_adaptorT>(dynamic_cast<Comment_impl<stringT, string_adaptorT>*>(impl)) { }
|
||||
Comment(const Comment& rhs) : CharacterData<stringT, string_adaptorT>(rhs) { }
|
||||
|
@ -26,7 +28,7 @@ class Comment : public CharacterData<stringT, string_adaptorT>
|
|||
{
|
||||
if(NodeT::impl_ == 0) // null nodes can always be cast
|
||||
return;
|
||||
if(rhs.getNodeType() != Node<stringT, string_adaptorT>::COMMENT_NODE)
|
||||
if(rhs.getNodeType() != Node_base::COMMENT_NODE)
|
||||
throw std::bad_cast();
|
||||
} // Comment
|
||||
}; // class Comment
|
||||
|
|
|
@ -21,6 +21,8 @@ template<class stringT, class string_adaptorT = Arabica::default_string_adaptor<
|
|||
class DocumentFragment : public Node<stringT, string_adaptorT>
|
||||
{
|
||||
public:
|
||||
typedef Node<stringT, string_adaptorT> NodeT;
|
||||
|
||||
DocumentFragment() : Node<stringT, string_adaptorT>() { }
|
||||
explicit DocumentFragment(DocumentFragment_impl<stringT, string_adaptorT>* impl) : Node<stringT, string_adaptorT>(impl) { }
|
||||
DocumentFragment(const DocumentFragment& rhs) : Node<stringT, string_adaptorT>(rhs) { }
|
||||
|
@ -28,7 +30,7 @@ class DocumentFragment : public Node<stringT, string_adaptorT>
|
|||
{
|
||||
if(NodeT::impl_ == 0) // null nodes can always be cast
|
||||
return;
|
||||
if(rhs.getNodeType() != Node<stringT, string_adaptorT>::DOCUMENT_FRAGMENT_NODE)
|
||||
if(rhs.getNodeType() != Node_base::DOCUMENT_FRAGMENT_NODE)
|
||||
throw std::bad_cast();
|
||||
}
|
||||
}; // class DocumentFragment
|
||||
|
|
|
@ -65,7 +65,7 @@ class AttrMap : public NamedNodeMapImpl<stringT, string_adaptorT>
|
|||
} // setAttributeNode
|
||||
virtual DOMNode_implT* setNamedItem(DOMNode_implT* newAttr)
|
||||
{
|
||||
throwIfReadOnly();
|
||||
NamedNodeMapImplT::throwIfReadOnly();
|
||||
checkNotInUse(newAttr);
|
||||
dynamic_cast<AttrImplT*>(newAttr)->setOwnerElement(ownerElement_);
|
||||
return dynamic_cast<DOMAttr_implT*>(NamedNodeMapImplT::setNamedItem(newAttr));
|
||||
|
@ -113,7 +113,7 @@ class AttrMap : public NamedNodeMapImpl<stringT, string_adaptorT>
|
|||
} // setAttributeNodeNS
|
||||
virtual DOMNode_implT* setNamedItemNS(DOMNode_implT* newAttr)
|
||||
{
|
||||
throwIfReadOnly();
|
||||
NamedNodeMapImplT::throwIfReadOnly();
|
||||
checkNotInUse(newAttr);
|
||||
dynamic_cast<AttrImplT*>(newAttr)->setOwnerElement(ownerElement_);
|
||||
return dynamic_cast<DOMAttr_implT*>(NamedNodeMapImplT::setNamedItemNS(newAttr));
|
||||
|
|
Loading…
Add table
Reference in a new issue