<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>strkey.cpp Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.2.15 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center> <hr><h1>strkey.cpp</h1><div class="fragment"><pre>00001 <font class="comment">/******************************************************************************</font> 00002 <font class="comment"> * StrKey.cpp - code for class 'StrKey'- a standard string key class (used</font> 00003 <font class="comment"> * for modules that index on single strings (eg. cities,</font> 00004 <font class="comment"> * names, words, etc.)</font> 00005 <font class="comment"> */</font> 00006 00007 <font class="preprocessor">#include <swmacs.h></font> 00008 <font class="preprocessor">#include <utilfuns.h></font> 00009 <font class="preprocessor">#include <strkey.h></font> 00010 <font class="preprocessor">#include <string.h></font> 00011 <font class="preprocessor">#include <stdio.h></font> 00012 00013 00014 <font class="keyword">static</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *classes[] = {<font class="stringliteral">"StrKey"</font>, <font class="stringliteral">"SWKey"</font>, <font class="stringliteral">"SWObject"</font>, 0}; 00015 <a class="code" href="class_s_w_class.html">SWClass</a> StrKey::classdef(classes); 00016 00017 <font class="comment">/******************************************************************************</font> 00018 <font class="comment"> * StrKey Constructor - initializes instance of StrKey</font> 00019 <font class="comment"> *</font> 00020 <font class="comment"> * ENT: ikey - text key (word, city, name, etc.)</font> 00021 <font class="comment"> */</font> 00022 <a name="l00023"></a><a class="code" href="class_str_key.html#a0">00023</a> <a class="code" href="class_str_key.html#a0">StrKey::StrKey</a>(<font class="keyword">const</font> <font class="keywordtype">char</font> *ikey) : <a class="code" href="class_s_w_key.html">SWKey</a>(ikey) 00024 { 00025 init(); 00026 } 00027 00028 00029 <font class="keywordtype">void</font> StrKey::init() { 00030 myclass = &classdef; 00031 } 00032 00033 00034 <font class="comment">/******************************************************************************</font> 00035 <font class="comment"> * StrKey Destructor - cleans up instance of StrKey</font> 00036 <font class="comment"> *</font> 00037 <font class="comment"> * ENT: ikey - text key</font> 00038 <font class="comment"> */</font> 00039 <a name="l00040"></a><a class="code" href="class_str_key.html#a1">00040</a> <a class="code" href="class_str_key.html#a1">StrKey::~StrKey</a>() { 00041 } </pre></div><hr><address align="right"><small>Generated on Thu Jun 20 22:13:00 2002 for The Sword Project by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.15 </small></address> </body> </html>