Example #1
0
        public void processObjectVariable(SQLElement objectVariable)
        {
            SQLTaggedValue mocaTreeTag = EAEcoreAddin.Util.EAUtil.findTaggedValue(objectVariable, Main.MoflonExportTreeTaggedValueName);

            ObjectVariable ov = new ObjectVariable(objectVariable, repository);

            ov.loadTreeFromTaggedValue();

            SQLElement classifier = EAUtil.getClassifierElement(repository, objectVariable.ClassifierID);

            if (classifier != null)
            {
                Export.computeAndAddToDependencies(repository, classifier);
            }

            MocaNode ovMocaNode = new MocaNode();

            ovMocaNode.deserializeFromXmlTree(MocaTreeUtil.stringToXmlDocument(mocaTreeTag.Notes).DocumentElement.FirstChild as XmlElement);

            ov.addAttributesDuringExport(ovMocaNode);

            this.currentNode.appendChildNode(ovMocaNode);

            foreach (SQLConnector linkVariable in objectVariable.Connectors)
            {
                if ((linkVariable.Stereotype == SDMModelingMain.LinkVariableStereotype || linkVariable.Stereotype == "SDM_Association") && linkVariable.ClientID == objectVariable.ElementID)
                {
                    this.currentNode = ovMocaNode.getChildNodeWithName(ObjectVariable.OutgoingLinksNodeName);
                    processLinkVariable(linkVariable);
                }
            }
        }
Example #2
0
        public ObjectVariable importObjectVariable(SQLElement storyNode, MocaNode ovNode)
        {
            EA.Element ovElement = MainImport.getInstance().EcoreImport.getOrCreateElement(storyNode, ovNode, Main.EAObjectType);

            MocaNode outgoingLinksNode = ovNode.getChildNodeWithName(ObjectVariable.OutgoingLinksNodeName);

            if (outgoingLinksNode != null)
            {
                foreach (MocaNode outgoingLinkNode in outgoingLinksNode.Children)
                {
                    MainImport.getInstance().ConnectorNodeToParent.Add(outgoingLinkNode, ovElement);
                }
            }

            ObjectVariable ov = new ObjectVariable(sqlRep.GetElementByID(ovElement.ElementID), sqlRep);

            ov.deserializeFromMocaTree(ovNode);

            MainImport.getInstance().MocaTaggableElements.Add(ov);
            MainImport.getInstance().ElementGuidToElement.Add(ovElement.ElementGUID, ovElement);
            MainImport.getInstance().OldGuidToNewGuid.Add(ov.Guid, ovElement.ElementGUID);
            MainImport.getInstance().ObjectToTypeGuid.Add(ovElement, ov.TypeGuid);

            return(ov);
        }
Example #3
0
        internal override void ReGenerateProperties(List <MemberBinaryModelInfo> properties)
        {
            ObjectVariable <TType> objectVariable = (ObjectVariable <TType>)Variable;

            objectVariable.RebuildProperties(properties);
            Generateproperties();
        }
Example #4
0
        public OvDialog(SQLRepository repository, ObjectVariable objectVariable)
        {
            InitializeComponent();

            this.objectVariable = objectVariable;
            this.repository     = repository;

            DialogClosed = false;

            if (objectVariable is TGGObjectVariable || objectVariable is TGGCorrespondence)
            {
                this.ovBindingProvider = new TggOvExpressionProvider(objectVariable as TGGObjectVariable, repository);
            }
            else
            {
                this.ovBindingProvider = new OvExpressionProvider(objectVariable, repository);
            }



            //try to load ObjectVariable data from moca tree.
            this.objectVariable.loadTreeFromTaggedValue();

            this.ovPropertiesControl.initializeUserControl(repository, objectVariable, this);
            this.bindingControl.initializeInformation(ovBindingProvider, ovBindingProvider.getProviderExpression(), repository);

            this.StartPosition = FormStartPosition.CenterScreen;

            this.ovPropertiesControl.checkBoxBound.Checked = !this.ovPropertiesControl.checkBoxBound.Checked;
            this.ovPropertiesControl.checkBoxBound.Checked = !this.ovPropertiesControl.checkBoxBound.Checked;
        }
