MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - Objects collection
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Objects collection

 Post Reply Post Reply
Author
Message
Saivignesh View Drop Down
Contributor
Contributor


Joined: 01.May.2017
Location: Netherlands
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Saivignesh Quote  Post ReplyReply Direct Link To This Post Topic: Objects collection
    Posted: 10.May.2017 at 14:38
I have object A and object B. Is it possible to have a property of an Object C which is a collection of Object A and Object B?
Back to Top
jpt View Drop Down
MetaCase
MetaCase
Avatar

Joined: 25.Mar.2008
Points: 239
Answer Answer
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpt Quote  Post ReplyReply Direct Link To This Post Posted: 10.May.2017 at 15:00
Yes, if they are in the same type hierarchy. You could also have one abstract type '_Object' as supertype for Object A and Object B and then use that abstract type in the collection.

In some exceptional circumstances it may be desirable to specify the supertype of all the types of that metatype, e.g. Object: you can do this by selecting the metatype from the pull-down list with shift held down, and that metatype will then be included in the list of types to select from. For details see Collection properties.

For an example, see in demo repository 'EAST-ADL' project and there definition of 'FeatureFlaw' object type. It has a collection property 'nonFullFilledRequirements' that refers to hierarchy (of requirements).
Back to Top
Saivignesh View Drop Down
Contributor
Contributor


Joined: 01.May.2017
Location: Netherlands
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Saivignesh Quote  Post ReplyReply Direct Link To This Post Posted: 10.May.2017 at 15:17
Object A and Object B are separate objects. Is it possible then?
Back to Top
jpt View Drop Down
MetaCase
MetaCase
Avatar

Joined: 25.Mar.2008
Points: 239
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpt Quote  Post ReplyReply Direct Link To This Post Posted: 10.May.2017 at 19:27
Yes, if they are in the same type hierarchy, e.g. Object A is supertype of B, or they have common supertype. Supertype would be then the item of the collection. For subtyping please see also discussion on subtyping after creation of Object Type.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.05
Copyright ©2001-2022 Web Wiz Ltd.

This page was generated in 0.061 seconds.