summaryrefslogtreecommitdiff
path: root/src/keys/strkey.cpp
blob: 7e2d53929604b8bf5d7eaadaa976fce17ce92140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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() {
}