diff options
author | neoraider <devnull@localhost> | 2007-12-14 23:03:00 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-12-14 23:03:00 +0100 |
commit | d25becbaceab79809cb57fafaece151cecee3f69 (patch) | |
tree | a0d3973343ccd658e8d73f64dcb402b193c424c3 /Object.h | |
parent | 9a1bbf4b9ae00bfe6ef7c5c251bae0da9b624d9c (diff) | |
download | zoomedit-d25becbaceab79809cb57fafaece151cecee3f69.tar zoomedit-d25becbaceab79809cb57fafaece151cecee3f69.zip |
zoomedit: Generalized Tool objects.
Diffstat (limited to 'Object.h')
-rw-r--r-- | Object.h | 18 |
1 files changed, 18 insertions, 0 deletions
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 <cstring> + + +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_*/ |