IfcDoc.FormatTTL_Stream.FormatData C# (CSharp) Méthode

FormatData() public méthode

public FormatData ( DocProject docProject, DocPublication docPublication, DocExchangeDefinition docExchange, DocObject>.Dictionary map, SEntity>.Dictionary instances, SEntity root, bool markup ) : string
docProject DocProject
docPublication DocPublication
docExchange DocExchangeDefinition
map DocObject>.Dictionary
instances SEntity>.Dictionary
root IfcDoc.Schema.SEntity
markup bool
Résultat string
        public string FormatData(DocProject docProject, DocPublication docPublication, DocExchangeDefinition docExchange, Dictionary<string, DocObject> map, Dictionary<long, SEntity> instances, SEntity root, bool markup)
        {
            // load properties
            this.m_fullpropertynames.Clear();
            foreach(DocSection docSection in docProject.Sections)
            {
                foreach(DocSchema docSchema in docSection.Schemas)
                {
                    foreach(DocEntity docEntity in docSchema.Entities)
                    {
                        if(!docEntity.IsAbstract())
                        {
                            DocEntity docClass = docEntity;
                            while(docClass != null)
                            {
                                foreach(DocAttribute docAttr in docClass.Attributes)
                                {
                                    if (String.IsNullOrEmpty(docAttr.Derived) &&
                                        String.IsNullOrEmpty(docAttr.Inverse))
                                    {
                                        string row0 = docEntity.Name;
                                        string row1 = docAttr.Name;
                                        string row2 = docAttr.Name + "_" + docClass.Name;
                                        string row3 = "ENTITY";

                                        DocAggregationEnum docAggr = docAttr.GetAggregation();
                                        if(docAggr == DocAggregationEnum.SET)
                                        {
                                            row3 = "SET";
                                        }
                                        else if(docAggr == DocAggregationEnum.LIST)
                                        {
                                            row3 = "LIST";
                                        }

                                        this.m_fullpropertynames.Add(row1 + "_" + row0, new ObjectProperty(row0, row1, row2, row3));
                                    }
                                }

                                docClass = docProject.GetDefinition(docClass.BaseDefinition) as DocEntity;
                            }
                        }
                    }
                }
            }

            this.m_stream = new System.IO.MemoryStream();
            this.Instances = instances;
            this.Markup = markup;
            this.Save();

            this.m_stream.Position = 0;
            StreamReader reader = new StreamReader(this.m_stream);
            string content = reader.ReadToEnd();
            return content;
        }