namespace Eva { public class UInt : Object, Term, Numeric { public ulong value {get; construct;} public int int_value { get { return (int)value; } } public uint uint_value { get { return (uint)value; } } public long long_value { get { return (long)value; } } public ulong ulong_value { get { return value; } } public double double_value { get { return value; } } public UInt(ulong v) { Object(value: v); } public string to_string() { return value.to_string(); } protected bool do_match(Term o, Gee.Map vars, Gee.Map aliases) { if(o is Var) { return o.do_match(this, vars, aliases); } if(o is Int) { return value == (o as Int).value; } else if(o is UInt) { return value == (o as UInt).value; } else { return false; } } internal void encode(Buffer buffer) { buffer.buffer.encode_ulong(value); } } }