#ifndef SCALAR_H
#define SCALAR_H

#include "symbol.h"

class State;

class Scalar : public Symbol
{
public :

    Scalar(const Frost::s_str& sName) : Symbol(sName), v(Frost::s_double::NaN) {}
    Scalar(const Frost::s_str& sName, const Frost::s_double& dValue) : Symbol(sName), v(dValue) {}

    virtual Frost::s_str PrintContent() const;
    virtual Frost::s_str GetType() const;
    virtual Frost::s_refptr<Symbol> Clone() const;

    static Frost::s_bool           IsNumber(const Frost::s_str& s);
    static Frost::s_bool           MatchesConstructor(const Frost::s_str& s);
    static Frost::s_refptr<Symbol> CreateFrom(State& mState, const Frost::s_str& n, const Frost::s_str& s, Frost::s_str& e);
    static void                    Register(State& mState);

    Frost::s_double v;
    static const Frost::s_str TYPE;
};

#endif
