internal override void ParseXml(XmlElement xml) { base.ParseXml(xml); foreach (XmlNode child in xml.ChildNodes) { string name = child.Name; if (string.Compare(name, "BenchmarkValues") == 0) { foreach (XmlNode cn in child.ChildNodes) { IfcConstraint constraint = mDatabase.ParseXml <IfcConstraint>(cn as XmlElement); if (constraint != null) { AddBenchmark(constraint); } } } } if (xml.HasAttribute("LogicalAggregator")) { Enum.TryParse <IfcLogicalOperatorEnum>(xml.Attributes["LogicalAggregator"].Value, true, out mLogicalAggregator); } if (xml.HasAttribute("ObjectiveQualifier")) { Enum.TryParse <IfcObjectiveEnum>(xml.Attributes["ObjectiveQualifier"].Value, true, out mObjectiveQualifier); } if (xml.HasAttribute("UserDefinedQualifier")) { UserDefinedQualifier = xml.Attributes["UserDefinedQualifier"].Value; } }
internal static void parseFields(IfcObjective m, List<string> arrFields, ref int ipos, ReleaseVersion schema) { IfcConstraint.parseFields(m, arrFields, ref ipos,schema); m.mBenchmarkValues = ParserSTEP.SplitListLinks(arrFields[ipos++]); string s = arrFields[ipos++]; if (s[0] == '.') m.mLogicalAggregator = (IfcLogicalOperatorEnum)Enum.Parse(typeof(IfcLogicalOperatorEnum), s.Substring(1, s.Length - 2)); m.mObjectiveQualifier = (IfcObjectiveEnum)Enum.Parse(typeof(IfcObjectiveEnum), arrFields[ipos++].Replace(".", "")); m.mUserDefinedQualifier = arrFields[ipos++].Replace("'", ""); }
public void AddBenchmark(IfcConstraint benchmark) { mBenchmarkValues.Add(benchmark.mIndex); }
public IfcObjective(IfcConstraint benchmark, string name, IfcConstraintEnum constraint, IfcObjectiveEnum qualifier) : base(benchmark.mDatabase, name, constraint) { AddBenchmark(benchmark); mObjectiveQualifier = qualifier; }
public IfcResourceConstraintRelationship(string name, string description, IfcConstraint constraint, List<IfcResourceObjectSelect> related) : base(constraint.mDatabase, name, description) { mRelatingConstraint = constraint.mIndex; mRelatedResourceObjects = related.ConvertAll(x => x.Index); }
public IfcResourceConstraintRelationship(string name, string description, IfcConstraint constraint, IfcResourceObjectSelect related) : this(name, description, constraint, new List<IfcResourceObjectSelect>() { related }) { }
public IfcRelAssociatesConstraint(IfcDefinitionSelect related, string intent, IfcConstraint c) : base(related) { if (!string.IsNullOrEmpty(intent)) mIntent = intent.Replace("'", ""); mRelatingConstraint = c.Index; }
internal IfcRelAssociatesConstraint(string intent, IfcConstraint c) : base(c.mDatabase) { if (!string.IsNullOrEmpty(intent)) mIntent = intent.Replace("'", ""); mRelatingConstraint = c.Index; }
internal static void parseFields(IfcConstraint a, List<string> arrFields, ref int ipos, Schema schema) { a.mName = arrFields[ipos++].Replace("'", ""); a.mDescription = arrFields[ipos++].Replace("'", ""); a.mConstraintGrade = (IfcConstraintEnum)Enum.Parse(typeof(IfcConstraintEnum), arrFields[ipos++].Replace(".", "")); a.mConstraintSource = arrFields[ipos++].Replace("'", ""); a.mCreatingActor = ParserSTEP.ParseLink(arrFields[ipos++]); if (schema == Schema.IFC2x3) a.mSSCreationTime = ParserSTEP.ParseLink(arrFields[ipos++]); else a.mCreationTime = arrFields[ipos++].Replace("'", ""); a.mUserDefinedGrade = arrFields[ipos++].Replace("'", ""); }
protected IfcConstraint(IfcConstraint c) : base() { mName = c.mName; mDescription = c.mDescription; mConstraintGrade = c.mConstraintGrade; mConstraintSource = c.mConstraintSource; mCreatingActor = c.mCreatingActor; mCreationTime = c.mCreationTime; mSSCreationTime = c.mSSCreationTime; mUserDefinedGrade = c.mUserDefinedGrade; }