[Developers] Creating your own data subdirectory in the tree

Bert Bril Bert.Bril at opendtect.org
Tue Oct 17 11:43:14 CEST 2006


Hi,

In 2.5.2 there is also a new facility which allows plugin makers with
special data types to put those in their own subdirectory of the survey
directory. The new directory will then be treated like any first-class
data subdirectory with all IOM() and IOObj support.

It works like this. At plugin init you request the IOM() that you want a
certain directory with a certain ID. If it is not yet there, IOM() will
create it, otherwise it will do nothing. At change of survey, that is
repeated (so you don't need to worry about it at all). To add your own
data types, you can simply use 2 macros.

I have created an example plugin that illustrates the procedure. Because
the plugin as such is totally useless, it wasn't included in the
release, but you can download it here:
ftp://ftp.opendtect.org/pub/devel/uiowniodir.tar.gz


The advantage of this above simple file-based solutions is that you can
select objects without file selection problems, just like users are used
to in OpendTect.

BTW: if your 'special datatype' would be a wavelet, hold on because I'm
making import/creation facilities which will be in 2.5.3. In fact,
OpendTect already has already had wavelets + storage for a long time
(see Seis/wavelet.h) but there was no way to import them (because there
was nothing that used them yet we didn't bother).


/Bert

-- 
-- Bert Bril / OpendTect developer at dGB
-- Nijverheidstraat 11-2, 7511 JM Enschede, The Netherlands
-- mailto:Bert.Bril at opendtect.org , http://opendtect.org
-- Tel: +31 534315155 , Fax: +31 534315104




More information about the Developers mailing list