#ifndef XDMFDATAITEM_HPP_ #define XDMFDATAITEM_HPP_ // Forward Declarations class XdmfArray; // Includes #include "XdmfItem.hpp" /** * @brief A type of XdmfItem that holds data values in an XdmfArray. * * XdmfDataItem is an abstract base class. Any part of the Xdmf graph structure that holds values * in an XdmfArray inherits from this. XdmfDataItem imbues the ability to store and retrieve XdmfArrays. */ class XdmfDataItem : public XdmfItem { public: /** * Get the XdmfArray attached to this XdmfDataItem. * * @return a smart pointer to the XdmfArray. */ boost::shared_ptr getArray(); /** * Get the XdmfArray attached to this XdmfDataItem (const version). * * @return a smart pointer to the XdmfArray. */ boost::shared_ptr getArray() const; std::string printSelf() const; /** * Attach an XdmfArray to this XdmfDataItem. * * @param array a smart pointer to the XdmfArray. */ void setArray(boost::shared_ptr array); virtual void traverse(boost::shared_ptr visitor) const; virtual void write(boost::shared_ptr visitor) const = 0; protected: XdmfDataItem(); virtual ~XdmfDataItem(); private: XdmfDataItem(const XdmfDataItem & dataItem); // Not implemented. void operator=(const XdmfDataItem & dataItem); // Not implemented. boost::shared_ptr mArray; }; #endif /* XDMFDATAITEM_HPP_ */