Example #5
0
        public void Test4()
        {
            ObjectVariableTerm x = new ObjectVariable('x');

            IndividualConstantTerm <RationalNumber> half =
                (IndividualConstant <RationalNumber>)(new RationalNumber(1, 2));

            IndividualConstantTerm <RationalNumber>
            one = (IndividualConstant <RationalNumber>)(new RationalNumber(1, 1));

            var pr1 = new PredicateFormula(Predicates.More, x, half);
            var pr2 = new PredicateFormula(Predicates.Less, x, one);

            var f1 = new PropositionalConnectiveFormula(Conjunction.GetInstance(), pr1, pr2);
            var f2 = new QuantifierFormula(ExistentialQuantifier.GetInstance(), x, f1);


            IndividualConstantTerm <int> two = new IndividualConstant <int>(2);
            var xSqr = new FunctionTerm(Functions.Pow, x, two);

            var pr3 = new PredicateFormula(Predicates.MoreZero, xSqr);
            var pr4 = new PredicateFormula(Predicates.EqualZero, x);

            var f3 = new PropositionalConnectiveFormula(Disjunction.GetInstance(), pr3, pr4);

            var f      = new PropositionalConnectiveFormula(Conjunction.GetInstance(), f2, f3);
            var actual = SimpleTarskiAlgorithm.QuantifiersElimination(f);

            Formula expected  = f3;
            Formula expected1 = new PropositionalConnectiveFormula(Disjunction.GetInstance(), pr4, pr3);

            Assert.IsTrue(expected.Equals(actual) || expected1.Equals(actual));
        }
        public void initializePossibleNamesComboBox(ObjectVariable objectVariable, SQLRepository repository)
        {
            this.objectVariable = objectVariable;
            this.repository     = repository;
            this.InternalList   = new ArrayList();
            this.addPossibleNamesToComboBox();

            this.Text = objectVariable.Name;
        }
Example #7
0
 public override void doRuleQuickFix(SQLElement eaElement, SQLWrapperClasses.SQLRepository repository, int i, String errorMessage)
 {
     if (i == 0)
     {
         ObjectVariable ov       = ObjectVariable.createCorrectOvType(eaElement, repository);
         OvDialog       ovDialog = new OvDialog(repository, ov);
         ovDialog.ShowDialog();
     }
 }
Example #8
0
 public InteractiveObjectTargettedVisualFeedback(PlayerAimingInteractiveObjectActionInherentData PlayerAimingInteractiveObjectActionInherentData, Camera mainCamera)
 {
     this.InteractiveObjectTargettedVisualFeedbackObject = new InteractiveObjectTargettedVisualFeedbackObject(
         new InteractiveObjectTargettedVisualFeedbackGameObject(null, PlayerAimingInteractiveObjectActionInherentData.InteractiveObjectTargettedVisualFeedbackPrefab),
         new InteractiveObjectTargettedVisualFeedbackObjectDefinition(PlayerAimingInteractiveObjectActionInherentData.InteractiveObjectTargettedVisualFeedbackAnimation));
     this.mainCamera = mainCamera;
     this.CurrentlyTargettedInteractiveObject = new ObjectVariable <CoreInteractiveObject>(this.OnCurrentSelectedInteractiveObjectChanged);
     this.Tick(0f);
 }
