#ifndef __rf_box_ih__ #define __rf_box_ih__ #include "rf_box.hh" #include "rf_object.ih" #include "rf_expr.ih" #include namespace rfrt { extern const Expr empty ; } namespace rftype { using rfrt::empty ; inline Box::Box () : content (empty) {} inline Box::Box (Expr const& _expr) : content (_expr) {} inline Box::Box (Box const& _box) : Object (), content (_box.content) {} inline Box& Box::operator = (Box const& _box) { if (this != &_box) { this->~Box(); new(this) Box(_box); } return self; } inline unsigned Box::get_type () const { return reg.get_type(); } inline uint32_t Box::hash () const { return content.hash(); } inline bool Box::operator == (Object const& _obj) const { try { Box const& b = dynamic_cast(_obj); return content == b.content; } catch (std::bad_cast&) { return false; } } inline void Box::put (Expr const& _expr) { content = _expr; } inline Expr Box::get () const { return content; } inline pxx::WString Box::to_string () const { size_t max_len = hex_ptr_len + 10; char str[max_len]; int len = snprintf(str, max_len, ""); } } #endif // __rf_box_ih__