[ome-devel] enum type for acqusition enums

Bernhard Holländer bernhard.hollaender at gmail.com
Thu May 28 07:50:03 BST 2009


Hi Josh!

Well, I was looking for enum types which define the possible values of
the enums in the *.ome.xml files. I would have used them in a switch
construct to get the corresponding string value.

Anyways, thanks for the answer - good to know that I can add values to
the enum types in the db.

Best wishes! Bernhard

On Wed, May 27, 2009 at 5:49 PM,  <josh.moore at gmx.de> wrote:
>
> Bernhard Holländer writes:
>  > Hi!
>
> Hi, Bernhard,
>
>  > Quick question: are there enum types in OmeroCpp that match the
>  > enums defined in acquisition.ome.xml?
>
> There's possibly some confusion here. There are both enumerations in
> Ice and in the OMERO object model. The enums in the *.ome.xml files
> become omero.model classes in OmeroCpp. For example,
>
>        <enum id="ome.model.enums.FilterType">
>                <entry name="LongPass"/>
>                <entry name="ShortPass"/>
>                <entry name="BandPass"/>
>                <entry name="MultiPass"/>
>                <entry name="Other"/>
>                <entry name="Unknown"/>
>        </enum>
>
> becomes omero::model::FilterType, and the entries are created as rows
> in your db on initialization. Other values can then be added as
> necessary via omero::api::ITypePrx.
>
> To use them in a graph which you are passing to the server, it
> suffices to have an unloaded value with the proper id, or conversely,
> an object with only the "value" field loaded:
>
>  FilterTyprPtr ft = new FilterType();
>  ft->setValue( rstring("LongPass") );
>
> Ice enumerations, on the other hand, are generated as static fields:
>
>  https://trac.openmicroscopy.org.uk/omero/browser/trunk/examples/OmeroClients/enumerations.cpp
>
> Hope that clears things up.
> ~Josh.
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>


More information about the ome-devel mailing list