define.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * $Id: define.h,v 1.21 2001/03/19 19:27:40 root Exp $
00004  *
00005  * Copyright (C) 1997-2008 by Dimitri van Heesch.
00006  *
00007  * Permission to use, copy, modify, and distribute this software and its
00008  * documentation under the terms of the GNU General Public License is hereby 
00009  * granted. No representations are made about the suitability of this software 
00010  * for any purpose. It is provided "as is" without express or implied warranty.
00011  * See the GNU General Public License for more details.
00012  *
00013  * Documents produced by Doxygen are derivative works derived from the
00014  * input used in their production; they are not affected by this license.
00015  *
00016  */
00017 
00018 #ifndef DEFINE_H
00019 #define DEFINE_H
00020 
00021 #include "qtbc.h"
00022 #include <qdict.h>
00023 #include <qlist.h>
00024 
00025 class FileDef;
00026 
00027 class Define
00028 {
00029   public:
00030     Define();
00031     Define(const Define &d);
00032    ~Define();
00033     bool hasDocumentation();
00034     QCString name;
00035     QCString definition;
00036     QCString fileName;
00037     QCString doc;
00038     QCString brief;
00039     QCString args;
00040     QCString anchor;
00041     FileDef *fileDef;
00042     int lineNr;
00043     int nargs;
00044     bool undef;
00045     bool varArgs;
00046     bool isPredefined;
00047     bool nonRecursive;
00048 };
00049 
00050 class DefineList : public QList<Define>
00051 {
00052   public:
00053     DefineList() : QList<Define>() {}
00054    ~DefineList() {}
00055     int compareItems(GCI i1,GCI i2) 
00056     {
00057       return stricmp(((Define *)i1)->name,((Define *)i2)->name); 
00058     }
00059 };
00060 
00061 class DefineName : public QList<Define>
00062 {
00063   public:
00064     DefineName(const char *n) : QList<Define>() { name=n; }
00065    ~DefineName() {}
00066     const char *nameString() const { return name; }
00067     int compareItems(GCI i1,GCI i2) 
00068     {
00069       return stricmp(((Define *)i1)->name,((Define *)i2)->name); 
00070     }
00071     
00072   private:
00073     QCString name;
00074 };
00075 
00076 class DefineNameList : public QList<DefineName>
00077 {
00078   public:
00079     DefineNameList() : QList<DefineName>() {}
00080    ~DefineNameList() {}
00081     int compareItems(GCI i1,GCI i2)
00082     {
00083       return stricmp(((DefineName *)i1)->nameString(),
00084                     ((DefineName *)i2)->nameString());
00085     }
00086 };
00087 
00088 typedef QDict<Define> DefineDict;
00089 typedef QDict<DefineName> DefineNameDict;
00090 
00091 #endif



Generated on Mon Mar 31 10:58:34 2008 by  doxygen 1.5.1