// // evaluate // Value * IsType_Method::evaluate (Ocl_Context & res, GAME::Mga::Object caller) { GAME::Mga::FCO obj = GAME::Mga::FCO::_narrow (caller); // Checking if the invoking object is a subtype bool type = obj->is_subtype (); return new Boolean_Value (type); }
// // evaluate // Value * IsType_Method::evaluate (Ocl_Context & res, Value * caller) { Object_Value * iv = dynamic_cast <Object_Value *> (caller); bool type = false; if (iv != 0) { GAME::Mga::Object val = iv->value (); GAME::Mga::FCO obj = GAME::Mga::FCO::_narrow (caller); // Checking if the invoking object is a subtype type = obj->is_subtype (); } return new Boolean_Value (type); }