-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLSystem.h
More file actions
47 lines (36 loc) · 1.09 KB
/
LSystem.h
File metadata and controls
47 lines (36 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef L_SYSTEM_H
#define L_SYSTEM_H
#include <QObject>
#include <QAbstractItemModel>
#include <QList>
#include <QHash>
#include <QSet>
class Variable;
class VariableSequence;
class VariableSequenceModel;
class VariableSequenceListModel;
class LSystem : public QObject {
Q_OBJECT
public:
LSystem(QObject* parent = 0);
~LSystem();
int getNumVariables() const;
int getNumAxioms() const;
void addVariable(Variable* variable);
Variable* getVariable(QString& name);
Variable* getVariable(int index);
bool variableExists(const QString& name) const;
void changeVariableName(const QString& originalName, const QString& newName);
VariableSequenceModel* getVariableModel();
VariableSequenceListModel* getAxiomModel();
VariableSequence* getAxiom(int index);
void addAxiom(VariableSequence* axiom);
bool axiomExists(const QString& name) const;
void changeAxiomName(const QString& originalName, const QString& newName);
private:
VariableSequenceModel* _variableModel;
QHash<QString, Variable*>* _variableLookup;
VariableSequenceListModel* _axioms;
QSet<QString> _axiomNames;
};
#endif // L_SYSTEM_H