Beispiel #1
0
        private void ExtractMapData(string line, int numOfTasks, Validations validations)
        {
            if (LocalCommunication.MapMatrix == null && line.StartsWith(CffKeywords.LOCAL_COMMUNICATION_MAP))
            {
                // Check the MAP format is valid
                bool   isValidMapFormat = RegexValidation.RegexMap(line, validations);
                string returnedMap      = null;

                if (isValidMapFormat)
                {
                    returnedMap = validations.ValidateStringPair(
                        line,
                        TaffKeywords.ALLOCATION_MAP);
                }

                if (returnedMap != null)
                {
                    LocalCommunication.MapData   = new Map(returnedMap);
                    LocalCommunication.MapMatrix = LocalCommunication.MapData.ConvertToMatrix(
                        numOfTasks,
                        numOfTasks,
                        validations);
                }
            }
        }
Beispiel #2
0
        private void ExtractMapData(string line, Validations validations)
        {
            if (AllocationMapData == null && line.StartsWith(TaffKeywords.ALLOCATION_MAP))
            {
                // Check the MAP format is valid
                bool isValidMapFormat = RegexValidation.RegexMap(line, validations);

                if (isValidMapFormat)
                {
                    AllocationMapData = validations.ValidateStringPair(
                        line,
                        TaffKeywords.ALLOCATION_MAP);
                }
            }
        }