Commit 6dbf32d5 authored by Dimitri van Heesch's avatar Dimitri van Heesch
Browse files

More template and context enhancements

parent 4d5ddf77
Loading
Loading
Loading
Loading
+598 −51

File changed.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@ class GroupDef;
class GroupList;
class GroupList;
struct IncludeInfo;
struct IncludeInfo;
class MemberList;
class MemberList;
class MemberSDict;
class MemberDef;
class MemberDef;
struct Argument;
struct Argument;
class ArgumentList;
class ArgumentList;
@@ -650,6 +651,7 @@ class MemberListContext : public TemplateListIntf
{
{
  public:
  public:
    MemberListContext(const MemberList *ml);
    MemberListContext(const MemberList *ml);
    MemberListContext(MemberSDict *ml,bool doSort);
   ~MemberListContext();
   ~MemberListContext();


    // TemplateListIntf
    // TemplateListIntf
+8 −3
Original line number Original line Diff line number Diff line
@@ -1050,6 +1050,13 @@ void Definition::setBodyDef(FileDef *fd)
  m_impl->body->fileDef=fd; 
  m_impl->body->fileDef=fd; 
}
}


bool Definition::hasSources() const
{
  return m_impl->body && m_impl->body->startLine!=-1 &&
         m_impl->body->endLine>=m_impl->body->startLine &&
         m_impl->body->fileDef;
}

/*! Write code of this definition into the documentation */
/*! Write code of this definition into the documentation */
void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
{
{
@@ -1057,9 +1064,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
  ol.pushGeneratorState();
  ol.pushGeneratorState();
  //printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
  //printf("Source Fragment %s: %d-%d bodyDef=%p\n",name().data(),
  //        m_startBodyLine,m_endBodyLine,m_bodyDef);
  //        m_startBodyLine,m_endBodyLine,m_bodyDef);
  if (inlineSources && 
  if (inlineSources && hasSources())
      m_impl->body && m_impl->body->startLine!=-1 && 
      m_impl->body->endLine>=m_impl->body->startLine && m_impl->body->fileDef)
  {
  {
    QCString codeFragment;
    QCString codeFragment;
    int actualStart=m_impl->body->startLine,actualEnd=m_impl->body->endLine;
    int actualStart=m_impl->body->startLine,actualEnd=m_impl->body->endLine;
+5 −4
Original line number Original line Diff line number Diff line
@@ -137,7 +137,7 @@ class Definition : public DefinitionIntf
    virtual QCString getSourceAnchor() const;
    virtual QCString getSourceAnchor() const;


    /*! Returns the detailed description of this definition */
    /*! Returns the detailed description of this definition */
    QCString documentation() const;
    virtual QCString documentation() const;


    /*! Returns the line number at which the detailed documentation was found. */
    /*! Returns the line number at which the detailed documentation was found. */
    int docLine() const;
    int docLine() const;
@@ -148,7 +148,7 @@ class Definition : public DefinitionIntf
    QCString docFile() const;
    QCString docFile() const;


    /*! Returns the brief description of this definition. This can include commands. */
    /*! Returns the brief description of this definition. This can include commands. */
    QCString briefDescription(bool abbreviate=FALSE) const;
    virtual QCString briefDescription(bool abbreviate=FALSE) const;


    /*! Returns a plain text version of the brief description suitable for use
    /*! Returns a plain text version of the brief description suitable for use
     *  as a tool tip. 
     *  as a tool tip. 
@@ -259,6 +259,7 @@ class Definition : public DefinitionIntf
    MemberSDict *getReferencedByMembers() const;
    MemberSDict *getReferencedByMembers() const;


    bool hasSections() const;
    bool hasSections() const;
    bool hasSources() const;


    /** returns TRUE if this class has a brief description */
    /** returns TRUE if this class has a brief description */
    bool hasBriefDescription() const;
    bool hasBriefDescription() const;
+1 −1
Original line number Original line Diff line number Diff line
@@ -282,7 +282,7 @@ class HtmlGenerator : public OutputGenerator
    //{ t << "<tr><td valign=\"top\"><em>"; }
    //{ t << "<tr><td valign=\"top\"><em>"; }
    { t << "<tr><td class=\"fieldname\"><em>"; }
    { t << "<tr><td class=\"fieldname\"><em>"; }
    void endDescTableTitle()
    void endDescTableTitle()
    { t << "</em>&nbsp;</td>"; }
    { t << "</em>&#160;</td>"; }
    void startDescTableData()
    void startDescTableData()
    //{ t << "<td>" << endl; }
    //{ t << "<td>" << endl; }
    { t << "<td class=\"fielddoc\">" << endl; }
    { t << "<td class=\"fielddoc\">" << endl; }
Loading