Example #9
0
        public void Setup(SetupSelfContainedClass setup)
        {
            ParentArray = setup.AddObjectVariable(new InternalVar("ParentArray", _supplier.Any()));
            Pathmap     = setup.AddObjectVariable(new InternalVar("OriginMap", _pathfinderTypes.Pathmap.Instance));
            Destination = setup.AddObjectVariable(new InternalVar("Destination", _supplier.Vector()));

            setup.ObjectScope.AddNativeMethod(PathfindFunction);
            setup.ObjectScope.AddNativeMethod(Next);
        }
        private void createThisObject()
        {
            EA.DiagramObject activityDiagramObject = EAEcoreAddin.Util.EAUtil.findDiagramObject(repository, activityTabsForm.ActivityNode.ActivityNodeEAElement.getRealElement(), currentSdmDiagram);
            SQLElement       sdmContainer          = repository.GetElementByID(activityTabsForm.ActivityNode.ActivityNodeEAElement.ParentID);
            SQLElement       containingEClass      = repository.GetElementByID(sdmContainer.ParentID);

            String b = "";
            String r = "";
            String l = "";
            String t = "";

            //compute the coordinates of the new diagramObject according to the StoryNode
            if (evacuated == Main.FalseValue)
            {
                b = "" + (activityDiagramObject.bottom + 20);
                r = "" + (activityDiagramObject.left + 110);
                l = "" + (activityDiagramObject.left + 20);
                t = "" + (activityDiagramObject.bottom + 70);
            }
            //compute the coordinates of the new diagramObject with static values
            else if (evacuated == Main.TrueValue)
            {
                b = "" + 60;
                r = "" + 100;
                l = "" + 10;
                t = "" + 10;
            }
            //create a new EA.Element which represents our new this ObjectVariable
            EA.Element obj = (EA.Element)activityTabsForm.ActivityNode.ActivityNodeEAElement.getRealElement().Elements.AddNew("this", Main.EAObjectType);
            obj.Name         = "this";
            obj.ParentID     = activityTabsForm.ActivityNode.ActivityNodeEAElement.ElementID;
            obj.ClassifierID = containingEClass.ElementID;
            obj.Update();

            //set the default values for the xml representation of the objectVariable
            ObjectVariable objectVariable = new ObjectVariable(repository.GetElementByID(obj.ElementID), repository);

            objectVariable.BindingState     = BindingState.BOUND;
            objectVariable.BindingSemantics = BindingSemantics.MANDATORY;
            objectVariable.BindingOperator  = BindingOperator.CHECK_ONLY;
            objectVariable.saveTreeToEATaggedValue(true);


            //create new diagramObject with the computed coordinates
            EA.DiagramObject diaObj = (EA.DiagramObject)currentSdmDiagram.DiagramObjects.AddNew("l=" + l + ";r=" + r + ";t=" + t + ";b=" + b, Main.EAObjectType);
            diaObj.ElementID = obj.ElementID;
            diaObj.Update();

            //this is required since EA 10.
            if (activityDiagramObject != null)
            {
                activityDiagramObject.Sequence = int.MaxValue;
                activityDiagramObject.Update();
            }
            repository.ReloadDiagram(currentSdmDiagram.DiagramID);
        }
Example #11
0
 protected virtual void Awake()
 {
     tileBoard = FindObjectOfType <TileBoardController>();
     TileController.AnyClicked += OnAnyTileClicked;
     swapDurationVar            = tileSwapVals.GetVariable("swapDuration") as FloatVariable;
     swapEnabledVar             = tileSwapVals.GetVariable("swapEnabled") as BooleanVariable;
     cancelAxisVar              = tileSwapVals.GetVariable("cancelAxis") as StringVariable;
     airTileVar           = gameVals.GetVariable("airTileType") as ObjectVariable;
     AnyPhysicalSwapMade += this.OnAnyPhysicalSwapMade;
 }
Example #12
0
        public static string setOvMethodCallExpressionGui(ObjectVariable ov)
        {
            SQLTaggedValue mceVisTag = EAUtil.findTaggedValue(ov.sqlElement, ObjectVariable.MceVisualizationTaggedValueName);


            Expression BindingExpression = ov.BindingExpression;

            if (BindingExpression != null)

            {
                deletePossibleBindingConnectors(ov.sqlElement.getRealElement());

                if (BindingExpression is MethodCallExpression)
                {
                    var mcE = BindingExpression as MethodCallExpression;

                    ObjectVariableExpression firstOvExpression = null;

                    if (mcE.OwnedParameterBinding.Count == 1 && (mceVisTag == null || mceVisTag.Value == "true"))
                    {
                        foreach (ParameterBinding paramBinding in mcE.OwnedParameterBinding)
                        {
                            if (paramBinding.ValueExpression is ObjectVariableExpression)
                            {
                                firstOvExpression = paramBinding.ValueExpression as ObjectVariableExpression;
                            }
                        }

                        if (firstOvExpression != null)
                        {
                            EA.Element firstOvEaElement = ov.Repository.GetOriginalRepository().GetElementByGuid(firstOvExpression.ObjectVariableGUID);

                            if (firstOvEaElement.ParentID == ov.sqlElement.ParentID)
                            {
                                EA.Connector bindingLink = firstOvEaElement.Connectors.AddNew("", Main.EADependencyType) as EA.Connector;
                                bindingLink.Stereotype = SDMModelingMain.BindingExpressionLinkStereotype;
                                bindingLink.Name       = mcE.Target + "." + mcE.MethodName;
                                bindingLink.SupplierID = ov.sqlElement.ElementID;
                                bindingLink.Update();
                                EA.Element realElement = ov.sqlElement.getRealElement();
                                realElement.Connectors.Refresh();
                                realElement.Notes = "";
                                realElement.Update();

                                EAUtil.setTaggedValue(ov.Repository, realElement, ObjectVariable.BindingExpressionOutputTaggedValueName, "");

                                return("");
                            }
                        }
                    }
                }
                return(BindingExpression.ToString());
            }
            return("");
        }
Example #13
0
        public SkillSlot(CoreInteractiveObject AssociatedInteractiveObject, InteractiveObjectActionPlayerSystem interactiveObjectActionPlayerSystem, ref SKillSlotUIPositionInput SKillSlotUIPositionInput,
                         InputID AssociatedInput)
        {
            this.AssociatedInteractiveObject          = AssociatedInteractiveObject;
            this._interactiveObjectActionPlayerSystem = interactiveObjectActionPlayerSystem;
            this.AssociatedInput = AssociatedInput;
            this.SkillSlotUI     = new SkillSlotUI(ref SKillSlotUIPositionInput);
            this.CurrentPlayerActionInherentData = new ObjectVariable <InteractiveObjectActionInherentData>(this.OnCurrentPlayerActionInherentDataChanged);

            this.SkillSlotUI.SetInputText(InputControlLookup.GetInputControlRawName(InputControlLookup.FindTheFirstInputControlForInputID(this.AssociatedInput)));
        }
Example #14
0
        private EA.Element createThisOv(EA.Element thisActivity)
        {
            EA.Element thisObject = thisActivity.Elements.AddNew("this", "Object") as EA.Element;
            thisObject.ClassifierID = this.oldSDMContainer.ParentID;
            thisObject.Update();
            ObjectVariable ov = new ObjectVariable(sqlRepository.GetElementByID(thisObject.ElementID), sqlRepository);

            ov.BindingState = BindingState.BOUND;
            ov.saveTreeToEATaggedValue(true);
            return(thisObject);
        }
Example #15
0
        public void initializePossibleNamesComboBox(ObjectVariable objectVariable, SQLRepository repository)
        {
            this.objectVariable = objectVariable;
            this.repository     = repository;
            this.InternalList   = new ArrayList();
            this.addPossibleNamesToComboBox();

            this.Text = objectVariable.Name;

            this.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
            this.AutoCompleteMode   = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
        }
Example #16
0
        public FiringPlayerActionTargetSystem(PlayerAimingInteractiveObjectActionInherentData playerAimingInteractiveObjectActionInherentDataRef, CoreInteractiveObject firingInteractiveObject, TargetCursorManager targetCursorManagerRef)
        {
            this._targetCursorManagerRef     = targetCursorManagerRef;
            this.FiringInteractiveObject     = firingInteractiveObject;
            this.TargetPlaneGameObject       = GameObject.Instantiate(playerAimingInteractiveObjectActionInherentDataRef.FiringHorizontalPlanePrefab);
            this.TargetPlaneGameObject.layer = LayerMask.NameToLayer(LayerConstants.FIRING_ACTION_HORIZONTAL_LAYER);
            this.DottedVisualFeeback         = GameObject.Instantiate(playerAimingInteractiveObjectActionInherentDataRef.GroundConeVisualFeedbackPrefab);

            /// Until it's first update, the DottedVisualFeeback is set far away from screen.
            this.DottedVisualFeeback.transform.position = new Vector3(99999f, 99999f, 99999f);

            this.CurrentlyTargettedInteractiveObject = new ObjectVariable <CoreInteractiveObject>(this.OnCurrentlyTargettedInteractiveObjectChange);
        }
