[MOAB-dev] ***NOTE*** MBInterface::load_file API change

Jed Brown jed at 59A2.org
Fri Nov 13 15:20:20 CST 2009


Jason Kraftcheck wrote:
> In check-in r3343, I changed the signature of MBInterface::load_file in such
> a way that it will break any existing code outside of MOAB that is calling
> that function.
> 
> MOAB no longer creates an entity set for each file read operation.  Thus
> load_file had to change because the previously required reference to an
> MBEntityHandle via which that entity set was returned to the caller no
> longer makes sense.  Instead, load_file accepts a "const MBEntityHandle*"
> which may be, and defaults to, NULL.  To obtain the previous behavior of
> having the contents of the file placed in an entity set, the caller must
> *create* an entity set and pass in the address of the handle.

The only reason this is a const pointer instead of a value is so that
you can pass NULL?  If you pass NULL, doesn't everything just go into
the root set?  Why not actually use the root set for this purpose?  (I
know it's merely cosmetic, but it looks peculiar.)

Jed

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20091113/f000a44d/attachment.pgp>


More information about the moab-dev mailing list