#include <hn/dynobj.h>
#include <hn/log.h>
class Object {
	DECLARE_DYNAMIC_CLASS(0x01, Object);
public:
	Object() {
		logMsg("Object()");
	}
	Object(std::istream &) {
		logMsg("Object(std::istream&)");
	}
	virtual ~Object() {
		logMsg("~Object()");
	}
	void f() {
		logMsg("Object::f()");
	}
};
IMPLEMENT_DYNAMIC_CLASS(0x01, Object);

int main() {
	logMsg("Testing dynamib objects.");

	// typical usage
	Object *o = ObjFactory::instance().createObject<
		Object, OCP::DefaultCreator
	>(0x01);
}