Orb/Doxygen/src/membergroup.h
changeset 0 42188c7ea2d9
child 4 468f4c8d3d5b
equal deleted inserted replaced
-1:000000000000 0:42188c7ea2d9
       
     1 /******************************************************************************
       
     2  *
       
     3  * 
       
     4  *
       
     5  * Copyright (C) 1997-2008 by Dimitri van Heesch.
       
     6  *
       
     7  * Permission to use, copy, modify, and distribute this software and its
       
     8  * documentation under the terms of the GNU General Public License is hereby 
       
     9  * granted. No representations are made about the suitability of this software 
       
    10  * for any purpose. It is provided "as is" without express or implied warranty.
       
    11  * See the GNU General Public License for more details.
       
    12  *
       
    13  * Documents produced by Doxygen are derivative works derived from the
       
    14  * input used in their production; they are not affected by this license.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef MEMBERGROUP_H
       
    19 #define MEMBERGROUP_H
       
    20 
       
    21 #include "qtbc.h"
       
    22 #include <qlist.h>
       
    23 #include <qfile.h>
       
    24 #include "sortdict.h"
       
    25 
       
    26 #define DOX_NOGROUP -1
       
    27 
       
    28 class MemberDef;
       
    29 class ClassDef;
       
    30 class NamespaceDef;
       
    31 class FileDef;
       
    32 class MemberList;
       
    33 class GroupDef;
       
    34 class OutputList;
       
    35 class Definition;
       
    36 class StorageIntf;
       
    37 struct ListItemInfo;
       
    38 
       
    39 class MemberGroup 
       
    40 {
       
    41   public:
       
    42     MemberGroup();
       
    43     MemberGroup(Definition *parent,int id,const char *header,
       
    44                 const char *docs,const char *docFile);
       
    45    ~MemberGroup();
       
    46     QCString header() const { return grpHeader; }
       
    47     int groupId() const { return grpId; }
       
    48     void insertMember(MemberDef *md);
       
    49     void setAnchors(ClassDef *);
       
    50     void writePlainDeclarations(OutputList &ol,
       
    51                ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
       
    52     void writeDeclarations(OutputList &ol,
       
    53                ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
       
    54 
       
    55     void writeDocumentation(OutputList &ol,const char *scopeName,
       
    56                Definition *container);
       
    57     void writeDocumentationPage(OutputList &ol,const char *scopeName,
       
    58                Definition *container);
       
    59     QCString documentation() { return doc; }
       
    60     bool allMembersInSameSection() { return inSameSection; }
       
    61     void addToDeclarationSection();
       
    62     int countDecMembers();
       
    63     int countDocMembers();
       
    64     void distributeMemberGroupDocumentation();
       
    65     void findSectionsInDocumentation();
       
    66     int varCount() const;
       
    67     int funcCount() const;
       
    68     int enumCount() const;
       
    69     int enumValueCount() const;
       
    70     int typedefCount() const;
       
    71     int protoCount() const;
       
    72     int defineCount() const;
       
    73     int friendCount() const;
       
    74     int numDecMembers() const;
       
    75     int numDocMembers() const;
       
    76     void setInGroup(bool b);
       
    77     void addListReferences(Definition *d);
       
    78     void setRefItems(const QList<ListItemInfo> *sli);
       
    79     MemberList *members() const { return memberList; }
       
    80     Definition *parent() const { return m_parent; }
       
    81     QCString anchor() const;
       
    82 
       
    83     void marshal(StorageIntf *s);
       
    84     void unmarshal(StorageIntf *s);
       
    85 
       
    86   private: 
       
    87     MemberList *memberList;      // list of all members in the group
       
    88     MemberList *inDeclSection;
       
    89     int grpId;
       
    90     QCString grpHeader;
       
    91     QCString fileName;           // base name of the generated file
       
    92     Definition *scope;
       
    93     QCString doc;
       
    94     bool inSameSection;
       
    95     int  m_numDecMembers;
       
    96     int  m_numDocMembers;
       
    97     Definition *m_parent;
       
    98     QCString m_docFile;
       
    99     QList<ListItemInfo> *m_xrefListItems;
       
   100 };
       
   101 
       
   102 class MemberGroupList : public QList<MemberGroup>
       
   103 {
       
   104 };
       
   105 
       
   106 class MemberGroupListIterator : public QListIterator<MemberGroup>
       
   107 {
       
   108   public:
       
   109     MemberGroupListIterator(const MemberGroupList &l) : 
       
   110       QListIterator<MemberGroup>(l) {}
       
   111 };
       
   112 
       
   113 class MemberGroupSDict : public SIntDict<MemberGroup>
       
   114 {
       
   115   public:
       
   116     MemberGroupSDict(int size=17) : SIntDict<MemberGroup>(size) {}
       
   117    ~MemberGroupSDict() {}
       
   118 };
       
   119 
       
   120 
       
   121 struct MemberGroupInfo
       
   122 {
       
   123   MemberGroupInfo() : m_sli(0) {}
       
   124  ~MemberGroupInfo() { delete m_sli; m_sli=0; }
       
   125   void setRefItems(const QList<ListItemInfo> *sli);
       
   126   QCString header;
       
   127   QCString doc;
       
   128   QCString docFile;
       
   129   QCString compoundName;
       
   130   QList<ListItemInfo> *m_sli;
       
   131 };
       
   132 
       
   133 //class MemberGroupDict : public QIntDict<MemberGroup>
       
   134 //{
       
   135 //  public:
       
   136 //    MemberGroupDict(int size) : QIntDict<MemberGroup>(size) {}
       
   137 //   ~MemberGroupDict() {}
       
   138 //};
       
   139 
       
   140 //class MemberGroupDictIterator : public QIntDictIterator<MemberGroup>
       
   141 //{
       
   142 //  public:
       
   143 //    MemberGroupDictIterator(const MemberGroupDict &d) : 
       
   144 //      QIntDictIterator<MemberGroup>(d) {}
       
   145 //   ~MemberGroupDictIterator() {}
       
   146 //};
       
   147 
       
   148 #endif