상속: BaseClassIfc
예제 #1
0
        protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options)
        {
            if (mRepresentationContexts.Count > 0)
            {
                JArray array = new JArray()
                {
                };
                foreach (IfcRepresentationContext representationContext in RepresentationContexts)
                {
                    array.Add(representationContext.getJson(this, options));
                }
                obj["RepresentationContexts"] = array;
            }
            IfcUnitAssignment unitsInContext = UnitsInContext;

            if (unitsInContext != null)
            {
                obj["UnitsInContext"] = unitsInContext.getJson(this, options);
            }
            base.setJSON(obj, host, options);
            setAttribute(obj, "ObjectType", ObjectType);
            setAttribute(obj, "LongName", LongName);
            setAttribute(obj, "Phase", Phase);

            if (mIsDefinedBy.Count > 0 && options.Style != SetJsonOptions.JsonStyle.Repository)
            {
                JArray array = new JArray();
                foreach (IfcRelDefinesByProperties rdp in mIsDefinedBy)
                {
                    array.Add(rdp.getJson(this, options));
                }
                obj["IsDefinedBy"] = array;
            }
            if (mDeclares.Count > 0)
            {
                JArray array = new JArray()
                {
                };
                foreach (IfcRelDeclares declare in Declares)
                {
                    if (declare.RelatedDefinitions.Count > 0)
                    {
                        array.Add(declare.getJson(this, options));
                    }
                }
                if (array.Count > 0)
                {
                    obj["Declares"] = array;
                }
            }
        }
예제 #2
0
        protected override void setJSON(JObject obj, BaseClassIfc host, HashSet <int> processed)
        {
            base.setJSON(obj, host, processed);
            setAttribute(obj, "ObjectType", ObjectType);
            setAttribute(obj, "LongName", LongName);
            setAttribute(obj, "Phase", Phase);

            if (mRepresentationContexts.Count > 0)
            {
                JArray array = new JArray()
                {
                };
                foreach (IfcRepresentationContext representationContext in RepresentationContexts)
                {
                    array.Add(representationContext.getJson(this, processed));
                }
                obj["RepresentationContexts"] = array;
            }
            IfcUnitAssignment unitsInContext = UnitsInContext;

            if (unitsInContext != null)
            {
                obj["UnitsInContext"] = unitsInContext.getJson(this, processed);
            }
            //INVERSE
            //public List<IfcRelDefinesByProperties> IsDefinedBy { get { return mIsDefinedBy; } }
            if (mDeclares.Count > 0)
            {
                JArray array = new JArray()
                {
                };
                foreach (IfcRelDeclares declare in Declares)
                {
                    if (declare.RelatedDefinitions.Count > 0)
                    {
                        array.Add(declare.getJson(this, processed));
                    }
                }
                if (array.Count > 0)
                {
                    obj["Declares"] = array;
                }
            }
        }
예제 #3
0
 internal IfcUnitAssignment(DatabaseIfc db, IfcUnitAssignment u) : base(db)
 {
     u.mUnits.ForEach(x => AddUnit(db.Factory.Duplicate(u.mDatabase[x]) as IfcUnit));
 }
예제 #4
0
 internal IfcUnitAssignment(DatabaseIfc db, IfcUnitAssignment u) : base(db)
 {
     Units = u.mUnits.ConvertAll(x => db.Factory.Duplicate(u.mDatabase[x]) as IfcUnit);
 }
예제 #5
0
 internal IfcUnitAssignment(DatabaseIfc db, IfcUnitAssignment u) : base(db)
 {
     Units.AddRange(u.Units.ConvertAll(x => db.Factory.Duplicate(u.mDatabase[x.Index]) as IfcUnit));
 }
예제 #6
0
파일: IFC C.cs 프로젝트: jenca-cloud/ggIFC
		protected IfcContext(DatabaseIfc m, string name, IfcUnitAssignment.Length length) : base(m)
		{
			Name = name;
			if (m.mGeomRepContxt != null)
				mRepresentationContexts.Add(m.mGeomRepContxt.mIndex);
			IfcUnitAssignment u = new IfcUnitAssignment(m);
			u.SetUnits(length);
			mUnitsInContext = u.mIndex;
			mIsDecomposedBy.Clear(); //??? Jon
		}
예제 #7
0
 internal static void parseFields(IfcUnitAssignment a, List<string> arrFields, ref int ipos)
 {
     a.mUnits = ParserSTEP.SplitListLinks(arrFields[ipos++]);
 }
예제 #8
0
파일: IFC P.cs 프로젝트: jenca-cloud/ggIFC
		public IfcProject(IfcBuilding building, string name, IfcUnitAssignment.Length length) : this(building.mDatabase, name, length) { IfcRelAggregates ra = new IfcRelAggregates(building.mDatabase, "Project", "Building", this, building); }
예제 #9
0
 internal IfcUnitAssignment(DatabaseIfc db, IfcUnitAssignment u)
     : base(db)
 {
     Units = u.mUnits.ConvertAll(x => db.Factory.Duplicate(u.mDatabase[x]) as IfcUnit);
 }
예제 #10
0
 internal IfcUnitAssignment(DatabaseIfc db, IfcUnitAssignment u) : base(db)
 {
     Units.AddRange(u.Units.Select(x => db.Factory.Duplicate <IfcUnit>(x)));
 }
예제 #11
0
파일: IFC U.cs 프로젝트: jenca-cloud/ggIFC
		internal IfcUnitAssignment(IfcUnitAssignment v) : base() { mUnits = new List<int>(v.mUnits.ToArray()); }
예제 #12
0
파일: IFC P.cs 프로젝트: jenca-cloud/ggIFC
		public IfcProjectLibrary(DatabaseIfc m, string name, IfcUnitAssignment.Length length)
			: base(m, name, length)
		{
			if (m.ModelView == ModelView.Ifc4Reference || m.ModelView == ModelView.Ifc2x3Coordination)
				throw new Exception("Invalid Model View for IfcProjectLibrary : " + m.ModelView.ToString());
			if (string.IsNullOrEmpty(Name))
				Name = "UNKNOWN PROJECTLIBRARY";
		}
예제 #13
0
파일: IFC P.cs 프로젝트: jenca-cloud/ggIFC
		private IfcProject(DatabaseIfc m, string name, IfcUnitAssignment.Length length)
			: base(m, name, length)
		{
			m.mContext = this;
			if (string.IsNullOrEmpty(Name))
				Name = "UNKNOWN PROJECT";
		} 
예제 #14
0
파일: IFC P.cs 프로젝트: jenca-cloud/ggIFC
		public IfcProject(IfcSite site, string name, IfcUnitAssignment.Length length) : this(site.mDatabase, name, length) { IfcRelAggregates ra = new IfcRelAggregates(site.mDatabase, "Project", "Site", this, site); }
예제 #15
0
 internal static void parseFields(IfcUnitAssignment a, List <string> arrFields, ref int ipos)
 {
     a.mUnits = ParserSTEP.SplitListLinks(arrFields[ipos++]);
 }
예제 #16
0
 internal static IfcUnitAssignment Parse(string strDef)
 {
     IfcUnitAssignment a = new IfcUnitAssignment(); int ipos = 0; parseFields(a, ParserSTEP.SplitLineFields(strDef), ref ipos); return a;
 }
예제 #17
0
 internal static IfcUnitAssignment Parse(string strDef)
 {
     IfcUnitAssignment a = new IfcUnitAssignment(); int ipos = 0; parseFields(a, ParserSTEP.SplitLineFields(strDef), ref ipos); return(a);
 }
예제 #18
0
 internal IfcUnitAssignment(IfcUnitAssignment v) : base()
 {
     mUnits = new List <int>(v.mUnits.ToArray());
 }