-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRule.h
35 lines (33 loc) · 895 Bytes
/
Rule.h
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
#ifndef RULE_H
#define RULE_H
#include "Rulefwd.hpp"
#include "Cmd.h"
#include "Lexer.h"
#include "Parser.h"
#include <list>
#include <memory>
#include <stdexcept>
class Rule {
friend class Lsystem;
public:
void readruleoptions(Lexer &lex);
void setcmds(Commands&& newcmds);//!!! pass copy move
void evaluateExpressions(const Context &cc) const;
double getLocalScale() const;
const Commands & getCommands() const;
bool doesNotDraw() const;
bool drawsInvisibly() const;
bool isFixed() const;
bool shouldFix() const;
private:
Commands _commands;
// std::unique_ptr<Parsenode> _rectWidthExpression;
std::unique_ptr<Parsenode> _localScaleExpression;
bool _drawsInvisibly=false;
bool _doesNotDraw=false;
bool _isFixed=false;
bool _shouldFix=true;
// mutable double _rectWidth=0.05;
mutable double _localScale=1.0;
};
#endif