XdmfObject.hpp 540 Bytes
Newer Older
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
1 2 3
#ifndef XDMFOBJECT_HPP_
#define XDMFOBJECT_HPP_

4
// Includes
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
5 6 7 8 9 10 11 12 13 14 15
#include "boost/shared_ptr.hpp"
#include <iostream>

#define XdmfNewMacro(type) \
template <typename T> friend void boost::checked_delete(T * x); \
static boost::shared_ptr<type> New() \
{ \
	boost::shared_ptr<type> p(new type()); \
	return p; \
}

16 17 18 19 20
/**
 * @brief Root Xdmf Class.
 *
 * XdmfObject is the root Xdmf class which all Xdmf classes are derived from.
 */
Ken Leiter (Civ's avatar
Ken Leiter (Civ committed
21 22 23 24 25 26 27 28 29 30 31 32
class XdmfObject {

public:

protected:

	XdmfObject();
	virtual ~XdmfObject();

};

#endif /* XDMFOBJECT_HPP_ */