The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
strkey.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * strkey.cpp - code for class 'StrKey'- a standard string key class
4  * (used for modules that index on single strings (eg.
5  * cities, names, words, etc.)
6  *
7  * $Id: strkey.cpp 3808 2020-10-02 13:23:34Z scribe $
8  *
9  * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
10  * CrossWire Bible Society
11  * P. O. Box 2528
12  * Tempe, AZ 85280-2528
13  *
14  * This program is free software; you can redistribute it and/or modify it
15  * under the terms of the GNU General Public License as published by the
16  * Free Software Foundation version 2.
17  *
18  * This program is distributed in the hope that it will be useful, but
19  * WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * General Public License for more details.
22  *
23  */
24 
25 
26 #include <swmacs.h>
27 #include <strkey.h>
28 #include <stdio.h>
29 
31 
32 static const char *classes[] = {"StrKey", "SWKey", "SWObject", 0};
33 static const SWClass classdef(classes);
34 
35 /******************************************************************************
36  * StrKey Constructor - initializes instance of StrKey
37  *
38  * ENT: ikey - text key (word, city, name, etc.)
39  */
40 
41 StrKey::StrKey(const char *ikey) : SWKey(ikey)
42 {
43  init();
44 }
45 
46 
47 void StrKey::init() {
48  myClass = &classdef;
49 }
50 
51 
52 /******************************************************************************
53  * StrKey Destructor - cleans up instance of StrKey
54  *
55  * ENT: ikey - text key
56  */
57 
59 }
60 
#define SWORD_NAMESPACE_START
Definition: defs.h:39
virtual ~StrKey()
Definition: strkey.cpp:58
StrKey(const char *ikey=0)
Definition: strkey.cpp:41
const SWClass * myClass
Definition: swobject.h:55
void init()
Definition: strkey.cpp:47
static SWORD_NAMESPACE_START const char * classes[]
Definition: strkey.cpp:32
#define SWORD_NAMESPACE_END
Definition: defs.h:40
Definition: swkey.h:77
static const SWClass classdef(classes)