📄 bugdb_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>FastDB: bugdb.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.5 --><div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a></div><h1>bugdb.h</h1><div class="fragment"><pre>00001 <span class="comment">//-< BUGDB.H >------------------------------------------------------*--------*</span>00002 <span class="comment">// FastDB Version 1.0 (c) 1999 GARRET * ? *</span>00003 <span class="comment">// (Main Memory Database Management System) * /\| *</span>00004 <span class="comment">// * / \ *</span>00005 <span class="comment">// Created: 27-Mar-99 K.A. Knizhnik * / [] \ *</span>00006 <span class="comment">// Last update: 25-Jun-99 K.A. Knizhnik * GARRET *</span>00007 <span class="comment">//-------------------------------------------------------------------*--------*</span>00008 <span class="comment">// Example of database Web publishing: Bug Tracking Database</span>00009 <span class="comment">//-------------------------------------------------------------------*--------*</span>00010 00011 <span class="preprocessor">#ifndef __BUGDB_H__</span>00012 <span class="preprocessor"></span><span class="preprocessor">#define __BUGDB_H__</span>00013 <span class="preprocessor"></span>00014 <span class="preprocessor">#include "fastdb.h"</span>00015 <span class="preprocessor">#include "wwwapi.h"</span>00016 00017 <span class="keyword">class </span>Bug;00018 <span class="keyword">class </span>Software;00019 00020 <span class="keyword">class </span>Person00021 {00022 <span class="keyword">public</span>:00023 <span class="keywordtype">char</span> <span class="keyword">const</span>* sName;00024 <span class="keywordtype">char</span> <span class="keyword">const</span>* sEmailAddress;00025 <span class="keywordtype">char</span> <span class="keyword">const</span>* sPassword;00026 00027 <a class="code" href="classdbArray.html">dbArray<dbReference<Software></a> > setUsedSoftware;00028 <a class="code" href="classdbArray.html">dbArray<dbReference<Software></a> > setProjects;00029 <a class="code" href="classdbArray.html">dbArray<dbReference<Bug></a> > setReportedBugs;00030 <a class="code" href="classdbArray.html">dbArray<dbReference<Bug></a> > setAssignedBugs;00031 00032 <span class="keyword">enum</span> PersonStatus { 00033 isUser, 00034 isEngineer,00035 isAdministrator00036 };00037 int1 status;00038 int4 nReports;00039 00040 <span class="keywordtype">void</span> print(WWWconnection& con) <span class="keyword">const</span>;00041 00042 <span class="keywordtype">bool</span> checkPassword(<span class="keywordtype">char</span> <span class="keyword">const</span>* password)<span class="keyword"> const </span>{ 00043 <span class="keywordflow">return</span> strcmp(sPassword, password) == 0;00044 }00045 00046 00047 TYPE_DESCRIPTOR((KEY(sName, INDEXED),00048 FIELD(sEmailAddress),00049 FIELD(sPassword),00050 RELATION(setReportedBugs, pReportedBy),00051 RELATION(setAssignedBugs, pAssignedTo),00052 RELATION(setUsedSoftware, setUsers), 00053 RELATION(setProjects, setEngineers), 00054 FIELD(status),FIELD(nReports)));00055 };00056 00057 00058 <span class="keyword">class </span>Version 00059 {00060 <span class="keyword">public</span>:00061 <span class="keywordtype">char</span> <span class="keyword">const</span>* sLabel;00062 <span class="keywordtype">int</span> majorVersionNumber;00063 <span class="keywordtype">int</span> minorVersionNumber;00064 dbDateTime released;00065 <span class="keywordtype">char</span> <span class="keyword">const</span>* sComment;00066 <a class="code" href="classdbArray.html">dbArray<dbReference<Bug></a> > setBugs;00067 <a class="code" href="classdbReference.html">dbReference<Version></a> pNext;00068 00069 <span class="keywordtype">int</span> getVersion() <span class="keyword">const</span>; 00070 <span class="keywordtype">char</span>* getVersionString() <span class="keyword">const</span>;00071 00072 <span class="keywordtype">void</span> print(WWWconnection& con) <span class="keyword">const</span>;00073 00074 TYPE_DESCRIPTOR((FIELD(sLabel),00075 FIELD(majorVersionNumber),00076 FIELD(minorVersionNumber),00077 FIELD(released),00078 FIELD(sComment),00079 RELATION(setBugs, pVersion),00080 FIELD(pNext)));00081 };00082 00083 00084 <span class="keyword">class </span>Software00085 {00086 <span class="keyword">public</span>:00087 <span class="keywordtype">char</span> <span class="keyword">const</span>* sName;00088 <a class="code" href="classdbArray.html">dbArray<dbReference<Person></a> > setEngineers;00089 <a class="code" href="classdbArray.html">dbArray<dbReference<Person></a> > setUsers;00090 <a class="code" href="classdbReference.html">dbReference<Version></a> pVersions;00091 <a class="code" href="classdbArray.html">dbArray<dbReference<Bug></a> > setBugs;00092 00093 <span class="keywordtype">int</span> getLastVersion() <span class="keyword">const</span>;00094 <span class="keywordtype">char</span>* getLastVersionString() <span class="keyword">const</span>;00095 00096 <span class="keywordtype">void</span> print(WWWconnection& con) <span class="keyword">const</span>;00097 00098 TYPE_DESCRIPTOR((KEY(sName, INDEXED),00099 FIELD(pVersions),00100 RELATION(setEngineers, setProjects),00101 RELATION(setUsers, setUsedSoftware),00102 RELATION(setBugs, pSoftware)));00103 };00104 00105 <span class="keyword">enum</span> eCATEGORY00106 {00107 CATEGORY_NOT_SPECIFIED,00108 CRASH,00109 PROGRAM_HANGS,00110 UI_DISPLAY,00111 UI_BEHAVIOR,00112 CALCULATION,00113 ERROR_HANDLING,00114 PERFORMANCE,00115 LICENSING,00116 INSTALLATION,00117 DOCUMENTATION,00118 ENHANCEMENT,00119 HOW_TO_QUESTION00120 };00121 00122 <span class="keyword">extern</span> <span class="keywordtype">char</span> <span class="keyword">const</span>* <span class="keyword">const</span> eCATEGORY_STRING[];00123 00124 <span class="keyword">enum</span> eSTATUS00125 {00126 STATUS_NOT_SPECIFIED,00127 STATUS_OPENED,00128 STATUS_FIXED,00129 STATUS_CLOSED,00130 STATUS_PENDING_Person,00131 STATUS_PENDING_USER,00132 STATUS_POSTPONED,00133 STATUS_IRREPRODUCIBLE,00134 STATUS_WITHDRAWN,00135 STATUS_AS_DESIGNED00136 };00137 00138 <span class="keyword">extern</span> <span class="keywordtype">char</span> <span class="keyword">const</span>* <span class="keyword">const</span> eSTATUS_STRING[];00139 00140 <span class="keyword">enum</span> eFIXING_PRIORITY00141 {00142 PRIORITY_NOT_SPECIFIED,00143 FIX_IMMEDIATELY,00144 FIX_BEFORE_NEXT_BUILD_RELEASE,00145 FIX_BEFORE_NEXT_MINOR_RELEASE,00146 FIX_BEFORE_NEXT_MAJOR_RELEASE,00147 FIX_IF_POSSIBLE,00148 OPTIONAL00149 };00150 00151 <span class="keyword">extern</span> <span class="keywordtype">char</span> <span class="keyword">const</span>* <span class="keyword">const</span> eFIXING_PRIORITY_STRING[];00152 00153 <span class="keyword">enum</span> eSEVERITY00154 {00155 SEVERITY_NOT_SPECIFIED,00156 FATAL,00157 SERIOUS,00158 MINOR,00159 LAST_SEVERITY00160 };00161 00162 <span class="keyword">extern</span> <span class="keywordtype">char</span> <span class="keyword">const</span>* <span class="keyword">const</span> eSEVERITY_STRING[]; 00163 00164 00165 <span class="keyword">class </span>Report00166 {00167 <span class="keyword">public</span>:00168 <span class="keywordtype">char</span> <span class="keyword">const</span>* sDescription;00169 <a class="code" href="classdbReference.html">dbReference<Person></a> pAuthor;00170 <a class="code" href="classdbReference.html">dbReference<Report></a> pNext;00171 dbDateTime creationDate;00172 int1 status;00173 int4 index;00174 00175 <span class="keywordtype">void</span> print(WWWconnection& con) <span class="keyword">const</span>;00176 00177 TYPE_DESCRIPTOR((FIELD(sDescription),FIELD(pAuthor),FIELD(pNext),FIELD(creationDate),00178 FIELD(status),FIELD(index)));00179 };00180 00181 00182 <span class="keyword">class </span>Bug 00183 {00184 <span class="keyword">public</span>:00185 <span class="keywordtype">char</span> <span class="keyword">const</span>* sOneLineSummary;00186 <span class="keywordtype">char</span> <span class="keyword">const</span>* sHardwarePlatform;00187 <span class="keywordtype">char</span> <span class="keyword">const</span>* sOperatingSystem;00188 00189 int4 bugId;00190 int4 nReports;00191 int1 eCategory;00192 int1 eFixingPriority;00193 int1 eSeverity;00194 00195 <a class="code" href="classdbReference.html">dbReference<Person></a> pReportedBy;00196 <a class="code" href="classdbReference.html">dbReference<Person></a> pAssignedTo;00197 00198 <a class="code" href="classdbReference.html">dbReference<Software></a> pSoftware;00199 <a class="code" href="classdbReference.html">dbReference<Version></a> pVersion;00200 00201 <a class="code" href="classdbReference.html">dbReference<Report></a> pReportHistory;00202 <a class="code" href="classdbReference.html">dbReference<Report></a> pWorkArounds;00203 <a class="code" href="classdbArray.html">dbArray<dbReference<Bug></a> > setSimilarBugs;00204 00205 <span class="keywordtype">void</span> print(WWWconnection& con) <span class="keyword">const</span>;00206 00207 TYPE_DESCRIPTOR((KEY(bugId, HASHED),00208 FIELD(sOneLineSummary),00209 FIELD(sOperatingSystem), 00210 FIELD(sHardwarePlatform),00211 RELATION(pSoftware, setBugs),00212 RELATION(pVersion, setBugs), 00213 RELATION(pReportedBy, setReportedBugs),00214 RELATION(pAssignedTo, setAssignedBugs),00215 RELATION(setSimilarBugs, setSimilarBugs),00216 FIELD(nReports),00217 FIELD(eCategory),00218 FIELD(eFixingPriority),00219 FIELD(eSeverity),00220 FIELD(pReportHistory), 00221 FIELD(pWorkArounds)));00222 };00223 00224 00225 <span class="keyword">class </span>BugSequencer {00226 <span class="keyword">public</span>:00227 <span class="keywordtype">int</span> nBugs;00228 00229 TYPE_DESCRIPTOR((FIELD(nBugs)));00230 };00231 00232 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Feb 12 13:04:48 2004 for FastDB by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 > </a>1.3.5 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -