Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » How to use EType "Sequence"
How to use EType "Sequence" [message #633954] Tue, 19 October 2010 23:36 Go to next message
hutzu  is currently offline hutzu
Messages: 15
Registered: September 2010
Junior Member
I design a stack.ecore and stack.ocl.
stack.ocl showing~
context Stack:: Stack():
post: stack = Sequence{}

context Stack::push(element: Integer):
post: stack = stack@pre->prepend(element)

context Stack::pop():
pre: stack@pre->size() > 0
post: stack = stack@pre->
subSequence(2, stack@pre->size())

context Stack::peek(): Integer
pre: stack@pre->size() > 0
post: result = stack@pre->first()

context Stack::size(): Integer
post: result = stack@pre->size()

and then i want to finish stack.ecore
i suddenly found ecore has no EType "Sequence"
i look for Package org.eclipse.ocl.ecore
it reallys had "SequenceType"
or how to extend it. thanks a lot
hutzu
Re: How to use EType "Sequence" [message #637537 is a reply to message #633954] Sat, 06 November 2010 06:24 Go to previous message
mercedes  is currently offline mercedes
Messages: 1
Registered: November 2010
Junior Member
Thanks for the help! By the way, is there any thread here for newbie like me? I really like to learn all this stuffs... Smile
Previous Topic:Checking the syntax of EMF query...
Next Topic:Howto make a bidirectional linking between two classes
Goto Forum:
  


Current Time: Wed Jul 30 09:13:25 EDT 2014

Powered by FUDForum. Page generated in 0.01890 seconds