Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
MemberList Class Reference

#include <memberlist.h>

Inheritance diagram for MemberList:
QList< MemberDef > QGList

Public Member Functions

 MemberList ()
 
 MemberList (MemberListType lt)
 
 ~MemberList ()
 
MemberListType listType () const
 
bool insert (uint index, const MemberDef *md)
 
void inSort (const MemberDef *md)
 
void append (const MemberDef *md)
 
int varCount () const
 
int funcCount () const
 
int enumCount () const
 
int enumValueCount () const
 
int typedefCount () const
 
int protoCount () const
 
int defineCount () const
 
int friendCount () const
 
int numDecMembers () const
 
int numDocMembers () const
 
bool needsSorting () const
 
void countDecMembers (bool countEnumValues=FALSE, GroupDef *gd=0)
 
void countDocMembers (bool countEnumValues=FALSE)
 
int countInheritableMembers (ClassDef *inheritedFrom) const
 
void writePlainDeclarations (OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, ClassDef *inheritedFrom, const char *inheritId)
 
void writeDeclarations (OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, const char *title, const char *subtitle, bool showEnumValues=FALSE, bool showInline=FALSE, ClassDef *inheritedFrom=0, MemberListType lt=MemberListType_pubMethods)
 
void writeDocumentation (OutputList &ol, const char *scopeName, Definition *container, const char *title, bool showEnumValues=FALSE, bool showInline=FALSE)
 
void writeSimpleDocumentation (OutputList &ol, Definition *container)
 
void writeDocumentationPage (OutputList &ol, const char *scopeName, Definition *container)
 
void writeTagFile (FTextStream &)
 
bool declVisible () const
 
void addMemberGroup (MemberGroup *mg)
 
void setInGroup (bool inGroup)
 
void setInFile (bool inFile)
 
void addListReferences (Definition *def)
 
void findSectionsInDocumentation ()
 
void setNeedsSorting (bool b)
 
MemberGroupListgetMemberGroupList () const
 
void marshal (StorageIntf *s)
 
void unmarshal (StorageIntf *s)
 
- Public Member Functions inherited from QList< MemberDef >
 QList ()
 
 QList (const QList< MemberDef > &l)
 
 ~QList ()
 
QList< MemberDef > & operator= (const QList< MemberDef > &l)
 
bool operator== (const QList< MemberDef > &list) const
 
uint count () const
 
bool isEmpty () const
 
bool insert (uint i, const MemberDef *d)
 
void inSort (const MemberDef *d)
 
void prepend (const MemberDef *d)
 
void append (const MemberDef *d)
 
bool remove (uint i)
 
bool remove (const MemberDef *d)
 
bool removeRef (const MemberDef *d)
 
bool removeFirst ()
 
bool removeLast ()
 
MemberDeftake (uint i)
 
void clear ()
 
void sort ()
 
int find (const MemberDef *d) const
 
int findRef (const MemberDef *d) const
 
uint contains (const MemberDef *d) const
 
uint containsRef (const MemberDef *d) const
 
MemberDefat (uint i) const
 
MemberDefgetFirst () const
 
MemberDefgetLast () const
 
void setAutoDelete (bool enable)
 

Static Public Member Functions

static QCString listTypeAsString (MemberListType type)
 

Private Member Functions

int compareValues (const MemberDef *item1, const MemberDef *item2) const
 

Private Attributes

int m_varCnt
 
int m_funcCnt
 
int m_enumCnt
 
int m_enumValCnt
 
int m_typeCnt
 
int m_protoCnt
 
int m_defCnt
 
int m_friendCnt
 
int m_numDecMembers
 
int m_numDocMembers
 
MemberGroupListmemberGroupList
 
bool m_inGroup
 
bool m_inFile
 
MemberListType m_listType
 
bool m_needsSorting
 

Detailed Description

A list of MemberDef objects.

Definition at line 32 of file memberlist.h.

Constructor & Destructor Documentation

MemberList::MemberList ( )

Definition at line 36 of file memberlist.cpp.

37 {
39  m_varCnt=0;
40  m_funcCnt=0;
41  m_enumCnt=0;
42  m_enumValCnt=0;
43  m_typeCnt=0;
44  m_protoCnt=0;
45  m_defCnt=0;
46  m_friendCnt=0;
47  m_numDecMembers=-1; // special value indicating that value needs to be computed
48  m_numDocMembers=-1; // special value indicating that value needs to be computed
52 }
int m_numDocMembers
Definition: memberlist.h:94
bool m_inGroup
Definition: memberlist.h:96
bool m_needsSorting
Definition: memberlist.h:99
bool m_inFile
Definition: memberlist.h:97
int m_typeCnt
Definition: memberlist.h:89
int m_funcCnt
Definition: memberlist.h:86
const bool FALSE
Definition: qglobal.h:370
int m_numDecMembers
Definition: memberlist.h:93
int m_friendCnt
Definition: memberlist.h:92
MemberGroupList * memberGroupList
Definition: memberlist.h:95
int m_defCnt
Definition: memberlist.h:91
int m_enumCnt
Definition: memberlist.h:87
int m_enumValCnt
Definition: memberlist.h:88
MemberListType m_listType
Definition: memberlist.h:98
int m_varCnt
Definition: memberlist.h:85
int m_protoCnt
Definition: memberlist.h:90
MemberList::MemberList ( MemberListType  lt)

Definition at line 54 of file memberlist.cpp.

54  : m_listType(lt)
55 {
57  m_varCnt=0;
58  m_funcCnt=0;
59  m_enumCnt=0;
60  m_enumValCnt=0;
61  m_typeCnt=0;
62  m_protoCnt=0;
63  m_defCnt=0;
64  m_friendCnt=0;
65  m_numDecMembers=-1; // special value indicating that value needs to be computed
66  m_numDocMembers=-1; // special value indicating that value needs to be computed
70 }
int m_numDocMembers
Definition: memberlist.h:94
bool m_inGroup
Definition: memberlist.h:96
bool m_needsSorting
Definition: memberlist.h:99
bool m_inFile
Definition: memberlist.h:97
int m_typeCnt
Definition: memberlist.h:89
int m_funcCnt
Definition: memberlist.h:86
const bool FALSE
Definition: qglobal.h:370
int m_numDecMembers
Definition: memberlist.h:93
int m_friendCnt
Definition: memberlist.h:92
MemberGroupList * memberGroupList
Definition: memberlist.h:95
int m_defCnt
Definition: memberlist.h:91
int m_enumCnt
Definition: memberlist.h:87
int m_enumValCnt
Definition: memberlist.h:88
MemberListType m_listType
Definition: memberlist.h:98
int m_varCnt
Definition: memberlist.h:85
int m_protoCnt
Definition: memberlist.h:90
MemberList::~MemberList ( )

Definition at line 72 of file memberlist.cpp.

73 {
74  delete memberGroupList;
75 }
MemberGroupList * memberGroupList
Definition: memberlist.h:95

Member Function Documentation

void MemberList::addListReferences ( Definition def)

Definition at line 784 of file memberlist.cpp.

