|
Re: [MOFScript] undefined properties [message #377491 is a reply to message #377488] |
Fri, 11 May 2007 11:42 |
Eclipse User |
|
|
|
Originally posted by: eric.vepa.gmail.com
Hi Andy,
I am not using MOFScript but in ATL you can use the function
oclIsUndefined().
Your code may look like (do not forget the "not") :
if (not self.p.oclIsUndefined()) {
self.p.name
)
Andy Carpenter wrote:
> I have an input meta model for which one of the classes
> has a property that does not required a value. Thus, I
> want to make the generation of the output conditional
> on whether or not a value is defined in the input model.
>
> i.e something along the lines
>
> if (self.p.oclIsDefined()) {
> self.p.name
> }
>
> However, it appears that oclIsDefined is not among
> the ocl functions defined in MOFScript. How is this
> situation handled in MOFScript?
>
> thanks
> Andy.
>
--
Éric Vépa
|
|
|
|
|
Re: [MOFScript] undefined properties [message #596155 is a reply to message #377488] |
Fri, 11 May 2007 11:42 |
Eclipse User |
|
|
|
Originally posted by: eric.vepa.gmail.com
Hi Andy,
I am not using MOFScript but in ATL you can use the function
oclIsUndefined().
Your code may look like (do not forget the "not") :
if (not self.p.oclIsUndefined()) {
self.p.name
)
Andy Carpenter wrote:
> I have an input meta model for which one of the classes
> has a property that does not required a value. Thus, I
> want to make the generation of the output conditional
> on whether or not a value is defined in the input model.
>
> i.e something along the lines
>
> if (self.p.oclIsDefined()) {
> self.p.name
> }
>
> However, it appears that oclIsDefined is not among
> the ocl functions defined in MOFScript. How is this
> situation handled in MOFScript?
>
> thanks
> Andy.
>
--
Éric Vépa
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04581 seconds