An instance is a value of a particular type. Usually the term is reserved for objects -- an instance of a class -- but is used here to refer to values of any type. 5 is an instance of Number, for example. The toAccess property is of type Indirectedness, an enum explaining if this instance is a literal, like 5 or "hi world", or is in a local variable, etc.
コード例 #1
0
        __minor(instance continuous)
        {
            instance BacktrackRange range = new BacktrackRange(s);

            for (instance int iNode = 0; iNode < nodes.Length; iNode++)
            {
                range.Restore(s);

                bool ret;
                if (nodes[iNode].Nondeterministic)
                {
                    s.Success = true;
                    return(nodes[iNode].GetTester());

                    ret = s.Success;
                }
                else
                {
                    ret = nodes[iNode].Read(s);
                }

                if (ret)
                {
                    s.Success = true;
                    return(null);
                }
            }
            s.Success = false;
            break return(null);
        }
コード例 #2
0
        __minor(instance continuous)
        {
            instance Gen::Stack <BacktrackRange> capt_ch = new Gen::Stack <BacktrackRange>();

            while (capt_ch.Count != this.max)
            {
                capt_ch.Push(new BacktrackRange(s));
                if (!node.Read(s))
                {
                    capt_ch.Pop().Restore(s);
                    break;
                }
            }

            while (capt_ch.Count >= this.min)
            {
                s.Success = true;
                return(null);

                if (capt_ch.Count == 0)
                {
                    break;
                }
                capt_ch.Pop().Restore(s);
            }

            s.Success = false;
            break return(null);
        }
コード例 #3
0
        __minor(instance continuous)
        {
            for (instance int imatch = 0;; imatch++)
            {
                if (imatch >= this.min)
                {
                    s.Success = true;
                    return(null);
                }

                if (imatch == this.max)
                {
                    break;
                }

                s.Success = true;
                return(node.GetTester());

                if (!s.Success)
                {
                    break;
                }
            }
            s.Success = false;
            break return(null);
        }
コード例 #4
0
            public tester(int command, IDictionary <int, string> result)
            {
                _inst    = new instance();
                _command = command;

                _result = result;
            }
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            xmlCon = new XMLgeneratorConnection();
            xmlCon.OpenConnection();

            cbCourse.ItemsSource = xmlCon.ReadCourse(xmlCon.ReadCourse());

            constraints.constraint.Add(new Data.Model.Constraint());
            constraints.constraint[0].type = "period";
            instance = Engine.File.InstanceReader.Read();
        }
コード例 #6
0
        __minor(instance continuous)
        {
            for (instance int imatch = 0; imatch != this.max; imatch++)
            {
                s.Success = true;
                return(node.GetTester());

                if (!s.Success)
                {
                    break;
                }
            }

            s.Success = imatch >= this.min;
            break return(null);
        }
コード例 #7
0
        public static void GenerateXml(instance instance)
        {
            if (System.IO.File.Exists("instance.xml"))
            {
                System.IO.File.Delete("instance.xml");
            }

            var xns = new XmlSerializerNamespaces();

            xns.Add(string.Empty, string.Empty);

            XmlWriterSettings settings = new XmlWriterSettings();

            settings.Indent = true;

            using (XmlWriter writer = XmlWriter.Create("instance.xml", settings))
            {
                writer.WriteDocType("instance", null, "http://tabu.diegm.uniud.it/ctt/cb_ctt.dtd", null);
                var serializer = new XmlSerializer(instance.GetType());
                serializer.Serialize(writer, instance, xns);
            }
        }
        public static instance Read()
        {
            instance instance = new instance();

            if (System.IO.File.Exists("Instance.gxh"))
            {
                try
                {
                    string   filecontent = System.IO.File.ReadAllText("Instance.gxh");
                    string[] content     = filecontent.Split('#');
                    instance.name = content[0];
                    instance.descriptor.days.value            = content[1];
                    instance.descriptor.periods_per_day.value = content[2];
                    instance.descriptor.daily_lectures.min    = content[3];
                    instance.descriptor.daily_lectures.max    = content[4];
                }
                catch (Exception)
                {
                }
            }

            return(instance);
        }
コード例 #9
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            XMLgeneratorReader xmlreader = new XMLgeneratorReader();

            xmlreader.OpenConnection();


            instance             = InstanceReader.Read();
            instance.courses     = xmlreader.ReadCourse();
            instance.rooms       = xmlreader.ReadRoom();
            instance.curricula   = xmlreader.ReadCurriculum();
            instance.constraints = xmlreader.GenerateAllConstraints();

            try
            {
                XmlGeneratorFiles.GenerateXml(instance);
                txtXmlContent.Text = System.IO.File.ReadAllText("instance.xml");
                ShowNiceView();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
コード例 #10
0
 set => Properties[propertyName].SetValue(instance, value);
コード例 #11
0
 await validator.ValidateAsync(instance, options => {
コード例 #12
0
 set => properties.First(x => x.Name == property).SetValue(instance, value);
コード例 #13
0
 var(instance, success) = TryCreateInstanceSafe(t);
コード例 #14
0
ファイル: Extension.cs プロジェクト: ali-zare/Abi
 return(Get(ref instance, FastField <T, F> .Make(field)));
コード例 #15
0
 InvokeInjectMethodArray(instance, methodInfoArray, container);
コード例 #16
0
 LifecycleEvent?.Invoke(this, new ChangedEventArgs(instance, eventName));
コード例 #17
0
 (GetPropertyCache <T, TProperty>(name) as CachedPropertyOfStruct <T, TProperty>).Set(ref instance, value);
コード例 #18
0
 static statics()
 {
     _e = new instance();
 }
コード例 #19
0
 FillObjectMembers(instance, benchmarkCase);
コード例 #20
0
			static statics() {
				_e = new instance();
			}
コード例 #21
0
 _ => EvaluateBinary(instance, binary.Left, binary.Right),
コード例 #22
0
 return(new CallTargetReturn <TResponse>(HttpMessageHandlerCommon.OnMethodEnd(instance, responseMessage, exception, in state)));
コード例 #23
0
 return(base.ValidateAsync(instance as Staff, cancellation));
コード例 #24
0
			public tester(int command, IDictionary<int, string> result) {
				_inst = new instance();
				_command = command;

				_result = result;
			}