[Developers] Compile test results

Bert Bril bert.bril at gmail.com
Wed Sep 23 09:20:05 CEST 2009


Hello all,

I forgot to post this earlier. Here is a 'report' of trying to compile 
3.2 plugins with 4.0. It tries to show how the interfaces have changed, 
and why. Of course there may be more changes, but this is what the test 
picked up.



* SI().xyInFeet() and depthsInFeetByDefault() introduced.
Pressure from the USA has made us support feet better. This is a rather 
tricky business, and we came up with the following rules:
1) Everything is and will be, internally, in meters.
2) The only exception is depth seismic data, which is stored in the Z 
unit of the survey. Basically, we will not make any effort to convert 
depth seismic data.
The SI().zInFeet() remains the same: it only returns true if the survey 
is in depth and in feet.
For time surveys, you now know whether to display depths in feet when 
popping up a window. Still, you have to expect the depth values in for 
example wells to be in meters - always.

* BufferStringSet::deepErase() has gone.
Background: we noticed that the ability for BufferStringSet's to also be 
able to store pointers to unmanaged BufferString* objects was never 
used. Thus, we simplified the interface, making the BufferStringSet a 
'ManagedObjectSet'. This interface supports the OD::Set::erase(), which 
does the 'right' thing - in this case deepErase the set.
Therefore: replace with 'erase()'.

* uiIOObjSel::commitInput(bool) was changed to uiIOObjSel::commitInput()
This boolean was always predictable: you want a new object when riting, 
not one when you're reading.
Therefore: remove the argument or use the 'new style'.
New style: Now you can use uiIOObjSel without having a CtxtIOObj as 
class member. The class manages it's own CtxtIOObj now, and you can 
simply ask the result in the end with key(), ioobj() or getIOObj(). 
These will become the methods of preference, replacing the old-style 
with commitInput() (which is done implicitly by the mentioned 
functions). We find the new style much easier to use.

* The mGetCtxtIOObj was removed.
Background: See previous, in the 'new style', you can use:
horfld_ = new uiIOObjSel( this, is2d ? mIOObjContext(EMHorizon2D)
                              : mIOObjContext(EMHorizon3D), "Horizon" );
You only specify the context, and later you ask for the result:
const IOObj* selobj = horfld_->ioobj();

* Still more static class constants have been changed to static constant 
functions.
This was necessary for the M$ Visual Studio port. For example, already 
in 3.3 Color::Black was changed to Color::Black().

* uiAttrDescEd::getInpFld() is now uiAttrDescEd::getInpFld(bool,const char*)
Background: You now have to specify whether the field is to be for 2D 
attributes (or cubes). You can also specify your own selection text (but 
that's optional).

* Attrib::DescSet doesn't have 'clone()' anymore.
The function has been replaced by proper '=' operator and copy 
constructor as there are no subclasses.

* PickSetTranslator::retrieve(Pick::Set&, const IOObj*&, BufferString&)
has been changed to:
PickSetTranslator::retrieve(Pick::Set&, const IOObj*, bool, BufferString&)
Therefore: the extra bool can be set to false if you are not interested 
in directions (Pick::Location can also contain a direction).

* PosInfo::CubeData has no deepCopy() anymore.
Background: Similar to BufferStringSet, PosInfo::CubeData is now a
ManagedObjectSet<LineData>.
Therefore: use a copy constructor or use erase() and append().




Bert





More information about the Developers mailing list