예제 #1
0
        public void CreateNamespaceSection(ModelReport report, DataDictionary.Types.NameSpace aNameSpace)
        {
            Log.Info("..generating name space " + aNameSpace.Name);

            if (!aNameSpace.FullName.StartsWith("Messages"))
            {
                report.AddSubParagraph("Namespace " + aNameSpace.FullName);

                if (AddRanges)
                {
                    report.CreateRangesSection(aNameSpace, AddRangesDetails);
                }
                if (AddEnumerations)
                {
                    report.CreateEnumerationsSection(aNameSpace, AddEnumerationsDetails);
                }
                if (AddStructures)
                {
                    report.CreateStructuresSection(aNameSpace, AddStructuresDetails);
                }
                if (AddCollections)
                {
                    report.CreateCollectionsSection(aNameSpace, AddCollectionsDetails);
                }
                if (AddFunctions)
                {
                    report.CreateFunctionsSection(aNameSpace, AddFunctionsDetails);
                }
                if (AddProcedures)
                {
                    report.CreateProceduresSection(aNameSpace, AddProceduresDetails);
                }
                if (AddVariables)
                {
                    report.CreateVariablesSection(aNameSpace, AddVariablesDetails, InOutFilter);
                }
                if (AddRules)
                {
                    report.CreateRulesSection(aNameSpace, AddRulesDetails);
                }
                report.CloseSubParagraph();

                foreach (DataDictionary.Types.NameSpace nameSpace in aNameSpace.SubNameSpaces)
                {
                    CreateNamespaceSection(report, nameSpace);
                }
            }
        }
        public void CreateNamespaceSection(ModelReport report, NameSpace aNameSpace)
        {
            bool informationAdded = false;

            if (!aNameSpace.FullName.StartsWith("Messages"))
            {
                if (AddRanges)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Ranges) > 0)
                    {
                        report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                        report.CreateRangesSection(aNameSpace.Ranges, AddRangesDetails);
                        informationAdded = true;
                    }
                }
                if (AddEnumerations)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Enumerations) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateEnumerationsSection(aNameSpace.Enumerations, AddEnumerationsDetails);
                    }
                }
                if (AddStructures)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Structures) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateStructuresSection(aNameSpace.Structures, AddStructuresDetails);
                    }
                }
                if (AddCollections)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Collections) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateCollectionsSection(aNameSpace.Collections, AddCollectionsDetails);
                    }
                }
                if (AddStateMachines)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.StateMachines) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateStateMachinesSection(aNameSpace.StateMachines, AddStateMachinesDetails);
                    }
                }
                if (AddFunctions)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Functions) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateFunctionsSection(aNameSpace.Functions, AddFunctionsDetails);
                    }
                }
                if (AddProcedures)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Procedures) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateProceduresSection(aNameSpace.Procedures, AddProceduresDetails, false);
                    }
                }
                if (AddVariables)
                {
                    if (report.CountDisplayedVariables(aNameSpace.Variables, InOutOnly) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateVariablesSection(aNameSpace.Variables, AddVariablesDetails, InOutOnly);
                    }
                }
                if (AddRules)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Rules) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateRulesSection(aNameSpace.Rules, AddRulesDetails, false);
                    }
                }

                if (informationAdded)
                {
                    report.CloseSubParagraph();
                }

                foreach (NameSpace nameSpace in aNameSpace.NameSpaces)
                {
                    CreateNamespaceSection(report, nameSpace);
                }
            }
        }
        public void CreateNamespaceSection(ModelReport report, DataDictionary.Types.NameSpace aNameSpace)
        {
            Log.Info("..generating name space " + aNameSpace.Name);

            if (!aNameSpace.FullName.StartsWith("Messages"))
            {
                report.AddSubParagraph("Namespace " + aNameSpace.FullName);

                if (AddRanges)
                {
                    report.CreateRangesSection(aNameSpace, AddRangesDetails);
                }
                if (AddEnumerations)
                {
                    report.CreateEnumerationsSection(aNameSpace, AddEnumerationsDetails);
                }
                if (AddStructures)
                {
                    report.CreateStructuresSection(aNameSpace, AddStructuresDetails);
                }
                if (AddCollections)
                {
                    report.CreateCollectionsSection(aNameSpace, AddCollectionsDetails);
                }
                if (AddFunctions)
                {
                    report.CreateFunctionsSection(aNameSpace, AddFunctionsDetails);
                }
                if (AddProcedures)
                {
                    report.CreateProceduresSection(aNameSpace, AddProceduresDetails);
                }
                if (AddVariables)
                {
                    report.CreateVariablesSection(aNameSpace, AddVariablesDetails, InOutFilter);
                }
                if (AddRules)
                {
                    report.CreateRulesSection(aNameSpace, AddRulesDetails);
                }
                report.CloseSubParagraph();

                foreach (DataDictionary.Types.NameSpace nameSpace in aNameSpace.SubNameSpaces)
                {
                    CreateNamespaceSection(report, nameSpace);
                }
            }
        }
예제 #4
0
        public void CreateNamespaceSection(ModelReport report, NameSpace aNameSpace)
        {
            bool informationAdded = false;

            if (!aNameSpace.FullName.StartsWith("Messages"))
            {
                if (AddRanges)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Ranges) > 0)
                    {
                        report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                        report.CreateRangesSection(aNameSpace.Ranges, AddRangesDetails);
                        informationAdded = true;
                    }
                }
                if (AddEnumerations)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Enumerations) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateEnumerationsSection(aNameSpace.Enumerations, AddEnumerationsDetails);
                    }
                }
                if (AddStructures)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Structures) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateStructuresSection(aNameSpace.Structures, AddStructuresDetails);
                    }
                }
                if (AddCollections)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Collections) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateCollectionsSection(aNameSpace.Collections, AddCollectionsDetails);
                    }
                }
                if (AddStateMachines)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.StateMachines) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateStateMachinesSection(aNameSpace.StateMachines, AddStateMachinesDetails);
                    }
                }
                if (AddFunctions)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Functions) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateFunctionsSection(aNameSpace.Functions, AddFunctionsDetails);
                    }
                }
                if (AddProcedures)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Procedures) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateProceduresSection(aNameSpace.Procedures, AddProceduresDetails, false);
                    }
                }
                if (AddVariables)
                {
                    if (report.CountDisplayedVariables(aNameSpace.Variables, InOutOnly) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateVariablesSection(aNameSpace.Variables, AddVariablesDetails, InOutOnly);
                    }
                }
                if (AddRules)
                {
                    if (report.CountDisplayedReqRelated(aNameSpace.Rules) > 0)
                    {
                        if (!informationAdded)
                        {
                            report.AddSubParagraph("Namespace " + aNameSpace.FullName);
                            informationAdded = true;
                        }
                        report.CreateRulesSection(aNameSpace.Rules, AddRulesDetails, false);
                    }
                }

                if (informationAdded)
                {
                    report.CloseSubParagraph();
                }

                foreach (NameSpace nameSpace in aNameSpace.NameSpaces)
                {
                    CreateNamespaceSection(report, nameSpace);
                }
            }
        }