formula.h 1.5 KB
Newer Older
Dimitri van Heesch's avatar
Dimitri van Heesch committed
1 2
/******************************************************************************
 *
3
 * 
Dimitri van Heesch's avatar
Dimitri van Heesch committed
4
 *
Dimitri van Heesch's avatar
Dimitri van Heesch committed
5
 * Copyright (C) 1997-2014 by Dimitri van Heesch.
Dimitri van Heesch's avatar
Dimitri van Heesch committed
6 7 8 9 10 11 12
 *
 * 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.
 *
Dimitri van Heesch's avatar
Dimitri van Heesch committed
13 14
 * Documents produced by Doxygen are derivative works derived from the
 * input used in their production; they are not affected by this license.
Dimitri van Heesch's avatar
Dimitri van Heesch committed
15 16 17 18 19 20 21 22 23
 *
 */

#ifndef FORMULA_H
#define FORMULA_H

#include <qlist.h>
#include <qdict.h>

Dimitri van Heesch's avatar
Dimitri van Heesch committed
24
/** Class representing a formula in the output. */
Dimitri van Heesch's avatar
Dimitri van Heesch committed
25 26 27 28 29 30
class Formula
{
  public:
    Formula(const char *text);
   ~Formula();
    int getId();
31
    QCString getFormulaText() const { return form; }
Dimitri van Heesch's avatar
Dimitri van Heesch committed
32 33 34
    
  private:
    int number;
35
    QCString form;
Dimitri van Heesch's avatar
Dimitri van Heesch committed
36 37
};

Dimitri van Heesch's avatar
Dimitri van Heesch committed
38
/** A list of Formula objects. */
Dimitri van Heesch's avatar
Dimitri van Heesch committed
39 40 41 42 43 44
class FormulaList : public QList<Formula>
{
  public:
    void generateBitmaps(const char *path);
};

Dimitri van Heesch's avatar
Dimitri van Heesch committed
45
/** Iterator for Formula objects in a FormulaList. */
Dimitri van Heesch's avatar
Dimitri van Heesch committed
46 47 48 49 50 51 52
class FormulaListIterator : public QListIterator<Formula>
{
  public:
    FormulaListIterator(const FormulaList &l) : 
      QListIterator<Formula>(l) {}
};

Dimitri van Heesch's avatar
Dimitri van Heesch committed
53
/** Unsorted dictionary of Formula objects. */
Dimitri van Heesch's avatar
Dimitri van Heesch committed
54 55 56 57 58
class FormulaDict : public QDict<Formula>
{
  public:
    FormulaDict(uint size) : 
      QDict<Formula>(size) {}
59
   ~FormulaDict() {}
Dimitri van Heesch's avatar
Dimitri van Heesch committed
60 61 62
};

#endif