785 {
786  MemberListIterator mli(*this);
787  MemberDef *md;
788  for ( ; (md=mli.current()) ; ++mli)
789  {
790  if (md->getGroupDef()==0 || def->definitionType()==Definition::TypeGroup)
791  {
792  md->addListReference(def);
793  MemberList *enumFields = md->enumFieldList();
794  if (md->memberType()==MemberType_Enumeration && enumFields)
795  {
796  //printf(" Adding enum values!\n");
797  MemberListIterator vmli(*enumFields);
798  MemberDef *vmd;
799  for ( ; (vmd=vmli.current()) ; ++vmli)
800  {
801  //printf(" adding %s\n",vmd->name().data());
802  vmd->addListReference(def);
803  }
804  }
805  }
806  }
807  if (memberGroupList)
808  {
810  MemberGroup *mg;
811  for (;(mg=mgli.current());++mgli)
812  {
813  mg->addListReferences(def);
814  }
815  }
816 }
MemberList * enumFieldList() const
Definition: memberdef.cpp:4497
void addListReference(Definition *d)
Definition: memberdef.cpp:3481
static constexpr double mg
Definition: Units.h:145
virtual DefType definitionType() const =0
MemberGroupList * memberGroupList
Definition: memberlist.h:95
MemberType memberType() const
Definition: memberdef.cpp:4125
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
void addListReferences(Definition *d)
void MemberList::addMemberGroup ( MemberGroup mg)

Definition at line 774 of file memberlist.cpp.

775 {
776  if (memberGroupList==0)
777  {
779  }
780  //printf("addMemberGroup: this=%p mg=%p\n",this,mg);
781  memberGroupList->append(mg);
782 }
void append(const type *d)
Definition: qlist.h:73
MemberGroupList * memberGroupList
Definition: memberlist.h:95
void MemberList::append ( const MemberDef md)

Definition at line 246 of file memberlist.cpp.

247 {
249 }
void append(const type *d)
Definition: qlist.h:73
int MemberList::compareValues ( const MemberDef item1,
const MemberDef item2 
) const
privatevirtual

Reimplemented from QList< MemberDef >.

Definition at line 77 of file memberlist.cpp.

78 {
79  static bool sortConstructorsFirst = Config_getBool("SORT_MEMBERS_CTORS_1ST");
80  if (sortConstructorsFirst) {
81  int ord1 = c1->isConstructor() ? 2 : (c1->isDestructor() ? 1 : 0);
82  int ord2 = c2->isConstructor() ? 2 : (c2->isDestructor() ? 1 : 0);
83  if (ord1 > ord2)
84  return -1;
85  else if (ord2 > ord1)
86  return 1;
87  }
88  int cmp = qstricmp(c1->name(),c2->name());
89  return cmp!=0 ? cmp : c1->getDefLine()-c2->getDefLine();
90 }
int qstricmp(const char *str1, const char *str2)
Definition: qcstring.cpp:567
#define Config_getBool(val)
Definition: config.cpp:664
void MemberList::countDecMembers ( bool  countEnumValues = FALSE,
GroupDef gd = 0 
)

Count the number of members in this list that are visible in the declaration part of a compound's documentation page.

Definition at line 136 of file memberlist.cpp.

137 {
138  if (m_numDecMembers!=-1) return;
139 
140  //printf("----- countDecMembers count=%d ----\n",count());
143  m_numDecMembers=0;
144  QListIterator<MemberDef> mli(*this);
145  MemberDef *md;
146  for (mli.toFirst();(md=mli.current());++mli)
147  {
148  //printf("MemberList::countDecMembers(md=%s,%d)\n",md->name().data(),md->isBriefSectionVisible());
149  if (md->isBriefSectionVisible())
150  {
151  switch(md->memberType())
152  {
153  case MemberType_Variable: // fall through
154  case MemberType_Event: // fall through
156  break;
157 // apparently necessary to get this to show up in declarations section?
158  case MemberType_Interface: // fall through
159  case MemberType_Service: // fall through
160  case MemberType_Function: // fall through
161  case MemberType_Signal: // fall through
162  case MemberType_DCOP: // fall through
163  case MemberType_Slot: if (!md->isRelated() || md->getClassDef())
164  m_funcCnt++,m_numDecMembers++;
165  break;
166  case MemberType_Enumeration: m_enumCnt++,m_numDecMembers++; break;
167  case MemberType_EnumValue: if (countEnumValues)
168  m_enumValCnt++,m_numDecMembers++;
169  break;
170  case MemberType_Typedef: m_typeCnt++,m_numDecMembers++; break;
171  //case MemberType_Prototype: m_protoCnt++,m_numDecMembers++; break;
172  case MemberType_Define: if (Config_getBool("EXTRACT_ALL") ||
173  md->argsString() ||
174  !md->initializer().isEmpty() ||
175  md->hasDocumentation()
176  ) m_defCnt++,m_numDecMembers++;
177  break;
178  case MemberType_Friend: m_friendCnt++,m_numDecMembers++;
179  break;
180  default:
181  err("Unknown member type found for member `%s'\n!",md->name().data());
182  }
183  }
184  }
185  if (memberGroupList)
186  {
188  MemberGroup *mg;
189  for (;(mg=mgli.current());++mgli)
190  {
191  mg->countDecMembers(gd);
192  m_varCnt+=mg->varCount();
193  m_funcCnt+=mg->funcCount();
194  m_enumCnt+=mg->enumCount();
196  m_typeCnt+=mg->typedefCount();
197  m_protoCnt+=mg->protoCount();
198  m_defCnt+=mg->defineCount();
199  m_friendCnt+=mg->friendCount();
200  m_numDecMembers+=mg->numDecMembers();
201  }
202  }
203  //printf("----- end countDecMembers ----\n");
204 
205  //printf("MemberList::countDecMembers()=%d\n",m_numDecMembers);
206 }
int typedefCount() const
bool isEmpty() const
Definition: qcstring.h:189
bool hasDocumentation() const
Definition: memberdef.cpp:3274
int countDecMembers(GroupDef *gd=0)
int enumValueCount() const
int m_typeCnt
Definition: memberlist.h:89
int m_funcCnt
Definition: memberlist.h:86
int m_numDecMembers
Definition: memberlist.h:93
int enumCount() const
static constexpr double mg
Definition: Units.h:145
int defineCount() const
int numDecMembers() const
bool isBriefSectionVisible() const
Definition: memberdef.cpp:1289
int m_friendCnt
Definition: memberlist.h:92
const QCString & name() const
Definition: definition.h:114
MemberGroupList * memberGroupList
Definition: memberlist.h:95
int m_defCnt
Definition: memberlist.h:91
int protoCount() const
const char * data() const
Definition: qcstring.h:207
int funcCount() const
#define Config_getBool(val)
Definition: config.cpp:664
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
void err(const char *fmt,...)
Definition: message.cpp:226
MemberType memberType() const
Definition: memberdef.cpp:4125
int m_enumCnt
Definition: memberlist.h:87
const QCString & initializer() const
Definition: memberdef.cpp:4055
bool isRelated() const
Definition: memberdef.cpp:4195
const char * argsString() const
Definition: memberdef.cpp:4040
int m_enumValCnt
Definition: memberlist.h:88
int varCount() const
int m_varCnt
Definition: memberlist.h:85
int friendCount() const
int m_protoCnt
Definition: memberlist.h:90
void MemberList::countDocMembers ( bool  countEnumValues = FALSE)

Definition at line 208 of file memberlist.cpp.

