Exemplo n.º 1
0
        private bool IsIfcProperty(string elementName, out int index, out IfcMetaProperty prop)
        {
            IfcType   ifcType;
            XmlEntity xmlEntity = _currentNode as XmlEntity;

            if (xmlEntity != null && !IfcMetaData.TryGetIfcType(elementName.ToUpper(), out ifcType))
            {
                IfcType t = IfcMetaData.IfcType(xmlEntity.Entity);

                foreach (KeyValuePair <int, IfcMetaProperty> p in t.IfcProperties)
                {
                    int propIndex = p.Key;
                    if (p.Value.PropertyInfo.Name == elementName)
                    //this is the property to set
                    {
                        prop  = p.Value;
                        index = p.Key;
                        return(true);
                    }
                }
            }
            prop  = null;
            index = -1;
            return(false);
        }
Exemplo n.º 2
0
        private bool IsIfcType(string elementName, out IfcType ifcType)
        {
            bool ok = IfcMetaData.TryGetIfcType(elementName.ToUpper(), out ifcType);

            if (!ok)
            {
                if (elementName.Contains("-wrapper") && elementName.StartsWith(_expressNamespace) == false) // we have an inline type definition
                {
                    string inputName = elementName.Substring(0, elementName.LastIndexOf("-"));
                    ok = IfcMetaData.TryGetIfcType(inputName.ToUpper(), out ifcType);
                }
            }
            return(ok && typeof(ExpressType).IsAssignableFrom(ifcType.Type));
        }
Exemplo n.º 3
0
 private bool IsIfcEntity(string elementName, out IfcType ifcType)
 {
     return(IfcMetaData.TryGetIfcType(elementName.ToUpper(), out ifcType));
 }