diff options
| author | mrwastl <mrwastl@users.sourceforge.net> | 2011-05-12 00:54:19 +0200 |
|---|---|---|
| committer | mrwastl <mrwastl@users.sourceforge.net> | 2011-05-12 00:54:19 +0200 |
| commit | 9f56ff279316b1d82d5639e47d587a37dbd6b0c8 (patch) | |
| tree | 2cf3213ec048bde596606e530dd255016d1d39c4 /glcdskin/variable.h | |
| parent | b6ca1969785782cf4d6e58f78563804e6812b3e6 (diff) | |
| download | graphlcd-base-9f56ff279316b1d82d5639e47d587a37dbd6b0c8.tar.gz graphlcd-base-9f56ff279316b1d82d5639e47d587a37dbd6b0c8.tar.bz2 | |
variable values that represent functions are now evaluated at run time
Diffstat (limited to 'glcdskin/variable.h')
| -rw-r--r-- | glcdskin/variable.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/glcdskin/variable.h b/glcdskin/variable.h index 449f6b0..fdeebbc 100644 --- a/glcdskin/variable.h +++ b/glcdskin/variable.h @@ -18,6 +18,7 @@ #include "display.h" #include "object.h" +#include "function.h" namespace GLCD { @@ -34,6 +35,7 @@ private: std::string mId; cType mValue; cSkinFunction * mCondition; + cSkinFunction * mFunction; cSkinDisplay mDummyDisplay; cSkinObject mDummyObject; @@ -45,7 +47,8 @@ public: cSkin * Skin(void) const { return mSkin; } const std::string & Id(void) const { return mId; } - const cType & Value(void) const { return mValue; } +// const cType & Value(void) const { return mValue; } + const cType & Value(void) { if (mFunction != NULL) { mValue = mFunction->Evaluate(); } return mValue; } ; cSkinFunction * Condition(void) const { return mCondition; } }; |
