From d25becbaceab79809cb57fafaece151cecee3f69 Mon Sep 17 00:00:00 2001 From: neoraider Date: Fri, 14 Dec 2007 22:03:00 +0000 Subject: zoomedit: Generalized Tool objects. --- Object.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Object.h (limited to 'Object.h') diff --git a/Object.h b/Object.h new file mode 100644 index 0000000..bdec9ca --- /dev/null +++ b/Object.h @@ -0,0 +1,18 @@ +#ifndef OBJECT_H_ +#define OBJECT_H_ + +#include + + +class Object { + public: + virtual ~Object() {} + + virtual const char* getType() const = 0; + + bool isOfType(const char *type) const { + return (std::strcmp(getType(), type) == 0); + } +}; + +#endif /*OBJECT_H_*/ -- cgit v1.2.3