diff --git a/src/dom/lsimpl.cpp b/src/dom/lsimpl.cpp
index 65807cc459ea4ca088fc2bea6e65d863d94e45ba..b3b3f0b20cb59fa34635c7fadc38d70f546d44b2 100644 (file)
--- a/src/dom/lsimpl.cpp
+++ b/src/dom/lsimpl.cpp
* Authors:
* Bob Jamison
*
- * Copyright (C) 2005 Bob Jamison
+ * Copyright (C) 2005-2007 Bob Jamison
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
/**
*
*/
-Document *LSParserImpl::parse(const LSInput &input)
- throw(dom::DOMException, LSException)
+DocumentPtr LSParserImpl::parse(const LSInput &input)
+ throw(dom::DOMException, LSException)
{
//#### Check the various inputs of 'input' in order, according
buf.push_back((XMLCh)ch);
}
XmlReader reader;
- Document *doc = reader.parse(buf);
+ DocumentPtr doc = reader.parse(buf);
return doc;
}
buf.push_back((XMLCh)ch);
}
XmlReader reader;
- Document *doc = reader.parse(buf);
+ DocumentPtr doc = reader.parse(buf);
return doc;
}
DOMString stringData = input.getStringData();
if (stringData.size() > 0)
{
- XmlReader reader;
- Document *doc = reader.parse(stringData);
+ XmlReader reader;
+ DocumentPtr doc = reader.parse(stringData);
return doc;
}
/**
*
*/
-Document *LSParserImpl::parseURI(const DOMString &uri)
- throw(dom::DOMException, LSException)
+DocumentPtr LSParserImpl::parseURI(const DOMString &/*uri*/)
+ throw(dom::DOMException, LSException)
{
return NULL;
}
/**
*
*/
-Node *LSParserImpl::parseWithContext(const LSInput &input,
- const Node *contextArg,
- unsigned short action)
- throw(dom::DOMException, LSException)
+NodePtr LSParserImpl::parseWithContext(const LSInput &/*input*/,
+ const NodePtr /*contextArg*/,
+ unsigned short /*action*/)
+ throw(dom::DOMException, LSException)
{
return NULL;
}
*
*/
bool LSSerializerImpl::write(
- const Node *nodeArg,
+ const NodePtr nodeArg,
const LSOutput &destination)
throw (LSException)
{
/**
*
*/
-bool LSSerializerImpl::writeToURI(const Node *nodeArg,
+bool LSSerializerImpl::writeToURI(const NodePtr nodeArg,
const DOMString &uriArg)
throw(LSException)
{
/**
*
*/
-DOMString LSSerializerImpl::writeToString(const Node *nodeArg)
+DOMString LSSerializerImpl::writeToString(const NodePtr nodeArg)
throw(dom::DOMException, LSException)
{
outbuf = "";
/**
*
*/
-void LSSerializerImpl::po(char *fmt, ...)
+void LSSerializerImpl::po(char const *fmt, ...)
{
char str[257];
va_list args;
/**
*
*/
-void LSSerializerImpl::writeNode(const Node *nodeArg)
+void LSSerializerImpl::writeNode(const NodePtr nodeArg)
{
- Node *node = (Node *)nodeArg;
+ NodePtr node = nodeArg;
int type = node->getNodeType();
//#############
case Node::DOCUMENT_NODE:
{
- Document *doc = dynamic_cast<Document *>(node);
+ DocumentPtr doc = dynamic_cast<Document *>(node.get());
writeNode(doc->getDocumentElement());
}
break;
//### Attributes
for (int i=0 ; i<nrAttrs ; i++)
{
- Node *attr = attributes.item(i);
+ NodePtr attr = attributes.item(i);
spaces();
pos(attr->getNodeName());
po("=\"");
pos(node->getNodeValue());
//### Children
- for (Node *child = node->getFirstChild() ;
- child ;
+ for (NodePtr child = node->getFirstChild() ;
+ child.get() ;
child=child->getNextSibling())
{
writeNode(child);