209 {
210  if (m_numDocMembers!=-1) return; // used cached value
211  m_numDocMembers=0;
212  QListIterator<MemberDef> mli(*this);
213  MemberDef *md;
214  for (mli.toFirst();(md=mli.current());++mli)
215  {
217  {
218  // do not count enum values, since they do not produce entries of their own
219  if (countEnumValues || md->memberType()!=MemberType_EnumValue)
220  m_numDocMembers++;
221  }
222  }
223  if (memberGroupList)
224  {
226  MemberGroup *mg;
227  for (;(mg=mgli.current());++mgli)
228  {
229  mg->countDocMembers();
231  }
232  }
233  //printf("MemberList::countDocMembers()=%d memberGroupList=%p\n",m_numDocMembers,memberGroupList);
234 }
int m_numDocMembers
Definition: memberlist.h:94
bool m_inGroup
Definition: memberlist.h:96
bool isDetailedSectionVisible(bool inGroup, bool inFile) const
Definition: memberdef.cpp:1920
bool m_inFile
Definition: memberlist.h:97
int countDocMembers()
int numDocMembers() const
static constexpr double mg
Definition: Units.h:145
MemberGroupList * memberGroupList
Definition: memberlist.h:95
MemberType memberType() const
Definition: memberdef.cpp:4125
int MemberList::countInheritableMembers ( ClassDef inheritedFrom) const

Definition at line 92 of file memberlist.cpp.

