XdmfDataItem.cpp 771 Bytes
Newer Older
1 2 3 4 5 6 7
/*
 * XdmfDataItem.cpp
 *
 *  Created on: Jan 29, 2010
 *      Author: kleiter
 */

Ken Leiter (Civ ARL/CISD) kleiter's avatar
ENH:  
Ken Leiter (Civ ARL/CISD) kleiter committed
8
#include "XdmfArray.hpp"
9 10 11
#include "XdmfDataItem.hpp"

XdmfDataItem::XdmfDataItem() :
Ken Leiter (Civ ARL/CISD) kleiter's avatar
ENH:  
Ken Leiter (Civ ARL/CISD) kleiter committed
12
	mArray(XdmfArray::New())
13 14 15 16 17 18 19 20 21
{
	std::cout << "Created DataItem " << this << std::endl;
}

XdmfDataItem::~XdmfDataItem()
{
	std::cout << "Deleted DataItem " << this << std::endl;
}

22
boost::shared_ptr<XdmfArray> XdmfDataItem::getArray()
23
{
24
	return mArray;
25 26
}

27
boost::shared_ptr<const XdmfArray> XdmfDataItem::getArray() const
28
{
29
	return mArray;
30 31
}

32
std::string XdmfDataItem::printSelf() const
33
{
34
	return "XdmfDataItem";
35 36
}

37
void XdmfDataItem::setArray(boost::shared_ptr<XdmfArray> array)
38
{
39
	mArray = array;
40
}
41 42 43 44 45

void XdmfDataItem::traverse(boost::shared_ptr<XdmfVisitor> visitor) const
{
	mArray->write(visitor);
}