Commit 983479ed authored by Kenneth Leiter's avatar Kenneth Leiter
Browse files

ENH: Commit Ken Renard's patches modifying populateItem and XdmfCoreReader to...

ENH: Commit Ken Renard's patches modifying populateItem and XdmfCoreReader to support some xpath functionality for backwards compatibility.
parent ab73bf69
......@@ -57,7 +57,7 @@ boost::shared_ptr<const XdmfAttributeType> XdmfAttribute::getType() const
return mAttributeType;
}
void XdmfAttribute::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfAttribute::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
std::map<std::string, std::string>::const_iterator name = itemProperties.find("Name");
if(name != itemProperties.end())
......
......@@ -80,7 +80,7 @@ public:
protected:
XdmfAttribute();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
private:
......
......@@ -84,7 +84,7 @@ void XdmfDomain::insert(const boost::shared_ptr<XdmfGridCollection> gridCollecti
mGridCollections.push_back(gridCollection);
}
void XdmfDomain::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfDomain::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
for(std::vector<boost::shared_ptr<XdmfItem> >::const_iterator iter = childItems.begin(); iter != childItems.end(); ++iter)
{
......
......@@ -112,7 +112,7 @@ public:
protected:
XdmfDomain();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
private:
......
......@@ -52,7 +52,7 @@ boost::shared_ptr<const XdmfGeometryType> XdmfGeometry::getType() const
return mGeometryType;
}
void XdmfGeometry::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfGeometry::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
mGeometryType = XdmfGeometryType::New(itemProperties);
for(std::vector<boost::shared_ptr<XdmfItem> >::const_iterator iter = childItems.begin(); iter != childItems.end(); ++iter)
......
......@@ -56,7 +56,7 @@ public:
protected:
XdmfGeometry();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
private:
......
......@@ -173,7 +173,7 @@ void XdmfGrid::insert(const boost::shared_ptr<XdmfSet> set)
mSets.push_back(set);
}
void XdmfGrid::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfGrid::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
std::map<std::string, std::string>::const_iterator name = itemProperties.find("Name");
if(name != itemProperties.end())
......
......@@ -263,7 +263,7 @@ public:
protected:
XdmfGrid();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
boost::shared_ptr<XdmfGeometry> mGeometry;
std::string mName;
......
......@@ -48,11 +48,11 @@ boost::shared_ptr<const XdmfGridCollectionType> XdmfGridCollection::getType() co
return mCollectionType;
}
void XdmfGridCollection::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfGridCollection::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
mCollectionType = XdmfGridCollectionType::New(itemProperties);
XdmfDomain::populateItem(itemProperties, childItems);
XdmfGrid::populateItem(itemProperties, childItems);
XdmfDomain::populateItem(itemProperties, childItems, reader);
XdmfGrid::populateItem(itemProperties, childItems, reader);
}
void XdmfGridCollection::setType(const boost::shared_ptr<const XdmfGridCollectionType> collectionType)
......
......@@ -59,7 +59,7 @@ public:
protected:
XdmfGridCollection();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
private:
......
......@@ -146,7 +146,7 @@ bool XdmfMap::isInitialized() const
return mImpl->mMap.size() > 0;
}
void XdmfMap::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfMap::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
std::vector<boost::shared_ptr<XdmfArray> > arrayVector;
arrayVector.reserve(3);
......
......@@ -60,7 +60,7 @@ public:
protected:
XdmfMap();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
private:
......
......@@ -67,7 +67,7 @@ bool XdmfSet::isInitialized() const
return std::set<unsigned int>::size() > 0;
}
void XdmfSet::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfSet::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
std::map<std::string, std::string>::const_iterator name = itemProperties.find("Name");
if(name != itemProperties.end())
......
......@@ -106,12 +106,10 @@ public:
void traverse(const boost::shared_ptr<XdmfBaseVisitor> visitor);
XdmfSet();
protected:
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
XdmfSet();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
private:
......
......@@ -44,7 +44,7 @@ double XdmfTime::getValue() const
return mValue;
}
void XdmfTime::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfTime::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
std::map<std::string, std::string>::const_iterator value = itemProperties.find("Value");
if(value != itemProperties.end())
......
......@@ -47,7 +47,7 @@ public:
protected:
XdmfTime(const double & value);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
private:
......
......@@ -58,7 +58,7 @@ boost::shared_ptr<const XdmfTopologyType> XdmfTopology::getType() const
return mTopologyType;
}
void XdmfTopology::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfTopology::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
mTopologyType = XdmfTopologyType::New(itemProperties);
for(std::vector<boost::shared_ptr<XdmfItem> >::const_iterator iter = childItems.begin(); iter != childItems.end(); ++iter)
......
......@@ -58,7 +58,7 @@ public:
protected:
XdmfTopology();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
private:
......
......@@ -532,7 +532,7 @@ void XdmfArray::internalizeArrayPointer()
}
}
void XdmfArray::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems)
void XdmfArray::populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader)
{
std::string contentVal;
unsigned int sizeVal = 1;
......
......@@ -325,7 +325,7 @@ public:
protected:
XdmfArray();
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems);
virtual void populateItem(const std::map<std::string, std::string> & itemProperties, std::vector<boost::shared_ptr<XdmfItem> > & childItems, const XdmfCoreReader * const reader);
private:
......
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