93 {
94  int count=0;
95  QListIterator<MemberDef> mli(*this);
96  MemberDef *md;
97  for (mli.toFirst();(md=mli.current());++mli)
98  {
99  if (md->isBriefSectionVisible())
100  {
101  if (md->memberType()!=MemberType_Friend &&
103  {
104  //printf("member %s: isReimplementedBy(%s)=%d\n",md->name().data(),
105  // inheritedFrom->name().data(),
106  // md->isReimplementedBy(inheritedFrom));
107  if (md->memberType()==MemberType_Function)
108  {
109  if (!md->isReimplementedBy(inheritedFrom)) count++;
110  }
111  else
112  {
113  count++;
114  }
115  }
116  }
117  }
118  if (memberGroupList)
119  {
121  MemberGroup *mg;
122  for (;(mg=mgli.current());++mgli)
123  {
124  count+=mg->countInheritableMembers(inheritedFrom);
125  }
126  }
127  //printf("%s::countInheritableMembers(%s)=%d\n",
128  // listTypeAsString().data(),
129  // inheritedFrom->name().data(),count);
130  return count;
131 }
static constexpr double mg
Definition: Units.h:145
bool isBriefSectionVisible() const
Definition: memberdef.cpp:1289
uint count() const
Definition: qlist.h:66
MemberGroupList * memberGroupList
Definition: memberlist.h:95
MemberType memberType() const
Definition: memberdef.cpp:4125
int countInheritableMembers(ClassDef *inheritedFrom) const
bool isReimplementedBy(ClassDef *cd) const
Definition: memberdef.cpp:888
bool MemberList::declVisible ( ) const

Definition at line 256 of file memberlist.cpp.

257 {
258  MemberListIterator mli(*this);
259  MemberDef *md;
260  for ( ; (md=mli.current()); ++mli )
261  {
262  if (md->isBriefSectionVisible())
263  {
264  switch (md->memberType())
265  {
266  case MemberType_Define: // fall through
267  case MemberType_Typedef: // fall through
268  case MemberType_Variable: // fall through
269  case MemberType_Function: // fall through
270  case MemberType_Signal: // fall through
271  case MemberType_Slot: // fall through
272  case MemberType_DCOP: // fall through
273  case MemberType_Property: // fall through
274  case MemberType_Interface: // fall through
275  case MemberType_Service: // fall through
276  case MemberType_Event:
277  return TRUE;
279  {
280  int enumVars=0;
281  MemberListIterator vmli(*this);
282  MemberDef *vmd;
283  QCString name(md->name());
284  int i=name.findRev("::");
285  if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
286  if (name[0]=='@') // anonymous enum => append variables
287  {
288  for ( ; (vmd=vmli.current()) ; ++vmli)
289  {
290  QCString vtype=vmd->typeString();
291  if ((vtype.find(name))!=-1)
292  {
293  enumVars++;
294  }
295  }
296  }
297  // if this is an anonymous enum and there are variables of this
298  // enum type (i.e. enumVars>0), then we do not show the enum here.
299  if (enumVars==0) // show enum here
300  {
301  return TRUE;
302  }
303  }
304  break;
305  case MemberType_Friend:
306  return TRUE;
307  case MemberType_EnumValue:
308  {
309  if (m_inGroup)
310  {
311  return TRUE;
312  }
313  }
314  break;
315  }
316  }
317  }
318  return FALSE;
319 }
static QCString name
Definition: declinfo.cpp:673
bool m_inGroup
Definition: memberlist.h:96
uint length() const
Definition: qcstring.h:195
const bool FALSE
Definition: qglobal.h:370
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
bool isBriefSectionVisible() const
Definition: memberdef.cpp:1289
const char * typeString() const
Definition: memberdef.cpp:4035
const QCString & name() const
Definition: definition.h:114
QCString right(uint len) const
Definition: qcstring.cpp:231
MemberType memberType() const
Definition: memberdef.cpp:4125
const bool TRUE
Definition: qglobal.h:371
int MemberList::defineCount ( ) const
inline

Definition at line 49 of file memberlist.h.

49 { ASSERT(m_numDecMembers!=-1); return m_defCnt; }
int m_numDecMembers
Definition: memberlist.h:93
int m_defCnt
Definition: memberlist.h:91
#define ASSERT(x)
Definition: qglobal.h:590
int MemberList::enumCount ( ) const
inline

Definition at line 45 of file memberlist.h.

45 { ASSERT(m_numDecMembers!=-1); return m_enumCnt; }
int m_numDecMembers
Definition: memberlist.h:93
int m_enumCnt
Definition: memberlist.h:87
#define ASSERT(x)
Definition: qglobal.h:590
int MemberList::enumValueCount ( ) const
inline

Definition at line 46 of file memberlist.h.

46 { ASSERT(m_numDecMembers!=-1); return m_enumValCnt; }
int m_numDecMembers
Definition: memberlist.h:93
int m_enumValCnt
Definition: memberlist.h:88
#define ASSERT(x)
Definition: qglobal.h:590
void MemberList::findSectionsInDocumentation ( )

Definition at line 818 of file memberlist.cpp.

819 {
820  MemberListIterator mli(*this);
821  MemberDef *md;
822  for ( ; (md=mli.current()) ; ++mli)
823  {
825  }
826  if (memberGroupList)
827  {
829  MemberGroup *mg;
830  for (;(mg=mgli.current());++mgli)
831  {
833  }
834  }
835 }
void findSectionsInDocumentation()
Definition: memberdef.cpp:3918
static constexpr double mg
Definition: Units.h:145
MemberGroupList * memberGroupList
Definition: memberlist.h:95
void findSectionsInDocumentation()
int MemberList::friendCount ( ) const
inline

Definition at line 50 of file memberlist.h.

50 { ASSERT(m_numDecMembers!=-1); return m_friendCnt; }
int m_numDecMembers
Definition: memberlist.h:93
int m_friendCnt
Definition: memberlist.h:92
#define ASSERT(x)
Definition: qglobal.h:590
int MemberList::funcCount ( ) const
inline

Definition at line 44 of file memberlist.h.

44 { ASSERT(m_numDecMembers!=-1); return m_funcCnt; }
int m_funcCnt
Definition: memberlist.h:86
int m_numDecMembers
Definition: memberlist.h:93
#define ASSERT(x)
Definition: qglobal.h:590
MemberGroupList* MemberList::getMemberGroupList ( ) const
inline

Definition at line 78 of file memberlist.h.

78 { return memberGroupList; }
MemberGroupList * memberGroupList
Definition: memberlist.h:95
bool MemberList::insert ( uint  index,
const MemberDef md 
)

Definition at line 236 of file memberlist.cpp.

237 {
238  return QList<MemberDef>::insert(index,md);
239 }
bool insert(uint i, const type *d)
Definition: qlist.h:70
void MemberList::inSort ( const MemberDef md)

Definition at line 241 of file memberlist.cpp.

242 {
244 }
void inSort(const type *d)
Definition: qlist.h:71
MemberListType MemberList::listType ( ) const
inline

Definition at line 38 of file memberlist.h.

38 { return m_listType; }
MemberListType m_listType
Definition: memberlist.h:98
QCString MemberList::listTypeAsString ( MemberListType  type)
static

Definition at line 907 of file memberlist.cpp.

908 {
909  switch(type)
910  {
911  case MemberListType_pubMethods: return "pub-methods";
912  case MemberListType_proMethods: return "pro-methods";
913  case MemberListType_pacMethods: return "pac-methods";
914  case MemberListType_priMethods: return "pri-methods";
915  case MemberListType_pubStaticMethods: return "pub-static-methods";
916  case MemberListType_proStaticMethods: return "pro-static-methods";
917  case MemberListType_pacStaticMethods: return "pac-static-methods";
918  case MemberListType_priStaticMethods: return "pri-static-methods";
919  case MemberListType_pubSlots: return "pub-slots";
920  case MemberListType_proSlots: return "pro-slots";
921  case MemberListType_priSlots: return "pri-slots";
922  case MemberListType_pubAttribs: return "pub-attribs";
923  case MemberListType_proAttribs: return "pro-attribs";
924  case MemberListType_pacAttribs: return "pac-attribs";
925  case MemberListType_priAttribs: return "pri-attribs";
926  case MemberListType_pubStaticAttribs: return "pub-static-attribs";
927  case MemberListType_proStaticAttribs: return "pro-static-attribs";
928  case MemberListType_pacStaticAttribs: return "pac-static-attribs";
929  case MemberListType_priStaticAttribs: return "pri-static-attribs";
930  case MemberListType_pubTypes: return "pub-types";
931  case MemberListType_proTypes: return "pro-types";
932  case MemberListType_pacTypes: return "pac-types";
933  case MemberListType_priTypes: return "pri-types";
934  case MemberListType_related: return "related";
935  case MemberListType_signals: return "signals";
936  case MemberListType_friends: return "friends";
937  case MemberListType_dcopMethods: return "dcop-methods";
938  case MemberListType_properties: return "properties";
939  case MemberListType_events: return "events";
940  case MemberListType_interfaces: return "interfaces";
941  case MemberListType_services: return "services";
942  case MemberListType_decDefineMembers: return "define-members";
943  case MemberListType_decProtoMembers: return "proto-members";
944  case MemberListType_decTypedefMembers: return "typedef-members";
945  case MemberListType_decEnumMembers: return "enum-members";
946  case MemberListType_decFuncMembers: return "func-members";
947  case MemberListType_decVarMembers: return "var-members";
948  case MemberListType_decEnumValMembers: return "enumval-members";
949  case MemberListType_decPubSlotMembers: return "pub-slot-members";
950  case MemberListType_decProSlotMembers: return "pro-slot-members";
951  case MemberListType_decPriSlotMembers: return "pri-slot-members";
952  case MemberListType_decSignalMembers: return "signal-members";
953  case MemberListType_decEventMembers: return "event-members";
954  case MemberListType_decFriendMembers: return "friend-members";
955  case MemberListType_decPropMembers: return "prop-members";
956  case MemberListType_enumFields: return "enum-fields";
957  case MemberListType_memberGroup: return "member-group";
958  default: break;
959  }
960  return "";
961 }
void MemberList::marshal ( StorageIntf s)

Definition at line 837 of file memberlist.cpp.

838 {
839  marshalInt(s,(int)m_listType);
840  marshalInt(s,m_varCnt);
846  marshalInt(s,m_defCnt);
853  if (memberGroupList==0)
854  {
855  marshalUInt(s,NULL_LIST); // null pointer representation
856  }
857  else
858  {
861  MemberGroup *mg=0;
862  for (mgi.toFirst();(mg=mgi.current());++mgi)
863  {
864  mg->marshal(s);
865  }
866  }
867 }
int m_numDocMembers
Definition: memberlist.h:94
bool m_inGroup
Definition: memberlist.h:96
bool m_needsSorting
Definition: memberlist.h:99
bool m_inFile
Definition: memberlist.h:97
#define NULL_LIST
Definition: marshal.h:41
int m_typeCnt
Definition: memberlist.h:89
int m_funcCnt
Definition: memberlist.h:86
int m_numDecMembers
Definition: memberlist.h:93
void marshalInt(StorageIntf *s, int v)
Definition: marshal.cpp:16
static constexpr double mg
Definition: Units.h:145
void marshalBool(StorageIntf *s, bool b)
Definition: marshal.cpp:42
int m_friendCnt
Definition: memberlist.h:92
uint count() const
Definition: qlist.h:66
MemberGroupList * memberGroupList
Definition: memberlist.h:95
int m_defCnt
Definition: memberlist.h:91
int m_enumCnt
Definition: memberlist.h:87
void marshalUInt(StorageIntf *s, uint v)
Definition: marshal.cpp:26
void marshal(StorageIntf *s)
int m_enumValCnt
Definition: memberlist.h:88
MemberListType m_listType
Definition: memberlist.h:98
int m_varCnt
Definition: memberlist.h:85
int m_protoCnt
Definition: memberlist.h:90
bool MemberList::needsSorting ( ) const
inline

Definition at line 53 of file memberlist.h.

53 { return m_needsSorting; }
bool m_needsSorting
Definition: memberlist.h:99
int MemberList::numDecMembers ( ) const
inline

Definition at line 51 of file memberlist.h.

51 { ASSERT(m_numDecMembers!=-1); return m_numDecMembers; }
int m_numDecMembers
Definition: memberlist.h:93
#define ASSERT(x)
Definition: qglobal.h:590
int MemberList::numDocMembers ( ) const
inline

Definition at line 52 of file memberlist.h.

52 { ASSERT(m_numDocMembers!=-1); return m_numDocMembers; }
int m_numDocMembers
Definition: memberlist.h:94
#define ASSERT(x)
Definition: qglobal.h:590
int MemberList::protoCount ( ) const
inline

Definition at line 48 of file memberlist.h.

48 { ASSERT(m_numDecMembers!=-1); return m_protoCnt; }
int m_numDecMembers
Definition: memberlist.h:93
#define ASSERT(x)
Definition: qglobal.h:590
int m_protoCnt
Definition: memberlist.h:90
void MemberList::setInFile ( bool  inFile)
inline

Definition at line 74 of file memberlist.h.

74 { m_inFile=inFile; }
bool m_inFile
Definition: memberlist.h:97
TFile * inFile
Definition: makeDST.cxx:36
void MemberList::setInGroup ( bool  inGroup)
inline

Definition at line 73 of file memberlist.h.

73 { m_inGroup=inGroup; }
bool m_inGroup
Definition: memberlist.h:96
void MemberList::setNeedsSorting ( bool  b)

Definition at line 902 of file memberlist.cpp.

903 {
904  m_needsSorting = b;
905 }
bool m_needsSorting
Definition: memberlist.h:99
static bool * b
Definition: config.cpp:1043
int MemberList::typedefCount ( ) const
inline

Definition at line 47 of file memberlist.h.

47 { ASSERT(m_numDecMembers!=-1); return m_typeCnt; }
int m_typeCnt
Definition: memberlist.h:89
int m_numDecMembers
Definition: memberlist.h:93
#define ASSERT(x)
Definition: qglobal.h:590
void MemberList::unmarshal ( StorageIntf s)

Definition at line 869 of file memberlist.cpp.

870 {
872  m_varCnt = unmarshalInt(s);
873  m_funcCnt = unmarshalInt(s);
874  m_enumCnt = unmarshalInt(s);
876  m_typeCnt = unmarshalInt(s);
878  m_defCnt = unmarshalInt(s);
883  m_inFile = unmarshalBool(s);
885  uint i,count = unmarshalUInt(s);
886  if (count==NULL_LIST) // empty list
887  {
888  memberGroupList = 0;
889  }
890  else // add member groups
891  {
893  for (i=0;i<count;i++)
894  {
895  MemberGroup *mg = new MemberGroup;
896  mg->unmarshal(s);
897  memberGroupList->append(mg);
898  }
899  }
900 }
int m_numDocMembers
Definition: memberlist.h:94
bool m_inGroup
Definition: memberlist.h:96
bool m_needsSorting
Definition: memberlist.h:99
bool m_inFile
Definition: memberlist.h:97
#define NULL_LIST
Definition: marshal.h:41
void append(const type *d)
Definition: qlist.h:73
int m_typeCnt
Definition: memberlist.h:89
int m_funcCnt
Definition: memberlist.h:86
int m_numDecMembers
Definition: memberlist.h:93
int unmarshalInt(StorageIntf *s)
Definition: marshal.cpp:418
static constexpr double mg
Definition: Units.h:145
int m_friendCnt
Definition: memberlist.h:92
uint count() const
Definition: qlist.h:66
bool unmarshalBool(StorageIntf *s)
Definition: marshal.cpp:443
MemberGroupList * memberGroupList
Definition: memberlist.h:95
int m_defCnt
Definition: memberlist.h:91
uint unmarshalUInt(StorageIntf *s)
Definition: marshal.cpp:427
int m_enumCnt
Definition: memberlist.h:87
MemberListType
Definition: types.h:104
unsigned uint
Definition: qglobal.h:351
int m_enumValCnt
Definition: memberlist.h:88
MemberListType m_listType
Definition: memberlist.h:98
void unmarshal(StorageIntf *s)
int m_varCnt
Definition: memberlist.h:85
int m_protoCnt
Definition: memberlist.h:90
int MemberList::varCount ( ) const
inline

Definition at line 43 of file memberlist.h.

43 { ASSERT(m_numDecMembers!=-1); return m_varCnt; }
int m_numDecMembers
Definition: memberlist.h:93
#define ASSERT(x)
Definition: qglobal.h:590
int m_varCnt
Definition: memberlist.h:85
void MemberList::writeDeclarations ( OutputList ol,
ClassDef cd,
NamespaceDef nd,
FileDef fd,
GroupDef gd,
const char *  title,
const char *  subtitle,
bool  showEnumValues = FALSE,
bool  showInline = FALSE,
ClassDef inheritedFrom = 0,
MemberListType  lt = MemberListType_pubMethods 
)

Writes the list of members to the output.

Parameters
olOutput list to write to
cdnon-null if this list is part of class documentation.
ndnon-null if this list is part of namespace documentation.
fdnon-null if this list is part of file documentation.
gdnon-null if this list is part of group documentation.
titleTitle to use for the member list.
subtitleSub title to use for the member list.
showEnumValuesObsolete, always set to FALSE.
showInlineif set to TRUE if title is rendered differently
inheritedFromif not 0, the list is shown inside the given class as inherited members, parameter cd points to the class containing the members.
ltType of list that is inherited from.

Definition at line 519 of file memberlist.cpp.

523 {
524  (void)showEnumValues; // unused
525 
526  //printf("----- writeDeclaration() this=%p ---- inheritedFrom=%p\n",this,inheritedFrom);
527  static bool optimizeVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
528  QCString inheritId;
529 
530  countDecMembers(/*showEnumValues*/FALSE,gd); // count members shown in this section
531  Definition *ctx = cd;
532  if (ctx==0 && nd) ctx = nd;
533  if (ctx==0 && gd) ctx = gd;
534  if (ctx==0 && fd) ctx = fd;
535 
536  //printf("%p: MemberList::writeDeclaration(title=`%s',subtitle=`%s')=%d inheritedFrom=%p\n",
537  // this,title,subtitle,numDecMembers(),inheritedFrom);
538 
539  int num = numDecMembers();
540  if (inheritedFrom)
541  {
542  //if ( cd && !optimizeVhdl && countInheritableMembers(inheritedFrom)>0 )
543  if ( cd && !optimizeVhdl && cd->countMembersIncludingGrouped(
544  m_listType,inheritedFrom,TRUE)>0 )
545  {
546  ol.pushGeneratorState();
548  inheritId = substitute(listTypeAsString(lt),"-","_")+"_"+
550  if (title)
551  {
552  ol.writeInheritedSectionTitle(inheritId,cd->getReference(),
553  cd->getOutputFileBase(),
554  cd->anchor(),title,cd->displayName());
555  }
556  ol.popGeneratorState();
557  }
558  }
559  else if (num>0)
560  {
561  if (title)
562  {
563  if (showInline)
564  {
565  ol.startInlineHeader();
566  }
567  else
568  {
570  }
571  ol.parseText(title);
572  if (showInline)
573  {
574  ol.endInlineHeader();
575  }
576  else
577  {
578  ol.endMemberHeader();
579  }
580  }
581  if (subtitle)
582  {
583  QCString st=subtitle;
584  st = st.stripWhiteSpace();
585  if (!st.isEmpty())
586  {
587  ol.startMemberSubtitle();
588  ol.generateDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE,0,FALSE,FALSE);
589  ol.endMemberSubtitle();
590  }
591  }
592  }
593  if (num>0)
594  {
595  // TODO: Two things need to be worked out for proper VHDL output:
596  // 1. Signals and types under the group need to be
597  // formatted to associate them with the group somehow
598  // indentation, or at the very least, extra space after
599  // the group is done
600  // 2. This might need to be repeated below for memberGroupLists
601  if (optimizeVhdl) // use specific declarations function
602  {
603  VhdlDocGen::writeVhdlDeclarations(this,ol,0,cd,0,0);
604  }
605  else
606  {
607  writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
608  }
609 
610  //printf("memberGroupList=%p\n",memberGroupList);
611  if (memberGroupList)
612  {
614  MemberGroup *mg;
615  while ((mg=mgli.current()))
616  {
617  bool hasHeader=!mg->header().isEmpty() && mg->header()!="[NOHEADER]";
618  if (inheritId.isEmpty())
619  {
620  //printf("mg->header=%s hasHeader=%d\n",mg->header().data(),hasHeader);
621  ol.startMemberGroupHeader(hasHeader);
622  if (hasHeader)
623  {
624  ol.parseText(mg->header());
625  }
627  if (!mg->documentation().isEmpty())
628  {
629  //printf("Member group has docs!\n");
631  ol.generateDoc(mg->docFile(),mg->docLine(),ctx,0,mg->documentation()+"\n",FALSE,FALSE);
632  ol.endMemberGroupDocs();
633  }
634  ol.startMemberGroup();
635  }
636  //printf("--- mg->writePlainDeclarations ---\n");
637  mg->writePlainDeclarations(ol,cd,nd,fd,gd,inheritedFrom,inheritId);
638  if (inheritId.isEmpty())
639  {
640  ol.endMemberGroup(hasHeader);
641  }
642  ++mgli;
643  }
644  }
645  }
646  if (inheritedFrom && cd)
647  {
648  // also add members that of this list type, that are grouped together
649  // in a separate list in class 'inheritedFrom'
650  cd->addGroupedInheritedMembers(ol,m_listType,inheritedFrom,inheritId);
651  }
652  //printf("----- end writeDeclaration() ----\n");
653 }
void endMemberGroupDocs()
Definition: outputlist.h:232
QCString header() const
Definition: membergroup.h:47
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool isEmpty() const
Definition: qcstring.h:189
void endInlineHeader()
Definition: outputlist.h:212
void writePlainDeclarations(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, ClassDef *inheritedFrom, const char *inheritId)
bool generateDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const char *exampleName=0, bool singleLine=FALSE, bool linkFromIndex=FALSE)
Definition: outputlist.cpp:131
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
void addGroupedInheritedMembers(OutputList &ol, MemberListType lt, ClassDef *inheritedFrom, const QCString &inheritId)
Definition: classdef.cpp:4339
const bool FALSE
Definition: qglobal.h:370
static QCString stripPath(const QCString &s)
Definition: tagreader.cpp:1287
int countMembersIncludingGrouped(MemberListType lt, ClassDef *inheritedFrom, bool additional)
Definition: classdef.cpp:4213
void endMemberGroup(bool last)
Definition: outputlist.h:236
QCString displayName(bool includeScope=TRUE) const
Definition: classdef.cpp:312
static constexpr double mg
Definition: Units.h:145
QCString getReference() const
Definition: classdef.cpp:3814
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void startMemberGroup()
Definition: outputlist.h:234
void popGeneratorState()
Definition: outputlist.cpp:121
void endMemberHeader()
Definition: outputlist.h:196
MemberGroupList * memberGroupList
Definition: memberlist.h:95
void pushGeneratorState()
Definition: outputlist.cpp:111
static void writeVhdlDeclarations(MemberList *, OutputList &, GroupDef *, ClassDef *, FileDef *, NamespaceDef *)
QCString docFile() const
Definition: membergroup.h:92
QCString anchor() const
Definition: classdef.cpp:4606
void writeInheritedSectionTitle(const char *id, const char *ref, const char *file, const char *anchor, const char *title, const char *name)
Definition: outputlist.h:316
void startMemberGroupDocs()
Definition: outputlist.h:230
#define Config_getBool(val)
Definition: config.cpp:664
void startMemberSubtitle()
Definition: outputlist.h:198
QCString getOutputFileBase() const
Definition: classdef.cpp:3533
void countDecMembers(bool countEnumValues=FALSE, GroupDef *gd=0)
Definition: memberlist.cpp:136
void startInlineHeader()
Definition: outputlist.h:210
const QCString & documentation() const
Definition: membergroup.h:66
static QCString listTypeAsString(MemberListType type)
Definition: memberlist.cpp:907
int docLine() const
Definition: membergroup.h:93
void startMemberHeader(const char *anchor)
Definition: outputlist.h:194
void endMemberSubtitle()
Definition: outputlist.h:200
void endMemberGroupHeader()
Definition: outputlist.h:228
MemberListType m_listType
Definition: memberlist.h:98
const bool TRUE
Definition: qglobal.h:371
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
int numDecMembers() const
Definition: memberlist.h:51
void writePlainDeclarations(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, ClassDef *inheritedFrom, const char *inheritId)
Definition: memberlist.cpp:321
void startMemberGroupHeader(bool b)
Definition: outputlist.h:226
void MemberList::writeDocumentation ( OutputList ol,
const char *  scopeName,
Definition container,
const char *  title,
bool  showEnumValues = FALSE,
bool  showInline = FALSE 
)

