Skip to content

Commit

Permalink
Use Poco::AutoPtr, get rid of old poco includes, re #8491
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Dec 10, 2014
1 parent 72e8ac2 commit cea958b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 59 deletions.
Expand Up @@ -24,19 +24,18 @@
# include <boost/interprocess/smart_ptr/unique_ptr.hpp>
#endif

#include <Poco/DOM/DOMParser.h>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/Element.h>
#include <Poco/DOM/NodeList.h>
#include <Poco/DOM/NodeIterator.h>
#include <Poco/DOM/NodeFilter.h>
#include <Poco/File.h>
#include <Poco/Path.h>

#include "MantidAPI/DllConfig.h"
#include "MantidKernel/ArrayProperty.h"
#include "ImplicitFunctionParameter.h"

namespace Poco
{
namespace DOM
{
class Element;
}
}

/** XML Parser for parameter types for ImplicitFunctions
@author Owen Arnold, Tessella plc
Expand Down
Expand Up @@ -6,15 +6,6 @@
//----------------------------------------------------------------------
#include <vector>

#include <Poco/DOM/DOMParser.h>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/Element.h>
#include <Poco/DOM/NodeList.h>
#include <Poco/DOM/NodeIterator.h>
#include <Poco/DOM/NodeFilter.h>
#include <Poco/File.h>
#include <Poco/Path.h>

#include "MantidKernel/System.h"
#include "MantidKernel/ArrayProperty.h"
#include "MantidMDAlgorithms/InvalidParameter.h"
Expand Down
Expand Up @@ -7,22 +7,16 @@
#include "MantidKernel/System.h"

#include "MantidAPI/ImplicitFunctionParameterParser.h"
//#include "MantidMDAlgorithms/UpParameter.h"
//#include "MantidMDAlgorithms/PerpendicularParameter.h"
//#include "MantidMDAlgorithms/NormalParameter.h"
//#include "MantidMDAlgorithms/OriginParameter.h"

#include <Poco/DOM/DOMParser.h>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/Element.h>
#include <Poco/DOM/NodeList.h>
#include <Poco/DOM/NodeIterator.h>
#include <Poco/DOM/NodeFilter.h>
#include <Poco/File.h>
#include <Poco/Path.h>

#include <boost/algorithm/string.hpp>

namespace Poco
{
namespace DOM
{
class Element;
}
}

namespace Mantid
{
Expand Down
3 changes: 0 additions & 3 deletions Code/Mantid/Framework/MDAlgorithms/src/BinMD.cpp
Expand Up @@ -14,9 +14,6 @@
#include "MantidMDEvents/MDHistoWorkspace.h"
#include "MantidMDAlgorithms/BinMD.h"
#include <boost/algorithm/string.hpp>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/DOMParser.h>
#include <Poco/DOM/Element.h>
#include "MantidKernel/EnabledWhenProperty.h"
#include "MantidMDEvents/CoordTransformAffine.h"

Expand Down
Expand Up @@ -10,11 +10,6 @@
#include <Poco/DOM/DOMParser.h>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/Element.h>
#include <Poco/DOM/NodeList.h>
#include <Poco/DOM/NodeIterator.h>
#include <Poco/DOM/NodeFilter.h>
#include <Poco/File.h>
#include <Poco/Path.h>

class InvalidParameterParserTest : public CxxTest::TestSuite
{
Expand All @@ -27,11 +22,10 @@ class InvalidParameterParserTest : public CxxTest::TestSuite

DOMParser pParser;
std::string xmlToParse = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Parameter><Type>SomeUnknownParameter</Type><Value>x</Value></Parameter>";
Document* pDoc = pParser.parseString(xmlToParse);
Element* pRootElem = pDoc->documentElement();
Poco::AutoPtr<Document> pDoc = pParser.parseString(xmlToParse);

InvalidParameterParser parser;
Mantid::API::ImplicitFunctionParameter* iparam = parser.createParameter(pRootElem);
Mantid::API::ImplicitFunctionParameter* iparam = parser.createParameter(pDoc->documentElement());
InvalidParameter* pInvalidParam = dynamic_cast<InvalidParameter*>(iparam);
boost::scoped_ptr<InvalidParameter> invalparam(pInvalidParam);

Expand Down
Expand Up @@ -3,14 +3,9 @@
#include "MantidAPI/CoordTransform.h"
#include "MantidMDEvents/CoordTransformAffine.h"
#include "MantidMDEvents/CoordTransformAffineParser.h"
#include <Poco/DOM/Document.h>
#include <Poco/DOM/DOMParser.h>

#include <Poco/DOM/Element.h>
#include <Poco/DOM/NodeFilter.h>
#include <Poco/DOM/NodeIterator.h>
#include <Poco/DOM/NodeList.h>
#include <Poco/File.h>
#include <Poco/Path.h>

namespace Mantid
{
Expand Down Expand Up @@ -48,7 +43,7 @@ namespace Mantid
}

Element* paramListElement = coordTransElement->getChildElement("ParameterList");
Poco::XML::NodeList* parameters = paramListElement->getElementsByTagName("Parameter");
Poco::AutoPtr<Poco::XML::NodeList> parameters = paramListElement->getElementsByTagName("Parameter");

//Add input dimension parameter.
InDimParameterParser inDimParser;
Expand Down
Expand Up @@ -3,15 +3,6 @@
#include "MantidAPI/VectorParameterParser.h"
#include "MantidAPI/SingleValueParameterParser.h"

#include <Poco/DOM/DOMParser.h>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/Element.h>
#include <Poco/DOM/NodeList.h>
#include <Poco/DOM/NodeIterator.h>
#include <Poco/DOM/NodeFilter.h>
#include <Poco/File.h>
#include <Poco/Path.h>

namespace Mantid
{
namespace MDEvents
Expand Down Expand Up @@ -52,7 +43,7 @@ namespace Mantid
}

Element* paramListElement = coordTransElement->getChildElement("ParameterList");
Poco::XML::NodeList* parameters = paramListElement->getElementsByTagName("Parameter");
Poco::AutoPtr<Poco::XML::NodeList> parameters = paramListElement->getElementsByTagName("Parameter");

// Parse the in dimension parameter.
InDimParameterParser inDimParamParser;
Expand Down

0 comments on commit cea958b

Please sign in to comment.