Skip to content

Commit

Permalink
Addition of module data to context and alphaIndex filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Aug 2, 2014
1 parent a7c14ac commit e0c3517
Show file tree
Hide file tree
Showing 7 changed files with 1,183 additions and 674 deletions.
1,546 changes: 955 additions & 591 deletions src/context.cpp

Large diffs are not rendered by default.

112 changes: 32 additions & 80 deletions src/context.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/******************************************************************************
*
* Copyright (C) 1997-2014 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/

#ifndef CONTEXT_H
#define CONTEXT_H

Expand Down Expand Up @@ -364,10 +379,10 @@ class ModuleContext : public RefCountedContext, public TemplateStructIntf

//----------------------------------------------------

class NestedClassListContext : public RefCountedContext, public TemplateListIntf
class ClassListContext : public RefCountedContext, public TemplateListIntf
{
public:
static NestedClassListContext *alloc() { return new NestedClassListContext; }
static ClassListContext *alloc() { return new ClassListContext; }

// TemplateListIntf
virtual int count() const;
Expand All @@ -376,55 +391,28 @@ class NestedClassListContext : public RefCountedContext, public TemplateListIntf
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }

void append(ClassDef *cd);

private:
NestedClassListContext();
~NestedClassListContext();
ClassListContext();
~ClassListContext();
class Private;
Private *p;
};

//----------------------------------------------------

class NestedNamespaceListContext : public RefCountedContext, public TemplateListIntf
class ClassIndexContext : public RefCountedContext, public TemplateStructIntf
{
public:
static NestedNamespaceListContext *alloc() { return new NestedNamespaceListContext; }
static ClassIndexContext *alloc() { return new ClassIndexContext; }

// TemplateListIntf
virtual int count() const;
virtual TemplateVariant at(int index) const;
virtual TemplateListIntf::ConstIterator *createIterator() const;
// TemplateStructIntf methods
virtual TemplateVariant get(const char *name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }

void append(NamespaceDef *cd);

private:
NestedNamespaceListContext();
~NestedNamespaceListContext();
class Private;
Private *p;
};

//----------------------------------------------------

class ClassListContext : public RefCountedContext, public TemplateListIntf
{
public:
static ClassListContext *alloc() { return new ClassListContext; }

// TemplateListIntf
virtual int count() const;
virtual TemplateVariant at(int index) const;
virtual TemplateListIntf::ConstIterator *createIterator() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }

private:
ClassListContext();
~ClassListContext();
ClassIndexContext();
~ClassIndexContext();
class Private;
Private *p;
};
Expand Down Expand Up @@ -537,6 +525,8 @@ class NestingContext : public RefCountedContext, public TemplateListIntf
void addFiles(const FileNameList &);
void addFiles(const FileList &);
void addPages(const PageSDict &pages,bool rootOnly);
void addModules(const GroupSDict &modules);
void addModules(const GroupList &modules);

private:
NestingContext(const NestingNodeContext *parent,int level);
Expand Down Expand Up @@ -667,60 +657,22 @@ class FileTreeContext : public RefCountedContext, public TemplateStructIntf

//----------------------------------------------------

class PageNodeContext : public RefCountedContext, public TemplateStructIntf
{
public:
static PageNodeContext *alloc(PageDef *pd) { return new PageNodeContext(pd); }

// TemplateStructIntf methods
virtual TemplateVariant get(const char *name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }

private:
PageNodeContext(PageDef *);
~PageNodeContext();
class Private;
Private *p;
};

//----------------------------------------------------

class PageNodeListContext : public RefCountedContext, public TemplateListIntf
class PageListContext : public RefCountedContext, public TemplateListIntf
{
public:
static PageNodeListContext *alloc() { return new PageNodeListContext; }
static PageListContext *alloc(const PageSDict *pages) { return new PageListContext(pages); }

// TemplateListIntf
// TemplateListIntf methods
virtual int count() const;
virtual TemplateVariant at(int index) const;
virtual TemplateListIntf::ConstIterator *createIterator() const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }

void addPages(const PageSDict &,bool rootOnly);

private:
PageNodeListContext();
~PageNodeListContext();
class Private;
Private *p;
};

//----------------------------------------------------

class PageListContext : public RefCountedContext, public TemplateStructIntf
{
public:
static PageListContext *alloc() { return new PageListContext; }

// TemplateStructIntf methods
virtual TemplateVariant get(const char *name) const;
virtual int addRef() { return RefCountedContext::addRef(); }
virtual int release() { return RefCountedContext::release(); }
void addPages(const PageSDict &pages);

private:
PageListContext();
PageListContext(const PageSDict *pages);
~PageListContext();
class Private;
Private *p;
Expand Down
7 changes: 7 additions & 0 deletions src/groupdef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ GroupDef::GroupDef(const char *df,int dl,const char *na,const char *t,

visited = 0;
groupScope = 0;
m_subGrouping=Config_getBool("SUBGROUPING");
}

GroupDef::~GroupDef()
Expand Down Expand Up @@ -1512,3 +1513,9 @@ void GroupDef::updateLanguage(const Definition *d)
}
}

bool GroupDef::hasDetailedDescription() const
{
static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
return ((!briefDescription().isEmpty() && repeatBrief) ||
!documentation().isEmpty());
}
3 changes: 3 additions & 0 deletions src/groupdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class GroupDef : public Definition

void addListReferences();
void sortMemberLists();
bool subGrouping() const { return m_subGrouping; }

bool visited; // number of times accessed for output - KPW

Expand All @@ -101,6 +102,7 @@ class GroupDef : public Definition
PageSDict * getPages() const { return pageDict; }
DirList * getDirs() const { return dirList; }
PageSDict * getExamples() const { return exampleDict; }
bool hasDetailedDescription() const;
//MemberList* getMembers() const { return allMemberList; }
void sortSubGroups();

Expand Down Expand Up @@ -150,6 +152,7 @@ class GroupDef : public Definition

QList<MemberList> m_memberLists;
MemberGroupSDict *memberGroupSDict;
bool m_subGrouping;

};

Expand Down
Loading

0 comments on commit e0c3517

Please sign in to comment.