Definition at line 655 of file memberlist.cpp.

658 {
659  //printf("MemberList::writeDocumentation()\n");
660 
661  countDocMembers(showEnumValues);
662  if (numDocMembers()==0) return;
663 
664  if (title)
665  {
666  ol.pushGeneratorState();
668  ol.writeRuler();
669  ol.popGeneratorState();
670  ol.startGroupHeader(showInline ? 2 : 0);
671  ol.parseText(title);
672  ol.endGroupHeader(showInline ? 2 : 0);
673  }
674  ol.startMemberDocList();
675 
676  MemberListIterator mli(*this);
677  MemberDef *md;
678  for ( ; (md=mli.current()) ; ++mli)
679  {
680  md->writeDocumentation(this,ol,scopeName,container,
681  m_inGroup,showEnumValues,showInline);
682  }
683  if (memberGroupList)
684  {
685  printf("MemberList::writeDocumentation() -- member groups %d\n",memberGroupList->count());
687  MemberGroup *mg;
688  for (;(mg=mgli.current());++mgli)
689  {
690  mg->writeDocumentation(ol,scopeName,container,showEnumValues,showInline);
691  }
692  }
693  ol.endMemberDocList();
694 }
void writeRuler()
Definition: outputlist.h:240
bool m_inGroup
Definition: memberlist.h:96
void startMemberDocList()
Definition: outputlist.h:202
void writeDocumentation(MemberList *ml, OutputList &ol, const char *scopeName, Definition *container, bool inGroup, bool showEnumValues=FALSE, bool showInline=FALSE)
Definition: memberdef.cpp:2526
void endGroupHeader(int extraLevels=0)
Definition: outputlist.h:178
static constexpr double mg
Definition: Units.h:145
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void writeDocumentation(OutputList &ol, const char *scopeName, Definition *container, bool showEnumValues, bool showInline)
void countDocMembers(bool countEnumValues=FALSE)
Definition: memberlist.cpp:208
void popGeneratorState()
Definition: outputlist.cpp:121
uint count() const
Definition: qlist.h:66
MemberGroupList * memberGroupList
Definition: memberlist.h:95
void pushGeneratorState()
Definition: outputlist.cpp:111
int numDocMembers() const
Definition: memberlist.h:52
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
void endMemberDocList()
Definition: outputlist.h:204
void startGroupHeader(int extraLevels=0)
Definition: outputlist.h:176
void MemberList::writeDocumentationPage ( OutputList ol,
const char *  scopeName,
Definition container 
)

Definition at line 715 of file memberlist.cpp.

717 {
718  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
719  MemberListIterator mli(*this);
720  MemberDef *md;
721  for ( ; (md=mli.current()) ; ++mli)
722  {
723  if (md->isDetailedSectionLinkable())
724  {
725  QCString diskName=md->getOutputFileBase();
727  startFile(ol,diskName,md->name(),title,HLI_None,!generateTreeView,diskName);
728  if (!generateTreeView)
729  {
730  container->writeNavigationPath(ol);
731  ol.endQuickIndices();
732  }
733  ol.startContents();
734 
735  if (generateTreeView)
736  {
737  md->writeDocumentation(this,ol,scopeName,container,m_inGroup);
738  ol.endContents();
739  endFileWithNavPath(container,ol);
740  }
741  else
742  {
743  ol.writeString("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n"
744  " <tr>\n"
745  " <td valign=\"top\">\n");
746 
747  container->writeQuickMemberLinks(ol,md);
748 
749  ol.writeString(" </td>\n");
750  ol.writeString(" <td valign=\"top\" class=\"mempage\">\n");
751 
752  md->writeDocumentation(this,ol,scopeName,container,m_inGroup);
753 
754  ol.writeString(" </td>\n");
755  ol.writeString(" </tr>\n");
756  ol.writeString("</table>\n");
757 
758  endFile(ol);
759  }
760  }
761  if (memberGroupList)
762  {
763  //printf("MemberList::writeDocumentation() -- member groups\n");
765  MemberGroup *mg;
766  for (;(mg=mgli.current());++mgli)
767  {
768  mg->writeDocumentationPage(ol,scopeName,container);
769  }
770  }
771  }
772 }
bool m_inGroup
Definition: memberlist.h:96
void writeDocumentation(MemberList *ml, OutputList &ol, const char *scopeName, Definition *container, bool inGroup, bool showEnumValues=FALSE, bool showInline=FALSE)
Definition: memberdef.cpp:2526
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition: index.cpp:263
void endFileWithNavPath(Definition *d, OutputList &ol)
Definition: index.cpp:282
void startFile(OutputList &ol, const char *name, const char *manName, const char *title, HighlightedItem hli, bool additionalIndices, const char *altSidebarName)
Definition: index.cpp:244
void writeString(const char *text)
Definition: outputlist.h:119
void writeNavigationPath(OutputList &ol) const
static constexpr double mg
Definition: Units.h:145
const QCString & name() const
Definition: definition.h:114
bool isDetailedSectionLinkable() const
Definition: memberdef.cpp:1852
MemberGroupList * memberGroupList
Definition: memberlist.h:95
#define Config_getBool(val)
Definition: config.cpp:664
virtual void writeQuickMemberLinks(OutputList &, MemberDef *) const
Definition: definition.h:338
void endQuickIndices()
Definition: outputlist.h:352
void endContents()
Definition: outputlist.h:366
QCString qualifiedName() const
Definition: memberdef.cpp:3968
void writeDocumentationPage(OutputList &ol, const char *scopeName, Definition *container)
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
void startContents()
Definition: outputlist.h:364
void MemberList::writePlainDeclarations ( OutputList ol,
ClassDef cd,
NamespaceDef nd,
FileDef fd,
GroupDef gd,
ClassDef inheritedFrom,
const char *  inheritId 
)

Definition at line 321 of file memberlist.cpp.

325 {
326  //printf("----- writePlainDeclaration() ----\n");
327  static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
328  countDecMembers();
329  if (numDecMembers()==0)
330  {
331  //printf(" --> no members!\n");
332  return; // no members in this list
333  }
334  //printf(" --> writePlainDeclaration() numDecMembers()=%d\n",
335  // numDecMembers());
336 
337  ol.pushGeneratorState();
338 
339  bool first=TRUE;
340  MemberDef *md;
341  MemberListIterator mli(*this);
342  for ( ; (md=mli.current()); ++mli )
343  {
344  //printf(">>> Member `%s' type=%d visible=%d\n",
345  // md->name().data(),md->memberType(),md->isBriefSectionVisible());
346  if ((inheritedFrom==0 || !md->isReimplementedBy(inheritedFrom)) &&
347  md->isBriefSectionVisible())
348  {
349  //printf(">>> rendering\n");
350  switch(md->memberType())
351  {
352  case MemberType_Define: // fall through
353  //case MemberType_Prototype: // fall through
354  case MemberType_Typedef: // fall through
355  case MemberType_Variable: // fall through
356  case MemberType_Function: // fall through
357  case MemberType_Signal: // fall through
358  case MemberType_Slot: // fall through
359  case MemberType_DCOP: // fall through
360  case MemberType_Property: // fall through
361  case MemberType_Interface: // fall through
362  case MemberType_Service: // fall through
363  case MemberType_Event:
364  {
365  if (first) ol.startMemberList(),first=FALSE;
366  md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
367  break;
368  }
370  {
371  int enumVars=0;
372  MemberListIterator vmli(*this);
373  MemberDef *vmd;
374  QCString name(md->name());
375  int i=name.findRev("::");
376  if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
377  if (name[0]=='@') // anonymous enum => append variables
378  {
379  for ( ; (vmd=vmli.current()) ; ++vmli)
380  {
381  QCString vtype=vmd->typeString();
382  if ((vtype.find(name))!=-1)
383  {
384  enumVars++;
385  vmd->setAnonymousEnumType(md);
386  }
387  }
388  }
389  // if this is an anonymous enum and there are variables of this
390  // enum type (i.e. enumVars>0), then we do not show the enum here.
391  if (enumVars==0 && !hideUndocMembers) // show enum here
392  {
393  //printf("Enum!!\n");
394  if (first)
395  {
396  ol.startMemberList();
397  first=FALSE;
398  }
400  ol.startMemberItem(md->anchor(),0,inheritId);
401  bool detailsLinkable = md->isDetailedSectionLinkable();
402  if (!detailsLinkable)
403  {
404  ol.startDoxyAnchor(md->getOutputFileBase(),0,md->anchor(),md->name(),QCString());
405  }
406  ol.writeString("enum ");
407  ol.insertMemberAlign();
408  md->writeEnumDeclaration(ol,cd,nd,fd,gd);
409  if (!detailsLinkable)
410  {
411  ol.endDoxyAnchor(md->getOutputFileBase(),md->anchor());
412  }
413  if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
414  {
415  DocRoot *rootNode = validatingParseDoc(
416  md->briefFile(),md->briefLine(),
417  cd,md,
418  md->briefDescription(),
419  TRUE,FALSE,0,TRUE,FALSE
420  );
421  if (rootNode && !rootNode->isEmpty())
422  {
423  ol.startMemberDescription(md->anchor());
424  ol.writeDoc(rootNode,cd,md);
425  if (md->isDetailedSectionLinkable())
426  {
428  ol.docify(" ");
429  ol.startTextLink(md->getOutputFileBase(),
430  md->anchor());
432  ol.endTextLink();
433  ol.enableAll();
434  }
436  }
437  delete rootNode;
438  }
439  ol.endMemberItem();
440  ol.endMemberDeclaration(md->anchor(),inheritId);
441  }
442  md->warnIfUndocumented();
443  break;
444  }
445  case MemberType_Friend:
446  if (inheritedFrom==0)
447  {
448  if (first)
449  {
450  ol.startMemberList();
451  first=FALSE;
452  }
453  md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
454  break;
455  }
456  case MemberType_EnumValue:
457  {
458  if (m_inGroup)
459  {
460  //printf("EnumValue!\n");
461  if (first) ol.startMemberList(),first=FALSE;
462  md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup,inheritedFrom,inheritId);
463  }
464  }
465  break;
466  }
467  }
468  }
469 
470  // handle members that are inside anonymous compounds and for which
471  // no variables of the anonymous compound type exist.
472  if (cd)
473  {
474  MemberListIterator mli(*this);
475  for ( ; (md=mli.current()) ; ++mli )
476  {
477  if (md->fromAnonymousScope() && !md->anonymousDeclShown())
478  {
479  md->setFromAnonymousScope(FALSE);
480  //printf("anonymous compound members\n");
481  if (md->isBriefSectionVisible())
482  {
483  if (first)
484  {
485  ol.startMemberList();
486  first=FALSE;
487  }
488  md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
489  }
490  md->setFromAnonymousScope(TRUE);
491  }
492  }
493  }
494 
495  if (!first)
496  {
497  ol.endMemberList();
498  }
499 
500  ol.popGeneratorState();
501  //printf("----- end writePlainDeclaration() ----\n");
502 }
static QCString name
Definition: declinfo.cpp:673
void startMemberItem(const char *anchor, int i1, const char *id=0)
Definition: outputlist.h:218
void endMemberDeclaration(const char *anchor, const char *inheritId)
Definition: outputlist.h:314
bool m_inGroup
Definition: memberlist.h:96
void endMemberItem()
Definition: outputlist.h:220
bool isEmpty() const
Definition: qcstring.h:189
uint length() const
Definition: qcstring.h:195
void writeString(const char *text)
Definition: outputlist.h:119
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
const bool FALSE
Definition: qglobal.h:370
void startMemberDescription(const char *anchor, const char *inheritId=0)
Definition: outputlist.h:308
DocRoot * validatingParseDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const char *input, bool indexWords, bool isExample, const char *exampleName, bool singleLine, bool linkFromIndex)
Definition: docparser.cpp:7179
int briefLine() const
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
void startMemberList()
Definition: outputlist.h:206
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
void startTextLink(const char *file, const char *anchor)
Definition: outputlist.h:159
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
QCollection::Item first()
Definition: qglist.cpp:807
bool isBriefSectionVisible() const
Definition: memberdef.cpp:1289
void popGeneratorState()
Definition: outputlist.cpp:121
const char * typeString() const
Definition: memberdef.cpp:4035
const QCString & name() const
Definition: definition.h:114
bool isDetailedSectionLinkable() const
Definition: memberdef.cpp:1852
void pushGeneratorState()
Definition: outputlist.cpp:111
void startMemberDeclaration()
Definition: outputlist.h:312
QCString briefDescription(bool abbr=FALSE) const
Definition: memberdef.cpp:5073
QCString right(uint len) const
Definition: qcstring.cpp:231
QCString anchor() const
Definition: memberdef.cpp:1031
void writeDoc(DocRoot *root, Definition *ctx, MemberDef *md)
Definition: outputlist.cpp:162
#define Config_getBool(val)
Definition: config.cpp:664
QCString briefFile() const
void setAnonymousEnumType(MemberDef *md)
Definition: memberdef.cpp:4730
void startDoxyAnchor(const char *fName, const char *manName, const char *anchor, const char *name, const char *args)
Definition: outputlist.h:266
MemberType memberType() const
Definition: memberdef.cpp:4125
virtual QCString trMore()=0
void writeEnumDeclaration(OutputList &typeDecl, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd)
Definition: memberdef.cpp:3754
void countDecMembers(bool countEnumValues=FALSE, GroupDef *gd=0)
Definition: memberlist.cpp:136
void endDoxyAnchor(const char *fn, const char *anchor)
Definition: outputlist.h:270
void enableAll()
Definition: outputlist.cpp:59
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
void endMemberDescription()
Definition: outputlist.h:310
Translator * theTranslator
Definition: language.cpp:157
bool isReimplementedBy(ClassDef *cd) const
Definition: memberdef.cpp:888
bool isEmpty() const
Definition: docparser.h:1409
void docify(const char *s)
Definition: outputlist.h:145
void insertMemberAlign(bool templ=FALSE)
Definition: outputlist.h:238
void endTextLink()
Definition: outputlist.h:161
const bool TRUE
Definition: qglobal.h:371
void endMemberList()
Definition: outputlist.h:208
void writeDeclaration(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, bool inGroup, ClassDef *inheritFrom=0, const char *inheritId=0)
Definition: memberdef.cpp:1411
int numDecMembers() const
Definition: memberlist.h:51
void MemberList::writeSimpleDocumentation ( OutputList ol,
Definition container 
)

Definition at line 697 of file memberlist.cpp.

699 {
701  //printf("MemberList count=%d\n",numDocMembers());
702  if (numDocMembers()==0) return;
703 
705  MemberListIterator mli(*this);
706  MemberDef *md;
707  for ( ; (md=mli.current()) ; ++mli)
708  {
709  md->writeMemberDocSimple(ol,container);
710  }
711  ol.endMemberDocSimple();
712 }
void startMemberDocSimple()
Definition: outputlist.h:450
const bool FALSE
Definition: qglobal.h:370
void countDocMembers(bool countEnumValues=FALSE)
Definition: memberlist.cpp:208
int numDocMembers() const
Definition: memberlist.h:52
void writeMemberDocSimple(OutputList &ol, Definition *container)
Definition: memberdef.cpp:3096
void endMemberDocSimple()
Definition: outputlist.h:452
void MemberList::writeTagFile ( FTextStream tagFile)

Definition at line 963 of file memberlist.cpp.

964 {
965  MemberListIterator mli(*this);
966  MemberDef *md;
967  for ( ; (md=mli.current()) ; ++mli)
968  {
969  if (md->getLanguage()!=SrcLangExt_VHDL)
970  {
971  md->writeTagFile(tagFile);
972  if (md->memberType()==MemberType_Enumeration && md->enumFieldList() && !md->isStrong())
973  {
974  MemberListIterator vmli(*md->enumFieldList());
975  MemberDef *vmd;
976  for ( ; (vmd=vmli.current()) ; ++vmli)
977  {
978  vmd->writeTagFile(tagFile);
979  }
980  }
981  }
982  else
983  {
984  VhdlDocGen::writeTagFile(md,tagFile);
985  }
986  }
987  if (memberGroupList)
988  {
990  MemberGroup *mg;
991  for (;(mg=mgli.current());++mgli)
992  {
993  mg->writeTagFile(tagFile);
994  }
995  }
996 }
void writeTagFile(FTextStream &)
Definition: memberdef.cpp:3580
void writeTagFile(FTextStream &)
MemberList * enumFieldList() const
Definition: memberdef.cpp:4497
static constexpr double mg
Definition: Units.h:145
MemberGroupList * memberGroupList
Definition: memberlist.h:95
SrcLangExt getLanguage() const
bool isStrong() const
Definition: memberdef.cpp:4345
MemberType memberType() const
Definition: memberdef.cpp:4125
static void writeTagFile(MemberDef *mdef, FTextStream &tagFile)

Member Data Documentation

int MemberList::m_defCnt
private

Definition at line 91 of file memberlist.h.

int MemberList::m_enumCnt
private

Definition at line 87 of file memberlist.h.

int MemberList::m_enumValCnt
private

Definition at line 88 of file memberlist.h.

int MemberList::m_friendCnt
private

Definition at line 92 of file memberlist.h.

int MemberList::m_funcCnt
private

Definition at line 86 of file memberlist.h.

bool MemberList::m_inFile
private

Definition at line 97 of file memberlist.h.

bool MemberList::m_inGroup
private

Definition at line 96 of file memberlist.h.

MemberListType MemberList::m_listType
private

Definition at line 98 of file memberlist.h.

bool MemberList::m_needsSorting
private

Definition at line 99 of file memberlist.h.

int MemberList::m_numDecMembers
private

Definition at line 93 of file memberlist.h.

int MemberList::m_numDocMembers
private

Definition at line 94 of file memberlist.h.

int MemberList::m_protoCnt
private

Definition at line 90 of file memberlist.h.

int MemberList::m_typeCnt
private

Definition at line 89 of file memberlist.h.

int MemberList::m_varCnt
private

Definition at line 85 of file memberlist.h.

MemberGroupList* MemberList::memberGroupList
private

Definition at line 95 of file memberlist.h.


The documentation for this class was generated from the following files: