Title: | DECmcc user notes file. Does not replace IPMT. |
Notice: | Use IPMT for problems. Newsletter location in note 6187 |
Moderator: | TAEC::BEROUD |
Created: | Mon Aug 21 1989 |
Last Modified: | Wed Jun 04 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 6497 |
Total number of notes: | 27359 |
We're looking at adding some capabilities to a model that will allow the creation of multiple entity instances at once. We already have defined a Generate verb for when multiple instances of a single class are to be created. Suppose we have Root A1 B1 B2 B3 B4 We want a command that will allow an A2 sub-tree to be created with instances whose identifers and attributes are the same as the children of A1, resulting in Root A1 A2 B1 B2 B3 B4 B1 B2 B3 B4 For the sake of consistency across the models, we're looking to see if any existing models already support such a sub-tree copy operation, and if so what verb is used. We're considering COPY or CLONE, or COPY_SUBTREE.
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
2189.1 | why not create? | TOOK::CALLANDER | MCC = My Constant Companion | Fri Jan 24 1992 12:03 | 6 |
why wouldn't you use the create command, maybe with a module specific argument like "from=A1". create class root subclass a2 from = a1 | |||||
2189.2 | Copy seems better | BLUMON::SYLOR | Architect = Buzzword Generator | Tue Jan 28 1992 21:20 | 7 |
Re .1: Shudder, no, that's ****not**** how to do it. With EMA V1 (today's Common Agent and MCC base) I'd define an action, call it Copy, and have a "Destination" argument of type LocalEntityName and a "Copy Decendents" argument of type BOOLEAN. Mark | |||||
2189.3 | We'll go with Copy | COOKIE::KITTELL | Richard - Architected Info Mgmt | Wed Jan 29 1992 14:25 | 28 |
RE: .1 > why wouldn't you use the create command, maybe with a module > specific argument like "from=A1". Jill, We thought about using Create, and rejected it for a couple of reasons. First, we try to limit what a directive does, preferring to add a new directive once the functionality really gets extended. We try to look at each argument to a directive and ask whether it modifies *how* the directive does what it does, or whether the argument fundamentally changes *what* the directive does. If it is the latter, we go looking for a different directive. Second, our model already has an alternative way of creating instances, called Generate. Generate creates n instances of one specific class, and is only used where it is practical for the agent to select the instance ids. I try to give first preference to verbs that are already defined in MCC_VEA_DEF.H, and I noticed COPY was there. On your specific suggestion of using a directive argument of From, I try to steer us away from arguments that are prepositions, as they only invite confusion with qualifiers, where-the-comma-goes, etc. Thanks for the responses, all. Richard | |||||
2189.4 | I like copy | TOOK::CALLANDER | MCC = My Constant Companion | Fri Jan 31 1992 11:12 | 4 |
Good reasoning Rich, I do like Marks copy command though. It seems clean, and domain FM already sets a preceidence for using that. | |||||
2189.5 | Copy it is | COOKIE::KITTELL | Richard - Architected Info Mgmt | Fri Jan 31 1992 12:18 | 2 |
We're going to use Copy. |