Esempio n. 1
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
            IfcPerson root = (IfcPerson)obj;

            return(this == root);
        }
Esempio n. 2
0
        public override void Parse(int propIndex, IPropertyValue value, int[] nestedIndex)
        {
            switch (propIndex)
            {
            case 0:
                _thePerson = (IfcPerson)(value.EntityVal);
                return;

            case 1:
                _theOrganization = (IfcOrganization)(value.EntityVal);
                return;

            case 2:
                _roles.InternalAdd((IfcActorRole)value.EntityVal);
                return;

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

            case 1:
                _theOrganization = value.EntityVal as IfcOrganization;
                break;

            case 2:
                if (_roles == null)
                {
                    _roles = new ActorRoleCollection(this);
                }
                ((IXbimNoNotifyCollection)_roles).Add(value.EntityVal as IfcActorRole);
                break;

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