mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-18 22:26:32 +01:00
fix typename problem
This commit is contained in:
parent
08140e1876
commit
e323dd8948
16 changed files with 61 additions and 57 deletions
|
@ -55,4 +55,4 @@ class DocumentType : public SimpleDOM::DocumentTypeImpl<stringT, string_adaptorT
|
|||
} // namespace SAX2DOM
|
||||
|
||||
#endif
|
||||
// end of file
|
||||
// end of file
|
||||
|
|
|
@ -173,20 +173,20 @@ class Parser : private SAX::basic_DefaultHandler2<stringT>
|
|||
|
||||
////////////////////////////////////////////////////
|
||||
// ErrorHandler
|
||||
virtual void warning(const SAX::SAXException& e)
|
||||
virtual void warning(const SAX::SAXParseException& e)
|
||||
{
|
||||
if(errorHandler_)
|
||||
errorHandler_->warning(e);
|
||||
} // warning
|
||||
|
||||
virtual void error(const SAX::SAXException& e)
|
||||
virtual void error(const SAX::SAXParseException& e)
|
||||
{
|
||||
if(errorHandler_)
|
||||
errorHandler_->error(e);
|
||||
reset();
|
||||
} // error
|
||||
|
||||
virtual void fatalError(const SAX::SAXException& e)
|
||||
virtual void fatalError(const SAX::SAXParseException& e)
|
||||
{
|
||||
if(errorHandler_)
|
||||
errorHandler_->fatalError(e);
|
||||
|
|
|
@ -56,7 +56,7 @@ class AttrImpl : public DOM::Attr_impl<stringT>,
|
|||
|
||||
/////////////////////////////////////////////////////
|
||||
// DOM::Node methods
|
||||
virtual DOM::Node<stringT>::Type getNodeType() const
|
||||
virtual typename DOM::Node<stringT>::Type getNodeType() const
|
||||
{
|
||||
return DOM::Node<stringT>::ATTRIBUTE_NODE;
|
||||
} // getNodeType
|
||||
|
@ -129,7 +129,7 @@ class AttrImpl : public DOM::Attr_impl<stringT>,
|
|||
private:
|
||||
virtual void checkChildType(DOM::Node_impl<stringT>* child)
|
||||
{
|
||||
DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
typename DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
if((type != DOM::Node<stringT>::TEXT_NODE) &&
|
||||
(type != DOM::Node<stringT>::ENTITY_REFERENCE_NODE))
|
||||
throw DOM::DOMException(DOM::DOMException::HIERARCHY_REQUEST_ERR);
|
||||
|
|
|
@ -49,7 +49,7 @@ class DocumentFragmentImpl : public DOM::DocumentFragment_impl<stringT>,
|
|||
private:
|
||||
virtual void checkChildType(DOM::Node_impl<stringT>* child)
|
||||
{
|
||||
DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
typename DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
if((type != DOM::Node<stringT>::ELEMENT_NODE) &&
|
||||
(type != DOM::Node<stringT>::PROCESSING_INSTRUCTION_NODE) &&
|
||||
(type != DOM::Node<stringT>::COMMENT_NODE) &&
|
||||
|
|
|
@ -94,7 +94,7 @@ class DocumentImpl : public DOM::Document_impl<stringT>,
|
|||
|
||||
virtual ~DocumentImpl()
|
||||
{
|
||||
for(std::set<NodeImplT*>::iterator n = orphans_.begin(); n != orphans_.end(); ++n)
|
||||
for(typename std::set<NodeImplT*>::iterator n = orphans_.begin(); n != orphans_.end(); ++n)
|
||||
delete *n;
|
||||
} // ~DocumentImpl
|
||||
|
||||
|
@ -316,7 +316,7 @@ class DocumentImpl : public DOM::Document_impl<stringT>,
|
|||
|
||||
virtual DOM::Element_impl<stringT>* getElementById(const stringT& elementId) const
|
||||
{
|
||||
std::set<AttrImplT*>::const_iterator i = std::find_if(idNodes_.begin(), idNodes_.end(), valueIs<stringT, string_adaptorT>(elementId));
|
||||
typename std::set<AttrImplT*>::const_iterator i = std::find_if(idNodes_.begin(), idNodes_.end(), valueIs<stringT, string_adaptorT>(elementId));
|
||||
if(i == idNodes_.end())
|
||||
return 0;
|
||||
return (*i)->getOwnerElement();
|
||||
|
@ -324,7 +324,7 @@ class DocumentImpl : public DOM::Document_impl<stringT>,
|
|||
|
||||
////////////////////////////////////////////////////////
|
||||
// DOM Node methods
|
||||
virtual DOM::Node<stringT>::Type getNodeType() const
|
||||
virtual typename DOM::Node<stringT>::Type getNodeType() const
|
||||
{
|
||||
return DOM::Node<stringT>::DOCUMENT_NODE;
|
||||
} // getNodeType
|
||||
|
@ -422,7 +422,7 @@ class DocumentImpl : public DOM::Document_impl<stringT>,
|
|||
} // orphaned
|
||||
void adopted(NodeImplT* node)
|
||||
{
|
||||
std::set<NodeImplT*>::iterator n = orphans_.find(node);
|
||||
typename std::set<NodeImplT*>::iterator n = orphans_.find(node);
|
||||
if(n != orphans_.end())
|
||||
orphans_.erase(n);
|
||||
} // adopted
|
||||
|
@ -433,15 +433,15 @@ class DocumentImpl : public DOM::Document_impl<stringT>,
|
|||
} // setElementId
|
||||
void removeElementId(AttrImplT* attr)
|
||||
{
|
||||
std::set<AttrImplT*>::iterator n = idNodes_.find(node);
|
||||
typename std::set<AttrImplT*>::iterator n = idNodes_.find(node);
|
||||
if(n != idNodes_.end())
|
||||
idNodes_.erase(n);
|
||||
} // removeElementId
|
||||
|
||||
private:
|
||||
virtual void checkChildType(DOM::Node_impl<stringT>* child)
|
||||
virtual void checkChildType(typename DOM::Node_impl<stringT>* child)
|
||||
{
|
||||
DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
typename DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
if((type != DOM::Node<stringT>::ELEMENT_NODE) &&
|
||||
(type != DOM::Node<stringT>::PROCESSING_INSTRUCTION_NODE) &&
|
||||
(type != DOM::Node<stringT>::COMMENT_NODE) &&
|
||||
|
|
|
@ -87,7 +87,7 @@ class DocumentTypeImpl : public DOM::DocumentType_impl<stringT>,
|
|||
|
||||
//////////////////////////////////////////////////////////
|
||||
// DOM::Node methods
|
||||
DOM::Node<stringT>::Type getNodeType() const
|
||||
typename DOM::Node<stringT>::Type getNodeType() const
|
||||
{
|
||||
return DOM::Node<stringT>::DOCUMENT_TYPE_NODE;
|
||||
} // getNodeType
|
||||
|
|
|
@ -175,7 +175,7 @@ class ElementImpl : public DOM::Element_impl<stringT>,
|
|||
private:
|
||||
virtual void checkChildType(DOM::Node_impl<stringT>* child)
|
||||
{
|
||||
DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
typename DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
if((type != DOM::Node<stringT>::ELEMENT_NODE) &&
|
||||
(type != DOM::Node<stringT>::TEXT_NODE) &&
|
||||
(type != DOM::Node<stringT>::COMMENT_NODE) &&
|
||||
|
|
|
@ -36,7 +36,7 @@ class EntityImpl : public DOM::Entity_impl<stringT>,
|
|||
|
||||
///////////////////////////////////////////////////////
|
||||
// DOM::Node methods
|
||||
virtual DOM::Node<stringT>::Type getNodeType() const
|
||||
virtual typename DOM::Node<stringT>::Type getNodeType() const
|
||||
{
|
||||
return DOM::Node<stringT>::ENTITY_NODE;
|
||||
} // getNodeType
|
||||
|
@ -46,7 +46,7 @@ class EntityImpl : public DOM::Entity_impl<stringT>,
|
|||
return name_;
|
||||
} // getNodeName
|
||||
|
||||
virtual DOM::Node_impl<stringT>* cloneNode(bool deep) const
|
||||
virtual typename DOM::Node_impl<stringT>* cloneNode(bool deep) const
|
||||
{
|
||||
EntityImpl* clone = new EntityImpl(ownerDoc_, name_, publicId_, systemId_, notationName_);
|
||||
if(deep)
|
||||
|
@ -64,7 +64,7 @@ class EntityImpl : public DOM::Entity_impl<stringT>,
|
|||
///////////////////////////////////////////////
|
||||
virtual void checkChildType(DOM::Node_impl<stringT>* child)
|
||||
{
|
||||
DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
typename DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
if((type != DOM::Node<stringT>::ELEMENT_NODE) &&
|
||||
(type != DOM::Node<stringT>::PROCESSING_INSTRUCTION_NODE) &&
|
||||
(type != DOM::Node<stringT>::COMMENT_NODE) &&
|
||||
|
|
|
@ -50,7 +50,7 @@ class EntityReferenceImpl : public DOM::EntityReference_impl<stringT>,
|
|||
if(readOnly_)
|
||||
throw DOM::DOMException(DOM::DOMException::NO_MODIFICATION_ALLOWED_ERR);
|
||||
|
||||
DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
typename DOM::Node<stringT>::Type type = child->getNodeType();
|
||||
if((type != DOM::Node<stringT>::ELEMENT_NODE) &&
|
||||
(type != DOM::Node<stringT>::PROCESSING_INSTRUCTION_NODE) &&
|
||||
(type != DOM::Node<stringT>::COMMENT_NODE) &&
|
||||
|
|
|
@ -12,7 +12,7 @@ std::pair<bool, stringT> checkPrefixAndNamespace(bool hasPrefix,
|
|||
const stringT& prefix,
|
||||
bool hasNamespaceURI,
|
||||
const stringT& namespaceURI,
|
||||
DOM::Node<stringT>::Type nodeType)
|
||||
typename DOM::Node<stringT>::Type nodeType)
|
||||
{
|
||||
string_adaptorT SA;
|
||||
const stringT xml = SA.makeStringT("xml");
|
||||
|
|
|
@ -69,7 +69,7 @@ class NamedNodeMapImpl : public DOM::NamedNodeMap_impl<stringT>
|
|||
|
||||
virtual ~NamedNodeMapImpl()
|
||||
{
|
||||
for(NodeListT::iterator i = nodes_.begin(); i != nodes_.end(); ++i)
|
||||
for(typename NodeListT::iterator i = nodes_.begin(); i != nodes_.end(); ++i)
|
||||
delete (*i);
|
||||
} // ~NodeImpl
|
||||
|
||||
|
@ -88,7 +88,7 @@ class NamedNodeMapImpl : public DOM::NamedNodeMap_impl<stringT>
|
|||
virtual void setOwnerDoc(DocumentImpl<stringT, string_adaptorT>* ownerDoc)
|
||||
{
|
||||
ownerDoc_ = ownerDoc;
|
||||
for(NodeListT::iterator i = nodes_.begin(); i != nodes_.end(); ++i)
|
||||
for(typename NodeListT::iterator i = nodes_.begin(); i != nodes_.end(); ++i)
|
||||
(*i)->setOwnerDoc(ownerDoc);
|
||||
} // setOwnerDoc
|
||||
|
||||
|
@ -162,14 +162,14 @@ class NamedNodeMapImpl : public DOM::NamedNodeMap_impl<stringT>
|
|||
|
||||
typedef std::deque<NodeImpl<stringT, string_adaptorT>*> NodeListT;
|
||||
|
||||
NodeImpl<stringT, string_adaptorT>* getNode(NodeListT::const_iterator n) const
|
||||
NodeImpl<stringT, string_adaptorT>* getNode(typename NodeListT::const_iterator n) const
|
||||
{
|
||||
if(n == nodes_.end())
|
||||
return 0;
|
||||
return *n;
|
||||
} // getNode
|
||||
|
||||
NodeImpl<stringT, string_adaptorT>* setNode(NodeListT::iterator n, NodeImpl<stringT, string_adaptorT>* arg)
|
||||
NodeImpl<stringT, string_adaptorT>* setNode(typename NodeListT::iterator n, NodeImpl<stringT, string_adaptorT>* arg)
|
||||
{
|
||||
if(n == nodes_.end())
|
||||
{
|
||||
|
@ -183,7 +183,7 @@ class NamedNodeMapImpl : public DOM::NamedNodeMap_impl<stringT>
|
|||
return removedNode;
|
||||
} // setNode
|
||||
|
||||
NodeImpl<stringT, string_adaptorT>* removeNode(NodeListT::iterator n)
|
||||
NodeImpl<stringT, string_adaptorT>* removeNode(typename NodeListT::iterator n)
|
||||
{
|
||||
if(n == nodes_.end())
|
||||
return 0;
|
||||
|
@ -193,12 +193,12 @@ class NamedNodeMapImpl : public DOM::NamedNodeMap_impl<stringT>
|
|||
return removedNode;
|
||||
} // removeNode
|
||||
|
||||
NodeListT::iterator findByName(const stringT& name)
|
||||
typename NodeListT::iterator findByName(const stringT& name)
|
||||
{
|
||||
return std::find_if(nodes_.begin(), nodes_.end(), nameIs<stringT, string_adaptorT>(name));
|
||||
} // findByName
|
||||
|
||||
NodeListT::iterator findByNamespaceAndName(const stringT& namespaceURI, const stringT& localName)
|
||||
typename NodeListT::iterator findByNamespaceAndName(const stringT& namespaceURI, const stringT& localName)
|
||||
{
|
||||
return std::find_if(nodes_.begin(), nodes_.end(), namespaceAndNameIs<stringT, string_adaptorT>(namespaceURI, localName));
|
||||
} // findByName
|
||||
|
|
|
@ -244,7 +244,7 @@ class NodeImplWithChildren : public NodeImpl<stringT, string_adaptorT>,
|
|||
|
||||
virtual ~NodeImplWithChildren()
|
||||
{
|
||||
for(NodeListT::iterator i = nodes_.begin(); i != nodes_.end(); ++i)
|
||||
for(typename NodeListT::iterator i = nodes_.begin(); i != nodes_.end(); ++i)
|
||||
delete (*i);
|
||||
} // ~NodeImpl
|
||||
|
||||
|
@ -380,7 +380,7 @@ class NodeImplWithChildren : public NodeImpl<stringT, string_adaptorT>,
|
|||
} // if ...
|
||||
|
||||
checkCanAdd(newChild);
|
||||
std::deque<NodeImpl<stringT, string_adaptorT>*>::iterator result = findChild(oldChild);
|
||||
typename std::deque<NodeImpl<stringT, string_adaptorT>*>::iterator result = findChild(oldChild);
|
||||
removeIfRequired(newChild);
|
||||
*result = newChild;
|
||||
newChild->setParentNode(this);
|
||||
|
@ -434,9 +434,9 @@ class NodeImplWithChildren : public NodeImpl<stringT, string_adaptorT>,
|
|||
private:
|
||||
typedef std::deque<NodeImpl<stringT, string_adaptorT>*> NodeListT;
|
||||
|
||||
NodeListT::iterator findChild(NodeImpl<stringT, string_adaptorT>* refChild)
|
||||
typename NodeListT::iterator findChild(NodeImpl<stringT, string_adaptorT>* refChild)
|
||||
{
|
||||
NodeListT::iterator result = std::find(nodes_.begin(), nodes_.end(), refChild);
|
||||
typename NodeListT::iterator result = std::find(nodes_.begin(), nodes_.end(), refChild);
|
||||
if(result == nodes_.end())
|
||||
throw DOM::DOMException(DOM::DOMException::NOT_FOUND_ERR);
|
||||
return result;
|
||||
|
|
|
@ -33,7 +33,7 @@ class NotationImpl : public DOM::Notation_impl<stringT>,
|
|||
|
||||
///////////////////////////////////////////////////////
|
||||
// DOM::Node methods
|
||||
virtual DOM::Node<stringT>::Type getNodeType() const
|
||||
virtual typename DOM::Node<stringT>::Type getNodeType() const
|
||||
{
|
||||
return DOM::Node<stringT>::NOTATION_NODE;
|
||||
} // getNodeType
|
||||
|
|
|
@ -55,15 +55,14 @@ public:
|
|||
typedef std::basic_string<charT, traitsT> stringT;
|
||||
typedef std::basic_string<fromCharT, fromTraitsT> fromStringT;
|
||||
|
||||
explicit basic_iconvertstream(ios_base::openmode mode = in)
|
||||
: std::basic_istream<charT, traitsT>(0), stringbuf_(mode | in)
|
||||
{
|
||||
istreamT::rdbuf(&stringbuf_);
|
||||
}
|
||||
explicit basic_iconvertstream(ios_base::openmode mode = in) :
|
||||
std::basic_istream<charT, traitsT>( 0 ),
|
||||
stringbuf_(mode | in)
|
||||
{ std::basic_ios<charT,traitsT>::init( &stringbuf_ ); }
|
||||
explicit basic_iconvertstream(const stringT& str, ios_base::openmode mode = in)
|
||||
: std::basic_istream<charT, traitsT>(0), stringbuf_(mode | in)
|
||||
{
|
||||
istreamT::rdbuf(&stringbuf_);
|
||||
std::basic_ios<charT,traitsT>::init( &stringbuf_ ); // istreamT::rdbuf(&stringbuf_);
|
||||
str(str);
|
||||
}
|
||||
virtual ~basic_iconvertstream()
|
||||
|
@ -132,7 +131,7 @@ private:
|
|||
std::copy(str.begin(), str.end(), std::back_inserter(dest));
|
||||
#else
|
||||
// hack around pre-Standard library
|
||||
for(fromStringT::const_iterator i = str.begin(); i != str.end(); ++i)
|
||||
for(typename fromStringT::const_iterator i = str.begin(); i != str.end(); ++i)
|
||||
dest += static_cast<charT>(*i);
|
||||
#endif
|
||||
return dest;
|
||||
|
@ -153,16 +152,15 @@ public:
|
|||
typedef std::basic_string<charT, traitsT> stringT;
|
||||
typedef std::basic_string<toCharT, toTraitsT> toStringT;
|
||||
|
||||
explicit basic_oconvertstream(ios_base::openmode mode = out)
|
||||
: std::basic_ostream<charT, traitsT>(0), stringbuf_(mode | out)
|
||||
{
|
||||
ostreamT::rdbuf(&stringbuf_);
|
||||
}
|
||||
explicit basic_oconvertstream(const stringT& str, ios_base::openmode mode = out)
|
||||
: std::basic_ostream<charT, traitsT>(0), stringbuf_(str, mode | out)
|
||||
{
|
||||
ostreamT::rdbuf(&stringbuf_);
|
||||
}
|
||||
explicit basic_oconvertstream(ios_base::openmode mode = out) :
|
||||
std::basic_ostream<charT, traitsT>( 0 ),
|
||||
stringbuf_(mode | out)
|
||||
{ std::basic_ios<charT,traitsT>::init( &stringbuf_ ); }
|
||||
explicit basic_oconvertstream(const stringT& str, ios_base::openmode mode = out) :
|
||||
std::basic_ostream<charT, traitsT>( 0 ),
|
||||
stringbuf_(str, mode | out)
|
||||
{ std::basic_ios<charT,traitsT>::init( &stringbuf_ ); }
|
||||
|
||||
virtual ~basic_oconvertstream()
|
||||
{}
|
||||
|
||||
|
@ -234,7 +232,7 @@ private:
|
|||
#ifndef _MSC_VER
|
||||
std::copy(str.begin(), str.end(), std::back_inserter(dest));
|
||||
#else
|
||||
for(stringT::const_iterator i = str.begin(); i != str.end(); ++i)
|
||||
for(typename stringT::const_iterator i = str.begin(); i != str.end(); ++i)
|
||||
dest += static_cast<toCharT>(*i);
|
||||
#endif
|
||||
return dest;
|
||||
|
|
|
@ -47,6 +47,10 @@
|
|||
#include <vector>
|
||||
#include <cstdlib>
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
# define INADDR_NONE ((in_addr_t) -1)
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// basic_socketbuf declaration
|
||||
template<class charT, class traitsT>
|
||||
|
@ -198,7 +202,7 @@ basic_socketbuf<charT, traitsT>* basic_socketbuf<charT, traitsT>::close()
|
|||
} // close;
|
||||
|
||||
template<class charT, class traitsT>
|
||||
basic_socketbuf<charT, traitsT>::int_type basic_socketbuf<charT, traitsT>::overflow(basic_socketbuf<charT, traitsT>::int_type c)
|
||||
typename basic_socketbuf<charT, traitsT>::int_type basic_socketbuf<charT, traitsT>::overflow(typename basic_socketbuf<charT, traitsT>::int_type c)
|
||||
{
|
||||
if(traitsT::eq_int_type(traitsT::eof(), c))
|
||||
return traitsT::not_eof(c);
|
||||
|
@ -218,7 +222,7 @@ int basic_socketbuf<charT, traitsT>::sync()
|
|||
} // sync
|
||||
|
||||
template<class charT, class traitsT>
|
||||
basic_socketbuf<charT, traitsT>::int_type basic_socketbuf<charT, traitsT>::underflow()
|
||||
typename basic_socketbuf<charT, traitsT>::int_type basic_socketbuf<charT, traitsT>::underflow()
|
||||
{
|
||||
if(!is_open())
|
||||
return traitsT::eof();
|
||||
|
@ -233,7 +237,7 @@ basic_socketbuf<charT, traitsT>::int_type basic_socketbuf<charT, traitsT>::under
|
|||
} // underflow
|
||||
|
||||
template<class charT, class traitsT>
|
||||
basic_socketbuf<charT, traitsT>::int_type basic_socketbuf<charT, traitsT>::pbackfail(int_type c)
|
||||
typename basic_socketbuf<charT, traitsT>::int_type basic_socketbuf<charT, traitsT>::pbackfail(int_type c)
|
||||
{
|
||||
if(gptr() == eback())
|
||||
return traitsT::eof();
|
||||
|
@ -434,14 +438,16 @@ typedef basic_socketstream<wchar_t, std::char_traits<wchar_t> > wsocketstream;
|
|||
// basic_socketstream definition
|
||||
template<class charT, class traitsT>
|
||||
basic_socketstream<charT, traitsT>::basic_socketstream() :
|
||||
std::basic_iostream<charT, traitsT>(&sockbuf)
|
||||
std::basic_iostream<charT, traitsT>( 0 )
|
||||
{
|
||||
std::basic_ios<charT,traitsT>::init( &sockbuf );
|
||||
} // basic_socketstream
|
||||
|
||||
template<class charT, class traitsT>
|
||||
basic_socketstream<charT, traitsT>::basic_socketstream(const char* hostname, int port) :
|
||||
std::basic_iostream<charT, traitsT>(&sockbuf)
|
||||
std::basic_iostream<charT, traitsT>( 0 )
|
||||
{
|
||||
std::basic_ios<charT,traitsT>::init( &sockbuf );
|
||||
open(hostname, port);
|
||||
} // basic_socketstream
|
||||
|
||||
|
|
|
@ -18,4 +18,4 @@ namespace XML
|
|||
bool is_extender(wchar_t c);
|
||||
}; // namespace XML
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue