Esempio n. 1
0
        public void remapGuids(ref Dictionary <string, string> guidMap)
        {
            if (!guidMap.ContainsKey(pA_guid) || !guidMap.ContainsKey(pB_guid))
            {
                return;
            }

            string old_pA_guid_key = ArchimatixUtils.guidToKey(pA_guid);
            string old_pB_guid_key = ArchimatixUtils.guidToKey(pB_guid);

            string new_pA_guid_key = ArchimatixUtils.guidToKey(guidMap[pA_guid]);
            string new_pB_guid_key = ArchimatixUtils.guidToKey(guidMap[pB_guid]);

            //Debug.Log("+++ remapGuids pA_guid: " + old_pA_guid_key + "==="+new_pA_guid_key);

            //Debug.Log("=====> expression_AB (old): " + expression_AB);
            // EXPRESSIONS

            if (expression_AB != null)
            {
                expression_AB = expression_AB.Replace(old_pA_guid_key, new_pA_guid_key);
            }
            if (expression_BA != null)
            {
                expression_BA = expression_BA.Replace(old_pB_guid_key, new_pB_guid_key);
            }

            // ACTUAL PARAMETER GUIDS
            // replace old guids in the strings with the new guids
            pA_guid = AXUtilities.swapOutGuids(pA_guid, ref guidMap);
            pB_guid = AXUtilities.swapOutGuids(pB_guid, ref guidMap);

            // later, swap guids in pA_expression && pB
        }
Esempio n. 2
0
        public AXRelation(AXParameter _pA, AXParameter _pB)
        {
            if (_pA != null && _pB != null)
            {
                //Debug.Log ("Adding relation :: "+_pA.Parent.Name+"."+_pA.Name+" "+_pB.Parent.Name+"."+_pB.Name);
                pA = _pA;
                pB = _pB;

                pA_guid = pA.Guid;
                pB_guid = pB.Guid;

                // one expression would normally want to be the inverse of the other:
                //expression_AB = "IN";
                //expression_BA = "IN";
                expression_AB = ArchimatixUtils.guidToKey(pA.Guid);
                expression_BA = ArchimatixUtils.guidToKey(pB.Guid);
            }
        }