Commit 00b7d393 authored by Dimitri van Heesch's avatar Dimitri van Heesch
Browse files

More context and template additions

parent 727e5e1c
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -2446,12 +2446,12 @@ bool ClassDef::addExample(const char *anchor,const char *nameStr,
}

// returns TRUE if this class is used in an example
bool ClassDef::hasExamples()
bool ClassDef::hasExamples() const
{
  if (m_impl->exampleSDict==0)
    return FALSE;
  else
    return m_impl->exampleSDict->count()>0;
  bool result=FALSE;
  if (m_impl->exampleSDict)
    result = m_impl->exampleSDict->count()>0;
  return result;
}


@@ -4758,3 +4758,12 @@ const FileList &ClassDef::usedFiles() const
  return m_impl->files;
}

const ArgumentList *ClassDef::typeConstraints() const
{
  return m_impl->typeConstraints;
}

const ExampleSDict *ClassDef::exampleList() const
{
  return m_impl->exampleSDict;
}
+5 −2
Original line number Diff line number Diff line
@@ -313,6 +313,11 @@ class ClassDef : public Definition

    QCString includeStatement() const;

    const ArgumentList *typeConstraints() const;
    const ExampleSDict *exampleList() const;
    bool hasExamples() const;
    QCString getMemberListFileName() const;

    //-----------------------------------------------------------------------------------
    // --- setters ----
    //-----------------------------------------------------------------------------------
@@ -384,7 +389,6 @@ class ClassDef : public Definition

  protected:
    void addUsedInterfaceClasses(MemberDef *md,const char *typeStr);
    bool hasExamples();
    bool hasNonReferenceSuperClass();
    void showUsedFiles(OutputList &ol);

@@ -392,7 +396,6 @@ class ClassDef : public Definition
    void writeTagFileMarker();
    void writeDocumentationContents(OutputList &ol,const QCString &pageTitle);
    void internalInsertMember(MemberDef *md,Protection prot,bool addToAllList);
    QCString getMemberListFileName() const;
    void addMemberToList(MemberListType lt,MemberDef *md,bool isBrief);
    MemberList *createMemberList(MemberListType lt);
    void writeInheritedMemberDeclarations(OutputList &ol,MemberListType lt,int lt2,const QCString &title,ClassDef *inheritedFrom,bool invert,bool showAlways,QPtrDict<void> *visitedClasses);
+703 −64

File changed.

Preview size limit exceeded, changes collapsed.

+38 −2
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ class MemberList;
class MemberDef;
struct Argument;
class ArgumentList;
class MemberNameInfoSDict;
struct MemberInfo;

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

@@ -679,10 +681,44 @@ class MemberListInfoContext : public TemplateStructIntf

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

class MemberInfoContext : public TemplateStructIntf
{
  public:
    MemberInfoContext(const MemberInfo *mi);
   ~MemberInfoContext();

    // TemplateStructIntf methods
    virtual TemplateVariant get(const char *name) const;

  private:
    class Private;
    Private *p;
};

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

class AllMembersListContext : public TemplateListIntf
{
  public:
    AllMembersListContext(const MemberNameInfoSDict *ml);
   ~AllMembersListContext();

    // TemplateListIntf
    virtual int  count() const;
    virtual TemplateVariant at(int index) const;
    virtual TemplateListIntf::ConstIterator *createIterator() const;

  private:
    class Private;
    Private *p;
};

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

class ArgumentContext : public TemplateStructIntf
{
  public:
    ArgumentContext(const Argument *arg);
    ArgumentContext(const Argument *arg,Definition *def,const QCString &relPath);
   ~ArgumentContext();

    // TemplateStructIntf methods
@@ -698,7 +734,7 @@ class ArgumentContext : public TemplateStructIntf
class ArgumentListContext : public TemplateListIntf
{
  public:
    ArgumentListContext(const ArgumentList *al);
    ArgumentListContext(const ArgumentList *al,Definition *def,const QCString &relPath);
   ~ArgumentListContext();

    // TemplateListIntf
+1 −1
Original line number Diff line number Diff line
@@ -959,7 +959,7 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
        {
          ol.disable(OutputGenerator::Latex);
        }
        // write line link (HTML, LaTeX optionally)
        // write file link (HTML, LaTeX optionally)
        ol.writeObjectLink(0,fn,0,m_impl->body->fileDef->name());
        ol.enableAll();
        ol.disable(OutputGenerator::Html);
Loading