Commit 5aa71a64 authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Hide use of boost::shared_ptr and boost::shared_dynamic_cast.

Using statements have been added to XdmfSharedPtr.hpp. All used of
boost::shared_ptr and boost::shared_dynamic_cast have been replaced
by shared_ptr and shared_dynamic_cast. Slight modification to XdmfCore.i
to get swig wrapping working again.
parent 518b5838
This diff is collapsed.
......@@ -26,10 +26,10 @@
#include "XdmfAttributeType.hpp"
#include "XdmfError.hpp"
boost::shared_ptr<XdmfAttribute>
shared_ptr<XdmfAttribute>
XdmfAttribute::New()
{
boost::shared_ptr<XdmfAttribute> p(new XdmfAttribute());
shared_ptr<XdmfAttribute> p(new XdmfAttribute());
return p;
}
......@@ -46,7 +46,7 @@ XdmfAttribute::~XdmfAttribute()
const std::string XdmfAttribute::ItemTag = "Attribute";
boost::shared_ptr<const XdmfAttributeCenter>
shared_ptr<const XdmfAttributeCenter>
XdmfAttribute::getCenter() const
{
return mCenter;
......@@ -74,7 +74,7 @@ XdmfAttribute::getName() const
return mName;
}
boost::shared_ptr<const XdmfAttributeType>
shared_ptr<const XdmfAttributeType>
XdmfAttribute::getType() const
{
return mType;
......@@ -82,7 +82,7 @@ XdmfAttribute::getType() const
void
XdmfAttribute::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<boost::shared_ptr<XdmfItem> > & childItems,
std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfItem::populateItem(itemProperties, childItems, reader);
......@@ -98,12 +98,11 @@ XdmfAttribute::populateItem(const std::map<std::string, std::string> & itemPrope
mCenter = XdmfAttributeCenter::New(itemProperties);
mType = XdmfAttributeType::New(itemProperties);
for(std::vector<boost::shared_ptr<XdmfItem> >::const_iterator iter =
for(std::vector<shared_ptr<XdmfItem> >::const_iterator iter =
childItems.begin();
iter != childItems.end();
++iter) {
if(boost::shared_ptr<XdmfArray> array =
boost::shared_dynamic_cast<XdmfArray>(*iter)) {
if(shared_ptr<XdmfArray> array = shared_dynamic_cast<XdmfArray>(*iter)) {
this->swap(array);
}
// TODO: If multiple dataitems.
......@@ -111,7 +110,7 @@ XdmfAttribute::populateItem(const std::map<std::string, std::string> & itemPrope
}
void
XdmfAttribute::setCenter(const boost::shared_ptr<const XdmfAttributeCenter> center)
XdmfAttribute::setCenter(const shared_ptr<const XdmfAttributeCenter> center)
{
mCenter = center;
}
......@@ -123,7 +122,7 @@ XdmfAttribute::setName(const std::string & name)
}
void
XdmfAttribute::setType(const boost::shared_ptr<const XdmfAttributeType> type)
XdmfAttribute::setType(const shared_ptr<const XdmfAttributeType> type)
{
mType = type;
}
......@@ -43,14 +43,14 @@ class XdmfAttributeType;
*/
class XDMF_EXPORT XdmfAttribute : public XdmfArray {
public:
public:
/**
* Create a new XdmfAttribute.
*
* @return constructed XdmfAttribute.
*/
static boost::shared_ptr<XdmfAttribute> New();
static shared_ptr<XdmfAttribute> New();
virtual ~XdmfAttribute();
......@@ -62,7 +62,7 @@ class XDMF_EXPORT XdmfAttribute : public XdmfArray {
*
* @return XdmfAttributeCenter of the attribute.
*/
boost::shared_ptr<const XdmfAttributeCenter> getCenter() const;
shared_ptr<const XdmfAttributeCenter> getCenter() const;
std::map<std::string, std::string> getItemProperties() const;
......@@ -80,14 +80,14 @@ class XDMF_EXPORT XdmfAttribute : public XdmfArray {
*
* @return XdmfAttributeType of the attribute.
*/
boost::shared_ptr<const XdmfAttributeType> getType() const;
shared_ptr<const XdmfAttributeType> getType() const;
/**
* Set the XdmfAttributeCenter associated with this attribute.
*
* @param center the XdmfAttributeCenter to set.
*/
void setCenter(const boost::shared_ptr<const XdmfAttributeCenter> center);
void setCenter(const shared_ptr<const XdmfAttributeCenter> center);
/**
* Set the name of the attribute.
......@@ -101,32 +101,32 @@ class XDMF_EXPORT XdmfAttribute : public XdmfArray {
*
* @param type XdmfAttributeType to set.
*/
void setType(const boost::shared_ptr<const XdmfAttributeType> type);
void setType(const shared_ptr<const XdmfAttributeType> type);
protected:
protected:
XdmfAttribute();
virtual void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<boost::shared_ptr<XdmfItem> > & childItems,
std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader);
private:
private:
XdmfAttribute(const XdmfAttribute &); // Not implemented.
void operator=(const XdmfAttribute &); // Not implemented.
boost::shared_ptr<const XdmfAttributeCenter> mCenter;
shared_ptr<const XdmfAttributeCenter> mCenter;
std::string mName;
boost::shared_ptr<const XdmfAttributeType> mType;
shared_ptr<const XdmfAttributeType> mType;
};
#ifdef _WIN32
XDMF_TEMPLATE template class XDMF_EXPORT
boost::shared_ptr<const XdmfAttributeType>;
shared_ptr<const XdmfAttributeType>;
XDMF_TEMPLATE template class XDMF_EXPORT
boost::shared_ptr<const XdmfAttributeCenter>;
shared_ptr<const XdmfAttributeCenter>;
#endif
#endif /* XDMFATTRIBUTE_HPP_ */
......@@ -25,42 +25,42 @@
#include "XdmfError.hpp"
// Supported XdmfAttributeCenters
boost::shared_ptr<const XdmfAttributeCenter>
shared_ptr<const XdmfAttributeCenter>
XdmfAttributeCenter::Grid()
{
static boost::shared_ptr<const XdmfAttributeCenter>
static shared_ptr<const XdmfAttributeCenter>
p(new XdmfAttributeCenter("Grid"));
return p;
}
boost::shared_ptr<const XdmfAttributeCenter>
shared_ptr<const XdmfAttributeCenter>
XdmfAttributeCenter::Cell()
{
static boost::shared_ptr<const XdmfAttributeCenter>
static shared_ptr<const XdmfAttributeCenter>
p(new XdmfAttributeCenter("Cell"));
return p;
}
boost::shared_ptr<const XdmfAttributeCenter>
shared_ptr<const XdmfAttributeCenter>
XdmfAttributeCenter::Face()
{
static boost::shared_ptr<const XdmfAttributeCenter>
static shared_ptr<const XdmfAttributeCenter>
p(new XdmfAttributeCenter("Face"));
return p;
}
boost::shared_ptr<const XdmfAttributeCenter>
shared_ptr<const XdmfAttributeCenter>
XdmfAttributeCenter::Edge()
{
static boost::shared_ptr<const XdmfAttributeCenter>
static shared_ptr<const XdmfAttributeCenter>
p(new XdmfAttributeCenter("Edge"));
return p;
}
boost::shared_ptr<const XdmfAttributeCenter>
shared_ptr<const XdmfAttributeCenter>
XdmfAttributeCenter::Node()
{
static boost::shared_ptr<const XdmfAttributeCenter>
static shared_ptr<const XdmfAttributeCenter>
p(new XdmfAttributeCenter("Node"));
return p;
}
......@@ -74,7 +74,7 @@ XdmfAttributeCenter::~XdmfAttributeCenter()
{
}
boost::shared_ptr<const XdmfAttributeCenter>
shared_ptr<const XdmfAttributeCenter>
XdmfAttributeCenter::New(const std::map<std::string, std::string> & itemProperties)
{
std::map<std::string, std::string>::const_iterator center =
......@@ -97,11 +97,15 @@ XdmfAttributeCenter::New(const std::map<std::string, std::string> & itemProperti
return Node();
}
else {
XdmfError::message(XdmfError::FATAL, "Center not of 'Grid','Cell','Face','Edge','Node' in XdmfAttributeCenter::New");
XdmfError::message(XdmfError::FATAL,
"Center not of 'Grid','Cell','Face','Edge','Node' "
"in XdmfAttributeCenter::New");
}
}
XdmfError::message(XdmfError::FATAL, "'Center' not found in itemProperties in XdmfAttributeCenter::New");
return boost::shared_ptr<const XdmfAttributeCenter>();
XdmfError::message(XdmfError::FATAL,
"'Center' not found in itemProperties in "
"XdmfAttributeCenter::New");
return shared_ptr<const XdmfAttributeCenter>();
}
void
......
......@@ -45,24 +45,24 @@
*/
class XDMF_EXPORT XdmfAttributeCenter : public XdmfItemProperty {
public:
public:
virtual ~XdmfAttributeCenter();
friend class XdmfAttribute;
// Supported Xdmf Attribute Centers
static boost::shared_ptr<const XdmfAttributeCenter> Grid();
static boost::shared_ptr<const XdmfAttributeCenter> Cell();
static boost::shared_ptr<const XdmfAttributeCenter> Face();
static boost::shared_ptr<const XdmfAttributeCenter> Edge();
static boost::shared_ptr<const XdmfAttributeCenter> Node();
static shared_ptr<const XdmfAttributeCenter> Grid();
static shared_ptr<const XdmfAttributeCenter> Cell();
static shared_ptr<const XdmfAttributeCenter> Face();
static shared_ptr<const XdmfAttributeCenter> Edge();
static shared_ptr<const XdmfAttributeCenter> Node();
void
getProperties(std::map<std::string, std::string> & collectedProperties) const;
protected:
protected:
/**
* Protected constructor for XdmfAttributeCenter. The constructor
......@@ -75,12 +75,12 @@ class XDMF_EXPORT XdmfAttributeCenter : public XdmfItemProperty {
*/
XdmfAttributeCenter(const std::string & name);
private:
private:
XdmfAttributeCenter(const XdmfAttributeCenter &); // Not implemented.
void operator=(const XdmfAttributeCenter &); // Not implemented.
static boost::shared_ptr<const XdmfAttributeCenter>
static shared_ptr<const XdmfAttributeCenter>
New(const std::map<std::string, std::string> & itemProperties);
std::string mName;
......
......@@ -25,58 +25,58 @@
#include "XdmfError.hpp"
// Supported XdmfAttributeTypes
boost::shared_ptr<const XdmfAttributeType>
shared_ptr<const XdmfAttributeType>
XdmfAttributeType::NoAttributeType()
{
static boost::shared_ptr<const XdmfAttributeType>
static shared_ptr<const XdmfAttributeType>
p(new XdmfAttributeType("None"));
return p;
}
boost::shared_ptr<const XdmfAttributeType>
shared_ptr<const XdmfAttributeType>
XdmfAttributeType::Scalar()
{
static boost::shared_ptr<const XdmfAttributeType>
static shared_ptr<const XdmfAttributeType>
p(new XdmfAttributeType("Scalar"));
return p;
}
boost::shared_ptr<const XdmfAttributeType>
shared_ptr<const XdmfAttributeType>
XdmfAttributeType::Vector()
{
static boost::shared_ptr<const XdmfAttributeType>
static shared_ptr<const XdmfAttributeType>
p(new XdmfAttributeType("Vector"));
return p;
}
boost::shared_ptr<const XdmfAttributeType>
shared_ptr<const XdmfAttributeType>
XdmfAttributeType::Tensor()
{
static boost::shared_ptr<const XdmfAttributeType>
static shared_ptr<const XdmfAttributeType>
p(new XdmfAttributeType("Tensor"));
return p;
}
boost::shared_ptr<const XdmfAttributeType>
shared_ptr<const XdmfAttributeType>
XdmfAttributeType::Matrix()
{
static boost::shared_ptr<const XdmfAttributeType>
static shared_ptr<const XdmfAttributeType>
p(new XdmfAttributeType("Matrix"));
return p;
}
boost::shared_ptr<const XdmfAttributeType>
shared_ptr<const XdmfAttributeType>
XdmfAttributeType::Tensor6()
{
static boost::shared_ptr<const XdmfAttributeType>
static shared_ptr<const XdmfAttributeType>
p(new XdmfAttributeType("Tensor6"));
return p;
}
boost::shared_ptr<const XdmfAttributeType>
shared_ptr<const XdmfAttributeType>
XdmfAttributeType::GlobalId()
{
static boost::shared_ptr<const XdmfAttributeType>
static shared_ptr<const XdmfAttributeType>
p(new XdmfAttributeType("GlobalId"));
return p;
}
......@@ -90,7 +90,7 @@ XdmfAttributeType::~XdmfAttributeType()
{
}
boost::shared_ptr<const XdmfAttributeType>
shared_ptr<const XdmfAttributeType>
XdmfAttributeType::New(const std::map<std::string, std::string> & itemProperties)
{
std::map<std::string, std::string>::const_iterator type =
......@@ -122,11 +122,16 @@ XdmfAttributeType::New(const std::map<std::string, std::string> & itemProperties
return GlobalId();
}
else {
XdmfError::message(XdmfError::FATAL, "Type not of 'None','Scalar','Vector','Tensor','Matrix','Tensor6', or 'GlobalId' in XdmfAttributeType::New");
XdmfError::message(XdmfError::FATAL,
"Type not of 'None','Scalar','Vector','Tensor', "
"'Matrix','Tensor6', or 'GlobalId' in "
"XdmfAttributeType::New");
}
}
XdmfError::message(XdmfError::FATAL, "Neither 'Type' nor 'AttributeType' found in itemProperties in XdmfAttributeType::New");
return boost::shared_ptr<const XdmfAttributeType>();
XdmfError::message(XdmfError::FATAL,
"Neither 'Type' nor 'AttributeType' found in "
"itemProperties in XdmfAttributeType::New");
return shared_ptr<const XdmfAttributeType>();
}
void
......
......@@ -48,25 +48,25 @@
*/
class XDMF_EXPORT XdmfAttributeType : public XdmfItemProperty {
public:
public:
virtual ~XdmfAttributeType();
friend class XdmfAttribute;
// Supported Xdmf Attribute Types
static boost::shared_ptr<const XdmfAttributeType> NoAttributeType();
static boost::shared_ptr<const XdmfAttributeType> Scalar();
static boost::shared_ptr<const XdmfAttributeType> Vector();
static boost::shared_ptr<const XdmfAttributeType> Tensor();
static boost::shared_ptr<const XdmfAttributeType> Matrix();
static boost::shared_ptr<const XdmfAttributeType> Tensor6();
static boost::shared_ptr<const XdmfAttributeType> GlobalId();
static shared_ptr<const XdmfAttributeType> NoAttributeType();
static shared_ptr<const XdmfAttributeType> Scalar();
static shared_ptr<const XdmfAttributeType> Vector();
static shared_ptr<const XdmfAttributeType> Tensor();
static shared_ptr<const XdmfAttributeType> Matrix();
static shared_ptr<const XdmfAttributeType> Tensor6();
static shared_ptr<const XdmfAttributeType> GlobalId();
void
getProperties(std::map<std::string, std::string> & collectedProperties) const;
protected:
protected:
/**
* Protected constructor for XdmfAttributeType. The constructor is
......@@ -78,12 +78,12 @@ class XDMF_EXPORT XdmfAttributeType : public XdmfItemProperty {
*/
XdmfAttributeType(const std::string & name);
private:
private:
XdmfAttributeType(const XdmfAttributeType &); // Not implemented.
void operator=(const XdmfAttributeType &); // Not implemented.
static boost::shared_ptr<const XdmfAttributeType>
static shared_ptr<const XdmfAttributeType>
New(const std::map<std::string, std::string> & itemProperties);
std::string mName;
......
......@@ -41,10 +41,10 @@ public:
public:
static boost::shared_ptr<XdmfTopologyCurvilinear>
static shared_ptr<XdmfTopologyCurvilinear>
New(const XdmfCurvilinearGrid * const curvilinearGrid)
{
boost::shared_ptr<XdmfTopologyCurvilinear>
shared_ptr<XdmfTopologyCurvilinear>
p(new XdmfTopologyCurvilinear(curvilinearGrid));
return p;
}
......@@ -52,7 +52,7 @@ public:
unsigned int
getNumberElements() const
{
const boost::shared_ptr<const XdmfArray> dimensions =
const shared_ptr<const XdmfArray> dimensions =
mCurvilinearGrid->getDimensions();
if(dimensions->getSize() == 0) {
return 0;
......@@ -80,10 +80,10 @@ public:
public:
static boost::shared_ptr<const XdmfTopologyTypeCurvilinear>
static shared_ptr<const XdmfTopologyTypeCurvilinear>
New(const XdmfCurvilinearGrid * const curvilinearGrid)
{
boost::shared_ptr<const XdmfTopologyTypeCurvilinear>
shared_ptr<const XdmfTopologyTypeCurvilinear>
p(new XdmfTopologyTypeCurvilinear(curvilinearGrid));
return p;
}
......@@ -100,7 +100,7 @@ public:
void
getProperties(std::map<std::string, std::string> & collectedProperties) const
{
boost::shared_ptr<const XdmfArray> dimensions =
shared_ptr<const XdmfArray> dimensions =
mCurvilinearGrid->getDimensions();
if(dimensions->getSize() == 3) {
collectedProperties["Type"] = "3DSMesh";
......@@ -109,7 +109,9 @@ public:
collectedProperties["Type"] = "2DSMesh";
}
else {
XdmfError::message(XdmfError::FATAL, "Grid dimensions not 2 or 3 in XdmfTopologyTypeCurvilinear::getProperties");
XdmfError::message(XdmfError::FATAL,
"Grid dimensions not 2 or 3 in "
"XdmfTopologyTypeCurvilinear::getProperties");
}
collectedProperties["Dimensions"] = dimensions->getValuesString();
}
......@@ -126,49 +128,49 @@ public:
};
XdmfCurvilinearGridImpl(const boost::shared_ptr<XdmfArray> numPoints) :
XdmfCurvilinearGridImpl(const shared_ptr<XdmfArray> numPoints) :
mDimensions(numPoints)
{
}
boost::shared_ptr<XdmfArray> mDimensions;
shared_ptr<XdmfArray> mDimensions;
};
boost::shared_ptr<XdmfCurvilinearGrid>
shared_ptr<XdmfCurvilinearGrid>
XdmfCurvilinearGrid::New(const unsigned int xNumPoints,
const unsigned int yNumPoints)
{
boost::shared_ptr<XdmfArray> numPoints = XdmfArray::New();
shared_ptr<XdmfArray> numPoints = XdmfArray::New();
numPoints->resize<unsigned int>(2);
numPoints->insert(0, xNumPoints);
numPoints->insert(1, yNumPoints);
boost::shared_ptr<XdmfCurvilinearGrid> p(new XdmfCurvilinearGrid(numPoints));
shared_ptr<XdmfCurvilinearGrid> p(new XdmfCurvilinearGrid(numPoints));
return p;
}
boost::shared_ptr<XdmfCurvilinearGrid>
shared_ptr<XdmfCurvilinearGrid>
XdmfCurvilinearGrid::New(const unsigned int xNumPoints,
const unsigned int yNumPoints,
const unsigned int zNumPoints)
{
boost::shared_ptr<XdmfArray> numPoints = XdmfArray::New();
shared_ptr<XdmfArray> numPoints = XdmfArray::New();
numPoints->resize<unsigned int>(3);
numPoints->insert(0, xNumPoints);
numPoints->insert(1, yNumPoints);
numPoints->insert(2, zNumPoints);
boost::shared_ptr<XdmfCurvilinearGrid> p(new XdmfCurvilinearGrid(numPoints));
shared_ptr<XdmfCurvilinearGrid> p(new XdmfCurvilinearGrid(numPoints));
return p;
}
boost::shared_ptr<XdmfCurvilinearGrid>
XdmfCurvilinearGrid::New(const boost::shared_ptr<XdmfArray> numPoints)
shared_ptr<XdmfCurvilinearGrid>
XdmfCurvilinearGrid::New(const shared_ptr<XdmfArray> numPoints)
{
boost::shared_ptr<XdmfCurvilinearGrid> p(new XdmfCurvilinearGrid(numPoints));
shared_ptr<XdmfCurvilinearGrid> p(new XdmfCurvilinearGrid(numPoints));
return p;
}
XdmfCurvilinearGrid::XdmfCurvilinearGrid(const boost::shared_ptr<XdmfArray> numPoints) :
XdmfCurvilinearGrid::XdmfCurvilinearGrid(const shared_ptr<XdmfArray> numPoints) :
XdmfGrid(XdmfGeometry::New(),
XdmfCurvilinearGridImpl::XdmfTopologyCurvilinear::New(this)),
mImpl(new XdmfCurvilinearGridImpl(numPoints))
......@@ -182,20 +184,20 @@ XdmfCurvilinearGrid::~XdmfCurvilinearGrid()
const std::string XdmfCurvilinearGrid::ItemTag = "Grid";
boost::shared_ptr<XdmfArray>
shared_ptr<XdmfArray>
XdmfCurvilinearGrid::getDimensions()
{
return boost::const_pointer_cast<XdmfArray>
(static_cast<const XdmfCurvilinearGrid &>(*this).getDimensions());
}
boost::shared_ptr<const XdmfArray>
shared_ptr<const XdmfArray>
XdmfCurvilinearGrid::getDimensions() const
{
return mImpl->mDimensions;
}
boost::shared_ptr<XdmfGeometry>
shared_ptr<XdmfGeometry>
XdmfCurvilinearGrid::getGeometry()
{
return boost::const_pointer_cast<XdmfGeometry>
......@@ -204,30 +206,30 @@ XdmfCurvilinearGrid::getGeometry()
void
XdmfCurvilinearGrid::populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<boost::shared_ptr<XdmfItem> > & childItems,
std::vector<shared_ptr<XdmfItem> > & childItems,
const XdmfCoreReader * const reader)
{
XdmfGrid::populateItem(itemProperties, childItems, reader);
for(std::vector<boost::shared_ptr<XdmfItem> >::const_iterator iter =
for(std::vector<shared_ptr<XdmfItem> >::const_iterator iter =
childItems.begin();
iter != childItems.end();
++iter) {
if(boost::shared_ptr<XdmfCurvilinearGrid> curvilinearGrid =
boost::shared_dynamic_cast<XdmfCurvilinearGrid>(*iter)) {
if(shared_ptr<XdmfCurvilinearGrid> curvilinearGrid =
shared_dynamic_cast<XdmfCurvilinearGrid>(*iter)) {
mImpl->mDimensions = curvilinearGrid->getDimensions();
}
}
}
void
XdmfCurvilinearGrid::setDimensions(const boost::shared_ptr<XdmfArray> dimensions)
XdmfCurvilinearGrid::setDimensions(const shared_ptr<XdmfArray> dimensions)
{
mImpl->mDimensions = dimensions;
}
void
XdmfCurvilinearGrid::setGeometry(const boost::shared_ptr<XdmfGeometry> geometry)
XdmfCurvilinearGrid::setGeometry(const shared_ptr<XdmfGeometry> geometry)
{
mGeometry = geometry;
}
......
......@@ -44,7 +44,7 @@ class XdmfArray;
*/
class XDMF_EXPORT XdmfCurvilinearGrid : public XdmfGrid {
public:
public:
/**
* Create a new curvilinear grid (Two dimensional).
......@@ -54,7 +54,7 @@ class XDMF_EXPORT XdmfCurvilinearGrid : public XdmfGrid {
*
* @return constructed curvilinear grid.
*/
static boost::shared_ptr<XdmfCurvilinearGrid>
static shared_ptr<XdmfCurvilinearGrid>
New(const unsigned int xNumPoints,
const unsigned int yNumPoints);
......@@ -67,7 +67,7 @@ class XDMF_EXPORT XdmfCurvilinearGrid : public XdmfGrid {
*
* @return constructed curvilinear grid.
*/
static boost::shared_ptr<XdmfCurvilinearGrid>
static shared_ptr<XdmfCurvilinearGrid>
New(const unsigned int xNumPoints,
const unsigned int yNumPoints,
const unsigned int zNumPoints);
......@@ -79,8 +79,8 @@ class XDMF_EXPORT XdmfCurvilinearGrid : public XdmfGrid {
*
* @return constructed curvilinear grid.
*/
static boost::shared_ptr<XdmfCurvilinearGrid>
New(const boost::shared_ptr<XdmfArray> numPoints);
static shared_ptr<XdmfCurvilinearGrid>
New(const shared_ptr<XdmfArray> numPoints);
virtual ~XdmfCurvilinearGrid();
......@@ -93,7 +93,7 @@ class XDMF_EXPORT XdmfCurvilinearGrid : public XdmfGrid {
*
* @return XdmfArray containing dimensions of this grid.
*/
boost::shared_ptr<XdmfArray> getDimensions();
shared_ptr<XdmfArray> getDimensions();
/**
* Get the dimensions of the grid, the number of points in each
......@@ -101,14 +101,14 @@ class XDMF_EXPORT XdmfCurvilinearGrid : public XdmfGrid {
*
* @return XdmfArray containing the dimensions of this grid.
*/
boost::shared_ptr<const XdmfArray> getDimensions() const;
shared_ptr<const XdmfArray> getDimensions() const;
/**
* Get the geometry associated with this grid.
*
* @return the geometry associated with this grid.
*/
boost::shared_ptr<XdmfGeometry> getGeometry();
shared_ptr<XdmfGeometry> getGeometry();
/**
* Set the dimensions of the grid, the number of points in each
......@@ -116,25 +116,25 @@ class XDMF_EXPORT XdmfCurvilinearGrid : public XdmfGrid {
*
* @param dimensions the dimension of the grid.
*/
void setDimensions(const boost::shared_ptr<XdmfArray> dimensions);
void setDimensions(const shared_ptr<XdmfArray> dimensions);
/**
* Set the geometry associated with this grid.
*
* @param geometry an XdmfGeometry to associate with this grid.
*/
void setGeometry(const boost::shared_ptr<XdmfGeometry> geometry);
void setGeometry(const shared_ptr<XdmfGeometry> geometry);
protected:
protected:
XdmfCurvilinearGrid(const boost::shared_ptr<XdmfArray> numPoints);
XdmfCurvilinearGrid(const shared_ptr<XdmfArray> numPoints);
void
populateItem(const std::map<std::string, std::string> & itemProperties,
std::vector<boost::shared_ptr<XdmfItem> > & childItems,
std::vector<shared_ptr<XdmfItem> > & childItems,