Book a Demo

Author Topic: Defining my own datatype  (Read 5658 times)

dirah

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Defining my own datatype
« on: February 06, 2008, 06:25:50 am »
Hello,

I am currently trying to define a custom datatype and the in-built help of EA is not offering what I need.
As far as I know the UML you should be able to create a new datatype by using the stereotype «datatype» inside a class-definition. You can adress attributes and operations to the datatype. EA is not offering this stereotype in class definitions although it is possible to use previously defined classes as a datatype (i.e. when defining arguments of operations).

How am I supposed to define a new datatype that should belong to no programming language (language: <none>)? Just by defining a regular class? Should I just add the stereotype «datatype» to that class? Why isn't EA offering the regular stereotypes that are defined by the UML?!

I hope my problem has become clear, otherwise please ask me for more details or explanations.

Greetings,

dirah

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Defining my own datatype
« Reply #1 on: February 06, 2008, 06:31:23 am »
I first noticed this omission in EA 4 - it was probably there all along, but that's when I started using EA for more than the simplest models.

While I'd like to see this rectified, there is a workaround of sorts. You can create your own 'language' using the Settings | Code Datatypes dialog. You can either enter a new datatype for one of the standard complement of languages, or you can create a new 'product' of your own.

HTH, David
No, you can't have it!

dirah

  • EA Novice
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: Defining my own datatype
« Reply #2 on: February 06, 2008, 06:42:27 am »
thank you for your quick reply.
I am wondering how XMI-exports of models defining custom datatypes in that way are compliant to this standard!

I would appreciate as much compliance to the UML- (and XMI-)standard as possible as I am trying to do some difficult transformations between several tools of model drive software development to and from EA in the future


Rhadamanthus

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Defining my own datatype
« Reply #3 on: February 27, 2008, 09:37:02 am »
You can use the «primitive» designation for such types.

UML defines «primitive», i.e., PrimitiveType, as a specialization of DataType (see Figure 7.13).  However, the standard is unclear on the difference between the two--its example in Figure 7.36 of Integer as «dataType» appears to contradict its later designation of Integer as «primitive» in sections 7.3.43 and 17.4.2.  (All references to the standard assume UML 2.1.2.)