Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Non-compiling, non-working WIP commit. Towards supporting math expres…
…sions in GUI code.
- Loading branch information
1 parent
2dabb9b
commit 4fa50d3
Showing
8 changed files
with
778 additions
and
57 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
#include <parser/DefTokeniser.h> | ||
|
||
namespace gui | ||
{ | ||
|
||
class GuiExpression; | ||
typedef std::shared_ptr<GuiExpression> GuiExpressionPtr; | ||
|
||
// Represents an expression found in the GUI code, which can be | ||
// a simple float, a string, a gui variable or a complex formula. | ||
class GuiExpression | ||
{ | ||
private: | ||
|
||
public: | ||
GuiExpression(); | ||
|
||
virtual float getFloatValue() = 0; | ||
virtual std::string getStringValue() = 0; | ||
|
||
static GuiExpressionPtr createFromString(const std::string& exprStr); | ||
|
||
static GuiExpressionPtr createFromTokens(parser::DefTokeniser& tokeniser); | ||
}; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.