[jacorb-developer] JacOrb extracting enum values

Phil Mesnier mesnierp at objectcomputing.com
Fri Mar 10 12:06:43 CET 2017


Hi Dimitris,

Can you show us the code that is causing your trouble?

Are you using IDL enums, or Java Enums?

The point behind enums is that they represent an ordered collection of
discrete identities. The values used to represent these identities is an
implementation detail. So it sounds like you are overthinking the problem.
Perhaps for your use case an enum isn't the correct type to use.

Let see your failing code and go from there. Don't just send a line or two,
can you make a representative IDL, Client, and Server that illustrates what
you are trying, but failing to do?


On Fri, Mar 10, 2017 at 3:54 AM, Dimitris Zampouras <dzampouras at gmail.com>
wrote:

> Hello everyone!
>
> I am new to Corba and I am having a hard time extracting an enum value
> from an any object.
>
> From what I have gathered an enum value holds some data members like an
> array containing all the enum types.
> I suppose there should be some kind of integer inside the Any that shows
> which one of the enums it refers to.
>
> The problem is that I cannot extract from the enum Any that int value. All
> integer extractions fail( the long too etc.).
>
> Am I in the correct path here? Do you have any sample code that can help?
>
> I am currently using JacOrb 3.8 and Java 1.7
>
> Prior to changing to JacOrb I could extract the integer value from the
> enum type
>
> Thank you in advance!
>
> dzamp
>
> _______________________________________________
> jacorb-developer maillist  -  jacorb-developer at lists.spline.
> inf.fu-berlin.de
> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>



-- 

Phil Mesnier
Principal Engineer & Partner
OCI | WE ARE SOFTWARE ENGINEERS.
tel (314) 579-0066 x225 <(314)%20579-0066>
ObjectComputing.com
<http://objectcomputing.com/>


More information about the jacorb-developer mailing list