Commit 305ffbca authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Make ItemTag const so it is cannot be modified.

parent cb10378a
......@@ -22,7 +22,7 @@ XdmfAttribute::~XdmfAttribute()
std::cout << "Deleted Attribute " << this << std::endl;
}
std::string XdmfAttribute::ItemTag = "Attribute";
const std::string XdmfAttribute::ItemTag = "Attribute";
boost::shared_ptr<const XdmfAttributeCenter> XdmfAttribute::getAttributeCenter() const
{
......
......@@ -22,7 +22,7 @@ public:
virtual ~XdmfAttribute();
LOKI_DEFINE_VISITABLE(XdmfAttribute, XdmfDataItem)
static std::string ItemTag;
static const std::string ItemTag;
/**
* Get the XdmfAttributeCenter associated with this attribute.
......
......@@ -18,7 +18,7 @@ XdmfDomain::~XdmfDomain()
std::cout << "Deleted Domain " << this << std::endl;
}
std::string XdmfDomain::ItemTag = "Domain";
const std::string XdmfDomain::ItemTag = "Domain";
void XdmfDomain::insert(const boost::shared_ptr<XdmfGrid> grid)
{
......
......@@ -21,7 +21,7 @@ public:
virtual ~XdmfDomain();
LOKI_DEFINE_VISITABLE(XdmfDomain, XdmfItem)
static std::string ItemTag;
static const std::string ItemTag;
/**
* Get a XdmfGrid attached to the domain.
......
......@@ -21,7 +21,7 @@ XdmfGeometry::~XdmfGeometry()
std::cout << "Deleted Geometry " << this << std::endl;
}
std::string XdmfGeometry::ItemTag = "Geometry";
const std::string XdmfGeometry::ItemTag = "Geometry";
boost::shared_ptr<const XdmfGeometryType> XdmfGeometry::getGeometryType() const
{
......
......@@ -22,7 +22,7 @@ public:
virtual ~XdmfGeometry();
LOKI_DEFINE_VISITABLE(XdmfGeometry, XdmfDataItem)
static std::string ItemTag;
static const std::string ItemTag;
/**
* Get the XdmfGeometryType associated with this geometry.
......
......@@ -24,7 +24,7 @@ XdmfGrid::~XdmfGrid()
std::cout << "Deleted Grid " << this << std::endl;
}
std::string XdmfGrid::ItemTag = "Grid";
const std::string XdmfGrid::ItemTag = "Grid";
boost::shared_ptr<XdmfAttribute> XdmfGrid::getAttribute(const unsigned int index)
{
......
......@@ -26,7 +26,7 @@ public:
virtual ~XdmfGrid();
LOKI_DEFINE_VISITABLE(XdmfGrid, XdmfItem)
static std::string ItemTag;
static const std::string ItemTag;
/**
* Get an XdmfAttribute attached to this grid.
......
......@@ -20,7 +20,7 @@ XdmfGridCollection::~XdmfGridCollection()
std::cout << "Deleted Collection " << this << std::endl;
}
std::string XdmfGridCollection::ItemTag = "Grid";
const std::string XdmfGridCollection::ItemTag = "Grid";
boost::shared_ptr<XdmfGrid> XdmfGridCollection::getGrid(const unsigned int index)
{
......
......@@ -23,7 +23,7 @@ public:
virtual ~XdmfGridCollection();
LOKI_DEFINE_VISITABLE(XdmfGridCollection, XdmfGrid)
static std::string ItemTag;
static const std::string ItemTag;
/**
* Get a grid from this collection.
......
......@@ -20,7 +20,7 @@ XdmfSet::~XdmfSet()
std::cout << "Deleted Set " << this << std::endl;
}
std::string XdmfSet::ItemTag = "Set";
const std::string XdmfSet::ItemTag = "Set";
std::string XdmfSet::getName() const
{
......
......@@ -23,7 +23,7 @@ public:
virtual ~XdmfSet();
LOKI_DEFINE_VISITABLE(XdmfSet, XdmfDataItem)
static std::string ItemTag;
const static std::string ItemTag;
/**
* Get the XdmfSetType associated with this set.
......
......@@ -22,7 +22,7 @@ XdmfTopology::~XdmfTopology()
std::cout << "Deleted Topology " << this << std::endl;
}
std::string XdmfTopology::ItemTag = "Topology";
const std::string XdmfTopology::ItemTag = "Topology";
std::string XdmfTopology::getItemTag() const
{
......
......@@ -22,7 +22,7 @@ public:
virtual ~XdmfTopology();
LOKI_DEFINE_VISITABLE(XdmfTopology, XdmfDataItem)
static std::string ItemTag;
static const std::string ItemTag;
std::map<std::string, std::string> getItemProperties() const;
......
......@@ -319,7 +319,7 @@ XdmfArray::~XdmfArray()
std::cout << "Deleted Array " << this << std::endl;
}
std::string XdmfArray::ItemTag = "DataItem";
const std::string XdmfArray::ItemTag = "DataItem";
void XdmfArray::clear()
{
......
......@@ -54,7 +54,7 @@ public:
LOKI_DEFINE_VISITABLE(XdmfArray, XdmfItem)
friend class XdmfHDF5Writer;
static std::string ItemTag;
static const std::string ItemTag;
/**
* Copy values from an XdmfArray into this array.
......
set(XdmfCoreCxxTests
TestXdmfArray
TestXdmfArrayWriteRead
TestXdmfDataItem
TestXdmfHDF5Writer
)
......
#include "XdmfDataItem.hpp"
int main(int argc, char* argv[])
{
//boost::shared_ptr<XdmfDataItem> dataItem = XdmfDataItem::New();
//int intArray[10] = {1,2,3,4,5,6,7,8,9,10};
//dataItem->setValues(intArray);
}
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