Got conformance tests compiling and running on Linux

This commit is contained in:
Jez Higgins 2010-12-09 14:04:13 +00:00
parent b22d91ff3e
commit ef878d91a2
4 changed files with 22 additions and 16 deletions

View file

@ -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) { }

View file

@ -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

View file

@ -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

View file

@ -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));