|
Packit |
1c1d7e |
/******************************************************************************
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Copyright (C) 1997-2015 by Dimitri van Heesch.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Permission to use, copy, modify, and distribute this software and its
|
|
Packit |
1c1d7e |
* documentation under the terms of the GNU General Public License is hereby
|
|
Packit |
1c1d7e |
* granted. No representations are made about the suitability of this software
|
|
Packit |
1c1d7e |
* for any purpose. It is provided "as is" without express or implied warranty.
|
|
Packit |
1c1d7e |
* See the GNU General Public License for more details.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Documents produced by Doxygen are derivative works derived from the
|
|
Packit |
1c1d7e |
* input used in their production; they are not affected by this license.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#ifndef SECTION_H
|
|
Packit |
1c1d7e |
#define SECTION_H
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#include "sortdict.h"
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
class Definition;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Class representing a section in a page */
|
|
Packit |
1c1d7e |
struct SectionInfo
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
enum SectionType { Page = 0,
|
|
Packit |
1c1d7e |
Section = 1,
|
|
Packit |
1c1d7e |
Subsection = 2,
|
|
Packit |
1c1d7e |
Subsubsection = 3,
|
|
Packit |
1c1d7e |
Paragraph = 4,
|
|
Packit |
1c1d7e |
Anchor = 5,
|
|
Packit |
1c1d7e |
Table = 6
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
SectionInfo(const char *f,const int lin,const char *l,const char *t,
|
|
Packit |
1c1d7e |
SectionType st,int lev,const char *r=0) :
|
|
Packit |
1c1d7e |
label(l), title(t), type(st), ref(r), definition(0),
|
|
Packit |
1c1d7e |
fileName(f), lineNr(lin), generated(FALSE), level(lev)
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
SectionInfo(const SectionInfo &s)
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
label=s.label.copy();
|
|
Packit |
1c1d7e |
title=s.title.copy();
|
|
Packit |
1c1d7e |
type =s.type;
|
|
Packit |
1c1d7e |
ref=s.ref.copy();
|
|
Packit |
1c1d7e |
definition=s.definition;
|
|
Packit |
1c1d7e |
fileName=s.fileName.copy();
|
|
Packit |
1c1d7e |
lineNr=s.lineNr;
|
|
Packit |
1c1d7e |
generated=s.generated;
|
|
Packit |
1c1d7e |
level=s.level;
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
~SectionInfo() {}
|
|
Packit |
1c1d7e |
QCString label;
|
|
Packit |
1c1d7e |
QCString title;
|
|
Packit |
1c1d7e |
SectionType type;
|
|
Packit |
1c1d7e |
QCString ref;
|
|
Packit |
1c1d7e |
Definition *definition;
|
|
Packit |
1c1d7e |
QCString fileName;
|
|
Packit |
1c1d7e |
int lineNr;
|
|
Packit |
1c1d7e |
bool generated;
|
|
Packit |
1c1d7e |
int level;
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Unsorted dictionary of SectionInfo objects. */
|
|
Packit |
1c1d7e |
class SectionDict : public SDict<SectionInfo>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
SectionDict(int size) : SDict<SectionInfo>(size) {}
|
|
Packit |
1c1d7e |
~SectionDict() {}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#endif
|