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
            IfcRepresentationContext root = (IfcRepresentationContext)obj;

            return(this == root);
        }
Beispiel #2
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _contextOfItems = (IfcRepresentationContext)(value.EntityVal);
                return;

            case 1:
                _representationIdentifier = value.StringVal;
                return;

            case 2:
                _representationType = value.StringVal;
                return;

            case 3:
                _items.InternalAdd((IfcRepresentationItem)value.EntityVal);
                return;

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

            case 1:
                _representationIdentifier = value.StringVal;
                break;

            case 2:
                _representationType = value.StringVal;
                break;

            case 3:
                ((IXbimNoNotifyCollection)_items).Add((IfcRepresentationItem)value.EntityVal);
                break;

            default:
                this.HandleUnexpectedAttribute(propIndex, value); break;
            }
        }