19 #ifndef GNASH_AS_VALUE_H
20 #define GNASH_AS_VALUE_H
24 #include <boost/variant.hpp>
26 #include <boost/utility/enable_if.hpp>
27 #include <boost/cstdint.hpp>
53 static const double NaN = std::numeric_limits<double>::quiet_NaN();
59 return isNaN(num - num);
123 _value(boost::blank())
141 _value(std::string(str))
148 _value(std::string(str))
152 template <
typename T>
188 const char*
typeOf()
const;
346 _type =
static_cast<AsType>(
static_cast<int>(_type) + 1);
352 _type =
static_cast<AsType>(
static_cast<int>(_type) - 1);
408 typedef boost::variant<boost::blank,
417 bool operator==(
const as_value&
v)
const;
420 bool operator!=(
const as_value&
v)
const;
426 bool equalsSameType(
const as_value&
v)
const;
440 DisplayObject* getCharacter(
bool skipRebinding =
false)
const;
450 double getNum()
const {
452 return boost::get<double>(_value);
458 bool getBool()
const {
460 return boost::get<bool>(_value);
466 const std::string& getStr()
const {
468 return boost::get<std::string>(_value);
517 #endif // GNASH_AS_VALUE_H