Esempio n. 1
0
 //Constructors
 /// <summary>
 /// Creates an initialized instance.
 /// </summary>
 /// <param name="taskDefaultsCfg">The default configurations of the readout unit tasks.</param>
 /// <param name="readoutUnitsCfg">The configuration of the readout units.</param>
 /// <param name="oneTakesAllGroupsCfg">The configuration of the "One Takes All" groups.</param>
 public ReadoutLayerSettings(TaskDefaultsSettings taskDefaultsCfg,
                             ReadoutUnitsSettings readoutUnitsCfg,
                             OneTakesAllGroupsSettings oneTakesAllGroupsCfg = null
                             )
 {
     TaskDefaultsCfg      = (TaskDefaultsSettings)taskDefaultsCfg.DeepClone();
     ReadoutUnitsCfg      = (ReadoutUnitsSettings)readoutUnitsCfg.DeepClone();
     OneTakesAllGroupsCfg = (OneTakesAllGroupsSettings)oneTakesAllGroupsCfg?.DeepClone();
     Check();
     return;
 }
Esempio n. 2
0
        /// <summary>
        /// Creates an initialized instance.
        /// </summary>
        /// <param name="elem">A xml element containing the configuration data.</param>
        public ReadoutLayerSettings(XElement elem)
        {
            //Validation
            XElement settingsElem = Validate(elem, XsdTypeName);

            //Parsing
            //Cluster
            TaskDefaultsCfg = new TaskDefaultsSettings(settingsElem.Element("taskDefaults"));
            //Readout units
            XElement readoutUnitsElem = settingsElem.Elements("readoutUnits").First();

            ReadoutUnitsCfg = new ReadoutUnitsSettings(readoutUnitsElem);
            //One-takes-all groups
            XElement oneTakesAllGroupsElem = settingsElem.Elements("oneTakesAllGroups").FirstOrDefault();

            OneTakesAllGroupsCfg = oneTakesAllGroupsElem == null ? null : new OneTakesAllGroupsSettings(oneTakesAllGroupsElem);
            Check();
            return;
        }
Esempio n. 3
0
 /// <summary>
 /// The deep copy constructor.
 /// </summary>
 /// <param name="source">The source instance.</param>
 public OneTakesAllGroupsSettings(OneTakesAllGroupsSettings source)
     : this(source.OneTakesAllGroupCfgCollection)
 {
     return;
 }