Example #1
0
 public PIMAssociationEnd(Project p, Guid g, PIMClass c, PIMSchema schema)
     : base(p, g)
 {
     schema.PIMAssociationEnds.Add(this);
     c.PIMAssociationEnds.Add(this);
     PIMClass = c;
 }
Example #2
0
 public PIMAssociationEnd(Project p, PIMClass c, PIMAssociation a, PIMSchema schema)
     : base(p)
 {
     schema.PIMAssociationEnds.Add(this);
     c.PIMAssociationEnds.Add(this);
     a.PIMAssociationEnds.Add(this);
     PIMClass       = c;
     PIMAssociation = a;
 }
Example #3
0
 public PIMGeneralization(Project p, Guid g, PIMSchema schema, PIMClass generalClass, PIMClass specificClass)
     : base(p, g)
 {
     schema.PIMGeneralizations.Add(this);
     General  = generalClass;
     Specific = specificClass;
     generalClass.GeneralizationsAsGeneral.Add(this);
     specificClass.GeneralizationAsSpecific = this;
 }
Example #4
0
 /// <summary>
 /// Constructs a PIMAttribute and registers it with schema <paramref name="schema"/> and inserts it into <see cref="PIMClass"/> <paramref name="c"/>. Also sets <see cref="Guid"/> to <paramref name="g"/>
 /// </summary>
 /// <param name="p">Project</param>
 /// <param name="g"><see cref="Guid"/> to be set</param>
 /// <param name="c"><see cref="PIMClass"/> to insert to</param>
 /// <param name="schema"><see cref="PIMSchema"/> to register with</param>
 public PIMAttribute(Project p, Guid g, PIMClass c, PIMSchema schema, int index = -1)
     : base(p, g)
 {
     schema.PIMAttributes.Add(this);
     if (index == -1)
     {
         c.PIMAttributes.Add(this);
     }
     else
     {
         c.PIMAttributes.Insert(this, index);
     }
     PIMClass = c;
 }
Example #5
0
        public override void FillCopy(IExolutioCloneable copyComponent, ProjectVersion projectVersion,
                                      ElementCopiesMap createdCopies)
        {
            base.FillCopy(copyComponent, projectVersion, createdCopies);

            PIMClass copyPIMClass = (PIMClass)copyComponent;

            this.CopyCollection(PIMAttributes, copyPIMClass.PIMAttributes, projectVersion, createdCopies);
            this.CopyCollection(PIMOperations, copyPIMClass.PIMOperations, projectVersion, createdCopies);
            this.CopyRefCollection(GeneralizationsAsGeneral, copyPIMClass.GeneralizationsAsGeneral, projectVersion, createdCopies, true);
            if (GeneralizationAsSpecific != null)
            {
                copyPIMClass.generalizationAsSpecificGuid = createdCopies.GetGuidForCopyOf(GeneralizationAsSpecific);
            }
            this.CopyRefCollection(PIMAssociationEnds, copyPIMClass.PIMAssociationEnds, projectVersion, createdCopies, true);
            copyPIMClass.Abstract = this.Abstract;
            copyPIMClass.Final    = this.Final;
        }