|
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 _REFLIST_H
|
|
Packit |
1c1d7e |
#define _REFLIST_H
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#include <qintdict.h>
|
|
Packit |
1c1d7e |
#include <qlist.h>
|
|
Packit |
1c1d7e |
#include "sortdict.h"
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
class Definition;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** This struct represents an item in the list of references. */
|
|
Packit |
1c1d7e |
struct RefItem
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
RefItem() : scope(0) {}
|
|
Packit |
1c1d7e |
QCString text; //!< text of the item.
|
|
Packit |
1c1d7e |
QCString listAnchor; //!< anchor in the list
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
QCString prefix; //!< type prefix for the name
|
|
Packit |
1c1d7e |
Definition *scope; //!< scope to use for references.
|
|
Packit |
1c1d7e |
QCString name; //!< name of the entity containing the reference
|
|
Packit |
1c1d7e |
QCString title; //!< display name of the entity
|
|
Packit |
1c1d7e |
QCString args; //!< optional arguments for the entity (if function)
|
|
Packit |
1c1d7e |
//bool written;
|
|
Packit |
1c1d7e |
QList<RefItem> extraItems; //!< more items belonging to the same entity
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** List of items sorted by title */
|
|
Packit |
1c1d7e |
class SortedRefItems : public SDict<RefItem>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
SortedRefItems(int size=17) : SDict<RefItem>(size) {}
|
|
Packit |
1c1d7e |
virtual ~SortedRefItems() {}
|
|
Packit |
1c1d7e |
private:
|
|
Packit |
1c1d7e |
int compareValues(const RefItem *r1,const RefItem *r2) const
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
return qstricmp(r1->title,r2->title);
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** List of cross-referenced items
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* This class represents a list of items that are put
|
|
Packit |
1c1d7e |
* at a certain point in the documentation by some special command
|
|
Packit |
1c1d7e |
* and are collected in a list. The items cross-reference the
|
|
Packit |
1c1d7e |
* documentation and the list.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Examples are the todo list, the test list and the bug list,
|
|
Packit |
1c1d7e |
* introduced by the \\todo, \\test, and \\bug commands respectively.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class RefList
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
int addRefItem();
|
|
Packit |
1c1d7e |
RefItem *getRefItem(int todoItemId);
|
|
Packit |
1c1d7e |
RefItem *getFirstRefItem();
|
|
Packit |
1c1d7e |
RefItem *getNextRefItem();
|
|
Packit |
1c1d7e |
QCString listName() const;
|
|
Packit |
1c1d7e |
QCString fileName() const;
|
|
Packit |
1c1d7e |
QCString pageTitle() const;
|
|
Packit |
1c1d7e |
QCString sectionTitle() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
RefList(const char *listName,
|
|
Packit |
1c1d7e |
const char *pageTitle,const char *secTitle
|
|
Packit |
1c1d7e |
);
|
|
Packit |
1c1d7e |
~RefList();
|
|
Packit |
1c1d7e |
void insertIntoList(const char *key,RefItem *item);
|
|
Packit |
1c1d7e |
void generatePage();
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
private:
|
|
Packit |
1c1d7e |
int m_id;
|
|
Packit |
1c1d7e |
QCString m_listName;
|
|
Packit |
1c1d7e |
QCString m_fileName;
|
|
Packit |
1c1d7e |
QCString m_pageTitle;
|
|
Packit |
1c1d7e |
QCString m_secTitle;
|
|
Packit |
1c1d7e |
SortedRefItems *m_itemList;
|
|
Packit |
1c1d7e |
QIntDict<RefItem> *m_dict;
|
|
Packit |
1c1d7e |
QIntDictIterator<RefItem> *m_dictIterator;
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#endif
|