Hi Dave Rich :
in a seperate topic ( sorry, i dont remember where i saw it), you mentioned to use :
if ( obj.get_type() == obj::get_object_type()) to check if the obj_type is “is_a” relation with base_object_type below. Could you elaborate it ?
I understand the different between static function and no_static function, but dont understand the idea behind above IF statement.
class obj_type extends base_obj_type;
....
endclass
…
obj_type obj;
obj = obj_type::type_id::create("obj", this );
if ( obj.get_type() == obj::get_object_type())
is_a relation with base_obj_type;
returns true if obj holds a handle to an object that is a obj_type.
The difference is that get_type() is a virtual method. If obj holds a handle to an object whose class type is an extension of the obj_type class type, it will return the extended class type.
Note that obj_type::get_object_type() and obj.get_object_type() are equivalent calls to a static method.