Commit Graph

7 Commits

Author SHA1 Message Date
Vinícius Garcia
8bc48c01e0 Add 2 utility functions to packToken
The functions are:
- bool packToken::asBool()
- packToken::operator TokenBase*()
2016-06-02 12:57:28 -03:00
Vinícius Garcia
4605387411 Add subscript operator to packToken to simplify MAP access 2016-04-25 12:24:54 -03:00
Vinícius Garcia
36866d0af6 Adapt packToken to work with the MAP type 2016-04-25 11:50:49 -03:00
Vinícius Garcia
03b4e17adc Update packToken to fit strings 2016-04-20 14:28:35 -03:00
Vinícius Garcia
976ef66292 Add copy assignment operator to packToken 2016-04-18 15:36:17 -03:00
Vinícius Garcia
0bb17555b7 Replace the token map value class for the packToken type
This change allow to the user of the `TokenMap_t` to:
- Implicit instantiate a BaseToken* from a double.
- Explicit (and safely) convert a BaseToken* to a double.
- Make use of `cout << map["var"]`
- Make use of a serialization function `str()`

The packToken class is not intended to be used on the internals
of the calculate and compile functions, because it would add
some unnecessary function calls everytime a Token is accessed,
but it is useful to simplify the Token access for the API user.
2016-04-18 15:03:41 -03:00
Vinícius Garcia
e88858c1b9 Add first version of the TokenBase* facade: packToken 2016-04-18 05:24:26 -03:00