diff options
Diffstat (limited to 'src/keys/strkey.cpp')
-rw-r--r-- | src/keys/strkey.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/keys/strkey.cpp b/src/keys/strkey.cpp new file mode 100644 index 0000000..7e2d539 --- /dev/null +++ b/src/keys/strkey.cpp @@ -0,0 +1,41 @@ +/****************************************************************************** + * StrKey.cpp - code for class 'StrKey'- a standard string key class (used + * for modules that index on single strings (eg. cities, + * names, words, etc.) + */ + +#include <swmacs.h> +#include <utilfuns.h> +#include <strkey.h> +#include <string.h> +#include <stdio.h> + + +static const char *classes[] = {"StrKey", "SWKey", "SWObject", 0}; +SWClass StrKey::classdef(classes); + +/****************************************************************************** + * StrKey Constructor - initializes instance of StrKey + * + * ENT: ikey - text key (word, city, name, etc.) + */ + +StrKey::StrKey(const char *ikey) : SWKey(ikey) +{ + init(); +} + + +void StrKey::init() { + myclass = &classdef; +} + + +/****************************************************************************** + * StrKey Destructor - cleans up instance of StrKey + * + * ENT: ikey - text key + */ + +StrKey::~StrKey() { +} |