Commit fa564313 authored by Kenneth Leiter's avatar Kenneth Leiter
Browse files

ENH: Remove static New implementation from header files and move to implementation files.

parent 860ab6c0
......@@ -9,6 +9,12 @@
#include "XdmfAttributeCenter.hpp"
#include "XdmfAttributeType.hpp"
boost::shared_ptr<XdmfAttribute> XdmfAttribute::New()
{
boost::shared_ptr<XdmfAttribute> p(new XdmfAttribute());
return p;
}
XdmfAttribute::XdmfAttribute() :
mName(""),
mAttributeType(XdmfAttributeType::NoAttributeType()),
......
......@@ -23,11 +23,7 @@ public:
*
* @return constructed XdmfAttribute.
*/
static boost::shared_ptr<XdmfAttribute> New()
{
boost::shared_ptr<XdmfAttribute> p(new XdmfAttribute());
return p;
};
static boost::shared_ptr<XdmfAttribute> New();
virtual ~XdmfAttribute();
......
......@@ -9,6 +9,12 @@
#include "XdmfGrid.hpp"
#include "XdmfGridCollection.hpp"
boost::shared_ptr<XdmfDomain> XdmfDomain::New()
{
boost::shared_ptr<XdmfDomain> p(new XdmfDomain());
return p;
}
XdmfDomain::XdmfDomain()
{
}
......
......@@ -23,12 +23,7 @@ public:
*
* @return constructed XdmfDomain.
*/
static boost::shared_ptr<XdmfDomain> New()
{
boost::shared_ptr<XdmfDomain> p(new XdmfDomain());
return p;
};
static boost::shared_ptr<XdmfDomain> New();
virtual ~XdmfDomain();
LOKI_DEFINE_VISITABLE(XdmfDomain, XdmfItem)
......
......@@ -9,6 +9,12 @@
#include "XdmfGeometry.hpp"
#include "XdmfGeometryType.hpp"
boost::shared_ptr<XdmfGeometry> XdmfGeometry::New()
{
boost::shared_ptr<XdmfGeometry> p(new XdmfGeometry());
return p;
}
XdmfGeometry::XdmfGeometry() :
mGeometryType(XdmfGeometryType::NoGeometryType()),
mNumberPoints(0)
......
......@@ -23,11 +23,7 @@ public:
*
* @return constructed XdmfGeometry.
*/
static boost::shared_ptr<XdmfGeometry> New()
{
boost::shared_ptr<XdmfGeometry> p(new XdmfGeometry());
return p;
};
static boost::shared_ptr<XdmfGeometry> New();
virtual ~XdmfGeometry();
......
......@@ -12,6 +12,12 @@
#include "XdmfTime.hpp"
#include "XdmfTopology.hpp"
boost::shared_ptr<XdmfGrid> XdmfGrid::New()
{
boost::shared_ptr<XdmfGrid> p(new XdmfGrid());
return p;
}
XdmfGrid::XdmfGrid() :
mGeometry(XdmfGeometry::New()),
mTime(boost::shared_ptr<XdmfTime>()),
......
......@@ -28,11 +28,7 @@ public:
*
* @return constructed XdmfGrid.
*/
static boost::shared_ptr<XdmfGrid> New()
{
boost::shared_ptr<XdmfGrid> p(new XdmfGrid());
return p;
};
static boost::shared_ptr<XdmfGrid> New();
virtual ~XdmfGrid();
......
......@@ -8,6 +8,12 @@
#include "XdmfGridCollection.hpp"
#include "XdmfGridCollectionType.hpp"
boost::shared_ptr<XdmfGridCollection> XdmfGridCollection::New()
{
boost::shared_ptr<XdmfGridCollection> p(new XdmfGridCollection());
return p;
};
XdmfGridCollection::XdmfGridCollection() :
mCollectionType(XdmfGridCollectionType::NoCollectionType())
{
......
......@@ -25,11 +25,7 @@ public:
*
* @return constructed XdmfGridCollection.
*/
static boost::shared_ptr<XdmfGridCollection> New()
{
boost::shared_ptr<XdmfGridCollection> p(new XdmfGridCollection());
return p;
};
static boost::shared_ptr<XdmfGridCollection> New();
virtual ~XdmfGridCollection();
......
......@@ -9,6 +9,12 @@
#include "XdmfTime.hpp"
#include "XdmfTopology.hpp"
boost::shared_ptr<XdmfItemFactory> XdmfItemFactory::New()
{
boost::shared_ptr<XdmfItemFactory> p(new XdmfItemFactory());
return p;
}
XdmfItemFactory::XdmfItemFactory()
{
}
......
......@@ -19,11 +19,7 @@ public:
*
* @return constructed XdmfItemFactory.
*/
static boost::shared_ptr<XdmfItemFactory> New()
{
boost::shared_ptr<XdmfItemFactory> p(new XdmfItemFactory());
return p;
};
static boost::shared_ptr<XdmfItemFactory> New();
virtual ~XdmfItemFactory();
......
......@@ -4,6 +4,12 @@
#include "XdmfItemFactory.hpp"
#include "XdmfReader.hpp"
boost::shared_ptr<XdmfReader> XdmfReader::New()
{
boost::shared_ptr<XdmfReader> p(new XdmfReader());
return p;
}
XdmfReader::XdmfReader() :
XdmfCoreReader(XdmfItemFactory::New())
{
......
......@@ -19,11 +19,7 @@ public:
*
* @return constructed XdmfReader.
*/
static boost::shared_ptr<XdmfReader> New()
{
boost::shared_ptr<XdmfReader> p(new XdmfReader());
return p;
};
static boost::shared_ptr<XdmfReader> New();
virtual ~XdmfReader();
......
......@@ -8,6 +8,12 @@
#include "XdmfSet.hpp"
#include "XdmfSetType.hpp"
boost::shared_ptr<XdmfSet> XdmfSet::New()
{
boost::shared_ptr<XdmfSet> p(new XdmfSet());
return p;
}
XdmfSet::XdmfSet() :
mSetType(XdmfSetType::NoSetType()),
mName("")
......
......@@ -24,11 +24,7 @@ public:
*
* @return constructed XdmfSet.
*/
static boost::shared_ptr<XdmfSet> New()
{
boost::shared_ptr<XdmfSet> p(new XdmfSet());
return p;
};
static boost::shared_ptr<XdmfSet> New();
virtual ~XdmfSet();
......
......@@ -8,6 +8,12 @@
#include <sstream>
#include "XdmfTime.hpp"
boost::shared_ptr<XdmfTime> XdmfTime::New(const double & value)
{
boost::shared_ptr<XdmfTime> p(new XdmfTime(value));
return p;
}
XdmfTime::XdmfTime(const double & value) :
mValue(value)
{
......
......@@ -19,11 +19,7 @@ public:
* @param timeValue the value of the XdmfTime to create.
* @return the new XdmfTime.
*/
static boost::shared_ptr<XdmfTime> New(const double & value = 0)
{
boost::shared_ptr<XdmfTime> p(new XdmfTime(value));
return p;
}
static boost::shared_ptr<XdmfTime> New(const double & value = 0);
virtual ~XdmfTime();
......
......@@ -10,6 +10,12 @@
#include "XdmfTopology.hpp"
#include "XdmfTopologyType.hpp"
boost::shared_ptr<XdmfTopology> XdmfTopology::New()
{
boost::shared_ptr<XdmfTopology> p(new XdmfTopology());
return p;
}
XdmfTopology::XdmfTopology() :
mTopologyType(XdmfTopologyType::NoTopologyType())
{
......
......@@ -23,11 +23,7 @@ public:
*
* @return constructed XdmfTopology.
*/
static boost::shared_ptr<XdmfTopology> New()
{
boost::shared_ptr<XdmfTopology> p(new XdmfTopology());
return p;
};
static boost::shared_ptr<XdmfTopology> New();
virtual ~XdmfTopology();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment