public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _relatingItem = (IfcClassificationItem)(value.EntityVal);
                return;

            case 1:
                _relatedItems.InternalAdd((IfcClassificationItem)value.EntityVal);
                return;

            default:
                throw new XbimParserException(string.Format("Attribute index {0} is out of range for {1}", propIndex + 1, GetType().Name.ToUpper()));
            }
        }
        public void IfcParse(int propIndex, IPropertyValue value)
        {
            switch (propIndex)
            {
            case 0:
                _relatingItem = (IfcClassificationItem)value.EntityVal;
                break;

            case 1:
                ((IXbimNoNotifyCollection)_relatedItems).Add((IfcClassificationItem)value.EntityVal);
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }
Пример #3
0
        public override bool Equals(object obj)
        {
            // Check for null
            if (obj == null)
            {
                return(false);
            }

            // Check for type
            if (this.GetType() != obj.GetType())
            {
                return(false);
            }

            // Cast as IfcRoot
            IfcClassificationItem root = (IfcClassificationItem)obj;

            return(this == root);
        }
 public void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _relatingItem = (IfcClassificationItem) value.EntityVal;
             break;
         case 1:
             ((IXbimNoNotifyCollection)_relatedItems).Add((IfcClassificationItem) value.EntityVal);
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
 public void IfcParse(int propIndex, IPropertyValue value)
 {
     switch (propIndex)
     {
         case 0:
             _relatingItem = (IfcClassificationItem) value.EntityVal;
             break;
         case 1:
             _relatedItems.Add_Reversible((IfcClassificationItem) value.EntityVal);
             break;
         default:
             this.HandleUnexpectedAttribute(propIndex, value); break;
     }
 }
 public ClassificationViewModel(IfcClassificationItem classification)
 {
     xbimModel = classification.ModelOf as XbimModel;
     this.classificationHandle = new XbimInstanceHandle(this.xbimModel, classification.EntityLabel, classification.GetType());
     IEnumerable<ClassificationViewModel> subs = this.SubClassifications; //call this once to preload first level of hierarchy   
 }