Example #17
0
        public static List <ObjectVariable> getSDMObjectVariablesInActivity(Activity activity, SQLRepository repository)
        {
            List <ObjectVariable> ovs = new List <ObjectVariable>();
            String sdmOvQuery         = repository.SQLQuery("select a.Name, max(a.Classifier) as Classifier from t_object a, t_object b, t_object c where ( a.Stereotype = '" + SDMModelingMain.ObjectVariableStereotype + "' ) and a.ParentID = b.Object_ID and b.ParentID = c.Object_ID and c.Object_ID = " + activity.SdmContainer.ElementID + "and (c.Stereotype = '" + SDMModelingMain.SdmContainerStereotype + "') group by a.Name");

            foreach (String row in EAEcoreAddin.Util.EAUtil.getXMLNodeContentFromSQLQueryString(sdmOvQuery, "Row"))
            {
                SQLElement     actOV = new SQLElement(repository, row);
                ObjectVariable ov    = new ObjectVariable(actOV, repository);
                ovs.Add(ov);
            }
            return(ovs);
        }
Example #18
0
        public bool Equals(ObjectVariable <T>?other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(EqualityComparer <T> .Default.Equals(Value, other.Value));
        }
        private void addPossibleNamesToComboBox()
        {
            List <ObjectVariable> listOfOvs        = new List <ObjectVariable>();
            List <EParameter>     listOfParameters = new List <EParameter>();

            if (objectVariable is TGGObjectVariable)
            {
                TGGRule tggRule = objectVariable.StoryPattern as TGGRule;
                listOfOvs = SDMUtil.getTGGObjectVariablesInTggRule(tggRule, repository);
            }
            else if (objectVariable is ObjectVariable)
            {
                Activity activity = objectVariable.StoryPattern.ParentStoryNode.OwningActivity;
                listOfOvs = SDMUtil.getSDMObjectVariablesInActivity(activity, repository);
                try
                {
                    foreach (EParameter eParameter in objectVariable.StoryPattern.ParentStoryNode.OwningActivity.OwningOperation.EParameters)
                    {
                        listOfParameters.Add(eParameter);
                    }
                }
                catch
                {
                }
            }
            ObjectVariable ovToDelete = null;

            foreach (ObjectVariable ov in listOfOvs)
            {
                if (ov.Name == this.objectVariable.ObjectVariableEA.Name)
                {
                    ovToDelete = ov;
                }
            }
            listOfOvs.Remove(ovToDelete);
            InternalList.AddRange(listOfOvs);
            InternalList.AddRange(listOfParameters);

            foreach (Object possibleObject in InternalList)
            {
                if (possibleObject is ObjectVariable)
                {
                    this.Items.Add((possibleObject as ObjectVariable).Name);
                }
                else if (possibleObject is EParameter)
                {
                    this.Items.Add((possibleObject as EParameter).Name);
                }
            }
        }
Example #20
0
 public static void assignmentsToConstraints(ObjectVariable ov, SQLRepository repository)
 {
     foreach (AttributeAssignment aAssignment in ov.AttributeAssignments)
     {
         Constraint           constraint = new Constraint(repository);
         ComparisonExpression compExp    = new ComparisonExpression(repository);
         compExp.Operator                = ComparingOperator.EQUAL;
         compExp.LeftExpression          = new AttributeValueExpression(repository, repository.GetAttributeByGuid(aAssignment.AttributeGUID), ov.sqlElement);
         compExp.RightExpression         = aAssignment.ValueExpression;
         constraint.ConstraintExpression = compExp;
         ov.Constraints.Add(constraint);
     }
     ov.AttributeAssignments.Clear();
 }
 public override void doRuleQuickFix(SQLElement eaElement, SQLWrapperClasses.SQLRepository repository, int i, String errorMessage)
 {
     if (i == 0)
     {
         EA.Element realElement = eaElement.getRealElement();
         SQLElement classifier  = repository.GetElementByID(eaElement.ClassifierID);
         realElement.Name = classifier.Name.Substring(0, 1).ToLower() + classifier.Name.Substring(1, classifier.Name.Length - 1);
         realElement.Update();
     }
     else if (i == 1)
     {
         ObjectVariable ov       = ObjectVariable.createCorrectOvType(eaElement, repository);
         OvDialog       ovDialog = new OvDialog(repository, ov);
         ovDialog.ShowDialog();
     }
 }
