|
Re: simple type wrapper classes pattern? [message #424338 is a reply to message #424311] |
Thu, 23 October 2008 15:01 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Jakob,
Comments below.
jakob wrote:
> Dear EMFers,
>
> I am doing a mapping from models created in modeling schemas in a
> language that allows the creation of Interfaces that can be
> implemented by either a class or a simple datatype (yeah, I know this
> probably sounds strange).
Yes, I don't really know what it means. :-P
> Is there a recommended pattern to create primitive Datatype EClass
> wrappers that is efficient and compatible with CDO / Teneo?
EMF provides SimpleAnyType which generally provides a wrapper for any
EDataType's instance to make it appear like an EObject. It's a bit
similar I guess to Java's "box" types for primitives. The idea is you
can use setInstanceType to specify the type of data value being wrapped
and then use setValue to set a value. The ability to convert the value
to and from a string is used to serialize and deserialize the result.
I think Teneo and CDO support this.
>
> Thank you for any hints in advance
> Cheers
> Jakob
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02680 seconds