XdmfDataItem.hpp 1.06 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
/*
 * XdmfDataItem.hpp
 *
 *
 *  Created on: Jan 25, 2010
 *      Author: kleiter
 */

#ifndef XDMFDATAITEM_HPP_
#define XDMFDATAITEM_HPP_

Ken Leiter (Civ ARL/CISD) kleiter's avatar
ENH:  
Ken Leiter (Civ ARL/CISD) kleiter committed
12 13 14 15
// Forward Declarations
class XdmfArray;

// Includes
16 17 18 19 20 21
#include "XdmfItem.hpp"

class XdmfDataItem : public XdmfItem {

public:

Ken Leiter (Civ ARL/CISD) kleiter's avatar
ENH:  
Ken Leiter (Civ ARL/CISD) kleiter committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
	/**
	 * Attach an array to this dataitem.
	 *
	 * @param a smart pointer to the array.
	 */
	void setArray(boost::shared_ptr<XdmfArray> array);

	/**
	 * Get the array attached to this dataitem.
	 *
	 * @return a smart pointer to the array.
	 */
	boost::shared_ptr<XdmfArray> getArray();

	/**
	 * Get the array attached to this dataitem (const version).
	 *
	 * @return a smart pointer to the array.
	 */
	boost::shared_ptr<const XdmfArray> getArray() const;
42

43 44
	std::string printSelf() const;

45
	virtual void traverse(boost::shared_ptr<XdmfVisitor> visitor) const;
46 47 48 49 50 51 52 53 54 55 56

protected:

	XdmfDataItem();
	virtual ~XdmfDataItem();

private:

	XdmfDataItem(const XdmfDataItem&);  // Not implemented.
	void operator=(const XdmfDataItem&);  // Not implemented.

Ken Leiter (Civ ARL/CISD) kleiter's avatar
ENH:  
Ken Leiter (Civ ARL/CISD) kleiter committed
57
	boost::shared_ptr<XdmfArray> mArray;
58 59 60
};

#endif /* XDMFDATAITEM_HPP_ */