Example #22
0
        public void ZeroEqualZero()
        {
            ObjectVariableTerm x = new ObjectVariable('x');

            IndividualConstantTerm <int> zero = (IndividualConstant <int>) 0;

            var pr = new PredicateFormula(Predicates.Equal, zero, zero);

            var f = new QuantifierFormula(UniversalQuantifier.GetInstance(), x, pr);

            var actual = SimpleTarskiAlgorithm.QuantifiersElimination(f);

            var expected = new PredicateFormula(True.GetInstance());

            Assert.AreEqual(expected, actual);
        }
Example #23
0
        public static void constraintsToAssignments(ObjectVariable ov, SQLRepository repository)
        {
            foreach (Constraint constraint in ov.Constraints)
            {
                AttributeAssignment assignment = new AttributeAssignment(repository);
                assignment.ValueExpression = (constraint.ConstraintExpression as ComparisonExpression).RightExpression;

                AttributeValueExpression left = (constraint.ConstraintExpression as ComparisonExpression).LeftExpression as AttributeValueExpression;

                assignment.AttributeGUID = left.AttributeGUID;
                assignment.AttributeName = left.AttributeName;

                ov.AttributeAssignments.Add(assignment);
            }
            ov.Constraints.Clear();
        }
Example #24
0
        public void Test1()
        {
            ObjectVariableTerm x = new ObjectVariable('x');

            IndividualConstantTerm <RationalNumber> half =
                (IndividualConstant <RationalNumber>)(new RationalNumber(1, 2));

            var formula1 = new PredicateFormula(Predicates.More, x, half);

            var formula2 = new QuantifierFormula(ExistentialQuantifier.GetInstance(), x, formula1);

            var res = SimpleTarskiAlgorithm.QuantifiersElimination(formula2);

            var expected = new PredicateFormula(True.GetInstance());

            Assert.AreEqual(expected, res);
        }
        public void initializeUserControl(SQLRepository repository, ObjectVariable objectVariable, IOVDialog ovDialog)
        {
            //Set class variables
            this.repository     = repository;
            this.objectVariable = objectVariable;
            this.ovDialog       = ovDialog;

            this.comboNames.ComboTypes = this.comboTypes;
            this.comboNames.CbxBound   = this.checkBoxBound;

            this.comboTypes.initializePossibleClassifiersComboBox(objectVariable.sqlElement.Stereotype, objectVariable.sqlElement.ClassifierID, repository);
            this.comboNames.initializePossibleNamesComboBox(objectVariable, repository);

            setAppearance();

            this.comboNames.Select();
        }
Example #26
0
        public MocaNode processTggObjectVariable(SQLElement objectVariable)
        {
            SQLTaggedValue mocaTreeTag = EAEcoreAddin.Util.EAUtil.findTaggedValue(objectVariable, Main.MoflonExportTreeTaggedValueName);

            ObjectVariable ov = null;

            if (objectVariable.Stereotype == TGGModelingMain.TggObjectVariableStereotype)
            {
                ov = new TGGObjectVariable(objectVariable, repository);
            }
            else if (objectVariable.Stereotype == TGGModelingMain.TggCorrespondenceStereotype)
            {
                ov = new TGGCorrespondence(objectVariable, repository);
            }
            SQLElement classifier = repository.GetElementByID(objectVariable.ClassifierID);

            ExportMain.computeAndAddToDependencies(repository, classifier);

            MocaNode ovMocaNode = new MocaNode();

            ovMocaNode.deserializeFromXmlTree(MocaTreeUtil.stringToXmlDocument(mocaTreeTag.Notes).DocumentElement.FirstChild as XmlElement);

            ov.addAttributesDuringExport(ovMocaNode);

            this.currentNode.appendChildNode(ovMocaNode);

            foreach (SQLConnector linkVariable in objectVariable.Connectors)
            {
                try
                {
                    SQLElement source = repository.GetElementByID(linkVariable.ClientID);
                    SQLElement target = repository.GetElementByID(linkVariable.SupplierID);

                    if ((linkVariable.Stereotype == TGGModelingMain.TggLinkVariableStereotype || linkVariable.Type == Main.EAAssociationType) && linkVariable.ClientID == objectVariable.ElementID)
                    {
                        this.currentNode = ovMocaNode.getChildNodeWithName(ObjectVariable.OutgoingLinksNodeName);
                        processTggLinkVariable(linkVariable);
                    }
                }
                catch
                {
                }
            }
            return(ovMocaNode);
        }
