Commit b9dd6799 authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Add pure virtual getItemTag method to XdmfItem working to return the tag...

ENH: Add pure virtual getItemTag method to XdmfItem working to return the tag (same as in XML terminology) for the specific item.
parent 08b41ff6
......@@ -478,6 +478,11 @@ std::map<std::string, std::string> XdmfArray::getItemProperties() const
return arrayProperties;
}
std::string XdmfArray::getItemTag() const
{
return "DataItem";
}
unsigned int XdmfArray::getPrecision() const
{
if(mHaveArray)
......
......@@ -94,6 +94,8 @@ public:
std::map<std::string, std::string> getItemProperties() const;
std::string getItemTag() const;
/**
* Get the precision, in bytes, of the data type of this array.
*
......
......@@ -40,6 +40,11 @@ std::map<std::string, std::string> XdmfAttribute::getItemProperties() const
return attributeProperties;
}
std::string XdmfAttribute::getItemTag() const
{
return "Attribute";
}
std::string XdmfAttribute::getName() const
{
return mName;
......
......@@ -35,6 +35,8 @@ public:
std::map<std::string, std::string> getItemProperties() const;
std::string getItemTag() const;
/**
* Get the name of the attribute.
*
......
......@@ -50,6 +50,11 @@ std::map<std::string, std::string> XdmfDomain::getItemProperties() const
return domainProperties;
}
std::string XdmfDomain::getItemTag() const
{
return "Domain";
}
unsigned int XdmfDomain::getNumberOfGrids() const
{
return mGrids.size();
......
......@@ -39,6 +39,8 @@ public:
std::map<std::string, std::string> getItemProperties() const;
std::string getItemTag() const;
/**
* Get the number of XdmfGrids attached to this domain.
*
......
......@@ -32,6 +32,11 @@ std::map<std::string, std::string> XdmfGeometry::getItemProperties() const
return geometryProperties;
}
std::string XdmfGeometry::getItemTag() const
{
return "Geometry";
}
void XdmfGeometry::setGeometryType(const XdmfGeometryType & geometryType)
{
mGeometryType = geometryType;
......
......@@ -28,6 +28,8 @@ public:
std::map<std::string, std::string> getItemProperties() const;
std::string getItemTag() const;
/**
* Set the XdmfGeometryType associated with this geometry.
*
......
......@@ -62,6 +62,11 @@ std::map<std::string, std::string> XdmfGrid::getItemProperties() const
return gridProperties;
}
std::string XdmfGrid::getItemTag() const
{
return "Grid";
}
std::string XdmfGrid::getName() const
{
return mName;
......
......@@ -56,6 +56,8 @@ public:
std::map<std::string, std::string> getItemProperties() const;
std::string getItemTag() const;
/**
* Get the name of the grid.
*
......
......@@ -30,6 +30,11 @@ public:
LOKI_DEFINE_VISITABLE_BASE()
/**
* Get the tag for this XdmfItem. This is equivalent to tags in XML parlance.
*/
virtual std::string getItemTag() const = 0;
/**
* Get the key/value property pairs for this XdmfItem. These are equivalent to attributes in XML parlance.
*
......
......@@ -21,6 +21,11 @@ XdmfTopology::~XdmfTopology()
std::cout << "Deleted Topology " << this << std::endl;
}
std::string XdmfTopology::getItemTag() const
{
return "Topology";
}
std::map<std::string, std::string> XdmfTopology::getItemProperties() const
{
std::map<std::string, std::string> topologyProperties;
......
......@@ -21,6 +21,8 @@ public:
std::map<std::string, std::string> getItemProperties() const;
std::string getItemTag() const;
/**
* Get the number of elements this Topology contains.
*
......
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