[gme-users] getTypeInhObject() returns "null"

Thompson, Robert C robert.c.thompson3 at boeing.com
Mon Sep 5 16:37:30 CDT 2005


In interacting with BON API, I've encountered a situation where the
invocation of BON::FCO::getTypeInhObject() returns an instance of
BON::TypeInhObject "t" such that the expression:  " ! t " evaluates to
true, i.e., it seems like I'm not getting a proper instance of the
TypeInhObjectImpl underneath the hood (I think).

What's odd is that my BON::FCO instance on which I'm trying to invoke
this method seems to be fully working/populated as far as other methods
go ( getName(), getParent(), etc...).  

The BON::FCO instance in question was generated using the copy
contructor that takes a BON::Object instance as argument:

	FCO( const Object& object );

The object instance that I'm passing in I got from a call to
BON::Object::getParent() on another instance of BON::Object.

I.e. something like the following:  

BON::FCO a ( some_obj->getParent() );	// some_obj is an instance of
BON::TypeInhObject t = a->getTypeInhObject();
if( !t ) { ... } // "..." gets evaluated, because "t" seems to be no
good :-(

Other methods on some_obj work fine, so I'm pretty sure it's a "good"
instance...  Also, other methods on "a" seem to work ok too (as I
mentioned above)...

I am expecting that every FCO would return an instance of
BON::TypeInhObject, because the GME User Manual says the following on
page 204: 

"For each fco in a project there is a BON::Type or BON::Instance object
with which the user can obtain information about the fco regarding the

So I can only assume I'm doing something wrong in my code.  Can anyone
shed any light on what might be causing this to happen?

Ace Thompson
Systems and Software Engineer
FCS LSI C4ISR Battle Command
robert.c.thompson3 at boeing.com
+1 480 891 2284
The Boeing Company

More information about the gme-users mailing list