Example #27
0
        public FiringLockSelectionSystem(Action <CoreInteractiveObject> OnNewInteractiveObjectTargettedCallback)
        {
            this.GameInputManager = GameInputManager.Get();
            this.AllSelectableTargettedInteractiveObject = new List <CoreInteractiveObject>();
            this.OnNewInteractiveObjectTargettedCallback = OnNewInteractiveObjectTargettedCallback;
            this.CurrentlyTargettedInteractiveObject     = default;

            this.CurrentlyTargettedInteractiveObject = new ObjectVariable <CoreInteractiveObject>(
                OnObjectValueChanged: this.OnCurrentlytargettedObjectChanged
                );
            this.InitializeEvents();

            /// Initialization
            foreach (var cursorIntersectedInteractiveObject in InteractiveObjectCursorScreenIntersectionManager.Get().IntersectingInteractiveObjects)
            {
                this.OnCursorOverObject(cursorIntersectedInteractiveObject);
            }
        }
Example #28
0
        private static void CheckOrder(Symbol left, Symbol right)
        {
            var err = left switch
            {
                Comma _ => (right is Comma),
                ArithmeticBinaryFunction _ => (right is ArithmeticBinaryFunction),
                ArithmeticPredicate _ => (right is ArithmeticPredicate),
                ObjectVariable _ => (right is ObjectVariable),
                IndividualConstant <BigInteger> _ => (right is IndividualConstant <BigInteger>),
                Quantifier _ => (right is Quantifier),
                BinaryPropositionalConnective _ => (right is BinaryPropositionalConnective),
                _ => false
            };

            if (err)
            {
                throw new ArgumentException($"symbols {left} and {right} cannot be placed side by side");
            }
        }
Example #29
0
        public override List <String> doRule(SQLElement eaElement, SQLWrapperClasses.SQLRepository repository)
        {
            List <String> results = new List <string>();

            if (eaElement.Stereotype == SDMModelingMain.ObjectVariableStereotype ||
                eaElement.Stereotype == TGGModelingMain.TggObjectVariableStereotype ||
                eaElement.Stereotype == TGGModelingMain.TggCorrespondenceStereotype)
            {
                ObjectVariable ov = new ObjectVariable(eaElement, repository);
                ov.loadTreeFromTaggedValue();
                if (ov.BindingExpression != null)
                {
                    if (!ConsistencyUtil.checkExpression(eaElement, ov.BindingExpression, repository))
                    {
                        results.Add("BindingExpression is Invalid: (" + ov.BindingExpression.ToString() + ")");
                    }
                }
            }
            return(results);
        }
Example #30
0
        public override void ResolveElements()
        {
            if (elementsResolved)
            {
                return;
            }
            base.ResolveElements();

            // Set ParentArray
            ParentArray = AddObjectVariable(new InternalVar("ParentArray"));

            // Set Pathmap
            Pathmap = AddObjectVariable(new InternalVar("OriginMap"));

            // Set Destination
            Destination = AddObjectVariable(new InternalVar("Destination"));

            serveObjectScope.AddNativeMethod(PathfindFunction);
            serveObjectScope.AddNativeMethod(Next);
        }