From 301bb6ee8867d408829501936698b208252e519d Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 17 Apr 2026 13:13:39 +0200 Subject: [PATCH 1/5] Umpdated to latest uml4net (for operation) & implemented NamespaceExtensions methods --- CLAUDE.md | 5 +- .../SySML2.NET.REST.Tests.csproj | 2 +- .../UML/Core/AutoGenPoco/AnnotatingElement.cs | 50 + .../UML/Core/AutoGenPoco/Association.cs | 423 +++ .../UML/Core/AutoGenPoco/Dependency.cs | 70 + .../Core/AutoGenPoco/EnumerationDefinition.cs | 403 +++ .../Expected/UML/Core/AutoGenPoco/Feature.cs | 605 +++++ .../UML/Core/AutoGenPoco/FeatureTyping.cs | 70 + .../Expected/UML/Core/AutoGenPoco/Flow.cs | 625 +++++ .../AutoGenPoco/FramedConcernMembership.cs | 95 + .../UML/Core/AutoGenPoco/IAssociation.cs | 2 + .../Expected/UML/Core/AutoGenPoco/IElement.cs | 10 +- .../AutoGenPoco/IEnumerationDefinition.cs | 2 + .../Expected/UML/Core/AutoGenPoco/IFeature.cs | 37 +- .../Expected/UML/Core/AutoGenPoco/IFlow.cs | 1 + .../UML/Core/AutoGenPoco/ILiteralInteger.cs | 1 + .../UML/Core/AutoGenPoco/ILiteralRational.cs | 1 + .../UML/Core/AutoGenPoco/IMembership.cs | 2 +- .../Core/AutoGenPoco/IMultiplicityRange.cs | 5 +- .../UML/Core/AutoGenPoco/IOwningMembership.cs | 2 +- .../UML/Core/AutoGenPoco/IRelationship.cs | 4 +- .../UML/Core/AutoGenPoco/IRequirementUsage.cs | 1 + .../UML/Core/AutoGenPoco/ISelectExpression.cs | 1 + .../Expected/UML/Core/AutoGenPoco/IUsage.cs | 5 +- .../UML/Core/AutoGenPoco/LiteralInteger.cs | 671 +++++ .../UML/Core/AutoGenPoco/LiteralRational.cs | 671 +++++ .../UML/Core/AutoGenPoco/Membership.cs | 85 + .../UML/Core/AutoGenPoco/MultiplicityRange.cs | 632 +++++ .../UML/Core/AutoGenPoco/OwningMembership.cs | 95 + .../Core/AutoGenPoco/ReferenceSubsetting.cs | 70 + .../UML/Core/AutoGenPoco/RequirementUsage.cs | 688 +++++ .../UML/Core/AutoGenPoco/SelectExpression.cs | 694 +++++ .../UML/Core/AutoGenPoco/Subclassification.cs | 70 + .../Core/AutoGenPoco/TextualRepresentation.cs | 50 + .../Expected/UML/Core/AutoGenPoco/Usage.cs | 623 +++++ .../SysML2.NET.CodeGenerator.Tests.csproj | 2351 ++++++++--------- .../HandleBarHelpers/ClassHelper.cs | 28 +- .../SysML2.NET.CodeGenerator.csproj | 4 +- .../Uml/core-poco-class-uml-template.hbs | 11 +- .../Uml/core-poco-interface-uml-template.hbs | 2 +- .../SysML2.NET.Dal.Tests.csproj | 2 +- .../SysML2.NET.Extensions.Tests.csproj | 2 +- .../SysML2.NET.Kpar.Tests.csproj | 2 +- .../SysML2.NET.Serializer.Json.Tests.csproj | 2 +- .../SysML2.NET.Serializer.Json.csproj | 2 +- ...L2.NET.Serializer.MessagePack.Tests.csproj | 2 +- .../SysML2.NET.Serializer.MessagePack.csproj | 2 +- .../SysML2.NET.Serializer.Xmi.Tests.csproj | 2 +- .../Extend/ElementExtensionsTestFixture.cs | 28 +- .../Extend/ImportExtensionsTestFixture.cs | 4 +- .../Extend/NamespaceExtensionsTestFixture.cs | 420 +++ .../OwningMembershipExtensionsTestFixture.cs | 4 +- SysML2.NET.Tests/SysML2.NET.Tests.csproj | 6 +- .../SysML2.NET.Viewer.Tests.csproj | 2 +- SysML2.NET.Viewer/SysML2.NET.Viewer.csproj | 6 +- .../Core/AutoGenPoco/AcceptActionUsage.cs | 674 +++++ .../Core/AutoGenPoco/ActionDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/ActionUsage.cs | 666 +++++ .../Core/AutoGenPoco/ActorMembership.cs | 104 + .../Core/AutoGenPoco/AllocationDefinition.cs | 423 +++ .../Core/AutoGenPoco/AllocationUsage.cs | 643 +++++ .../AutoGenPoco/AnalysisCaseDefinition.cs | 403 +++ .../Core/AutoGenPoco/AnalysisCaseUsage.cs | 721 +++++ .../Core/AutoGenPoco/AnnotatingElement.cs | 50 + SysML2.NET/Core/AutoGenPoco/Annotation.cs | 70 + .../Core/AutoGenPoco/AssertConstraintUsage.cs | 688 +++++ .../Core/AutoGenPoco/AssignmentActionUsage.cs | 666 +++++ SysML2.NET/Core/AutoGenPoco/Association.cs | 423 +++ .../Core/AutoGenPoco/AssociationStructure.cs | 423 +++ .../Core/AutoGenPoco/AttributeDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs | 623 +++++ SysML2.NET/Core/AutoGenPoco/Behavior.cs | 403 +++ .../Core/AutoGenPoco/BindingConnector.cs | 625 +++++ .../AutoGenPoco/BindingConnectorAsUsage.cs | 643 +++++ .../Core/AutoGenPoco/BooleanExpression.cs | 649 +++++ .../Core/AutoGenPoco/CalculationDefinition.cs | 403 +++ .../Core/AutoGenPoco/CalculationUsage.cs | 721 +++++ SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/CaseUsage.cs | 721 +++++ SysML2.NET/Core/AutoGenPoco/Class.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/Classifier.cs | 403 +++ .../Core/AutoGenPoco/CollectExpression.cs | 694 +++++ SysML2.NET/Core/AutoGenPoco/Comment.cs | 50 + .../Core/AutoGenPoco/ConcernDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs | 688 +++++ .../AutoGenPoco/ConjugatedPortDefinition.cs | 412 +++ .../Core/AutoGenPoco/ConjugatedPortTyping.cs | 70 + SysML2.NET/Core/AutoGenPoco/Conjugation.cs | 70 + .../Core/AutoGenPoco/ConnectionDefinition.cs | 423 +++ .../Core/AutoGenPoco/ConnectionUsage.cs | 643 +++++ SysML2.NET/Core/AutoGenPoco/Connector.cs | 625 +++++ .../Core/AutoGenPoco/ConstraintDefinition.cs | 403 +++ .../Core/AutoGenPoco/ConstraintUsage.cs | 688 +++++ .../Core/AutoGenPoco/ConstructorExpression.cs | 672 +++++ .../Core/AutoGenPoco/CrossSubsetting.cs | 70 + SysML2.NET/Core/AutoGenPoco/DataType.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/DecisionNode.cs | 685 +++++ SysML2.NET/Core/AutoGenPoco/Definition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/Dependency.cs | 70 + SysML2.NET/Core/AutoGenPoco/Differencing.cs | 70 + SysML2.NET/Core/AutoGenPoco/Disjoining.cs | 70 + SysML2.NET/Core/AutoGenPoco/Documentation.cs | 50 + .../AutoGenPoco/ElementFilterMembership.cs | 95 + .../Core/AutoGenPoco/EndFeatureMembership.cs | 95 + .../Core/AutoGenPoco/EnumerationDefinition.cs | 403 +++ .../Core/AutoGenPoco/EnumerationUsage.cs | 623 +++++ .../Core/AutoGenPoco/EventOccurrenceUsage.cs | 623 +++++ .../Core/AutoGenPoco/ExhibitStateUsage.cs | 691 +++++ SysML2.NET/Core/AutoGenPoco/Expression.cs | 649 +++++ SysML2.NET/Core/AutoGenPoco/Feature.cs | 605 +++++ .../AutoGenPoco/FeatureChainExpression.cs | 703 +++++ .../Core/AutoGenPoco/FeatureChaining.cs | 70 + .../Core/AutoGenPoco/FeatureInverting.cs | 70 + .../Core/AutoGenPoco/FeatureMembership.cs | 95 + .../AutoGenPoco/FeatureReferenceExpression.cs | 684 +++++ SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs | 70 + SysML2.NET/Core/AutoGenPoco/FeatureValue.cs | 95 + SysML2.NET/Core/AutoGenPoco/Flow.cs | 625 +++++ SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs | 423 +++ SysML2.NET/Core/AutoGenPoco/FlowEnd.cs | 605 +++++ SysML2.NET/Core/AutoGenPoco/FlowUsage.cs | 687 +++++ .../Core/AutoGenPoco/ForLoopActionUsage.cs | 666 +++++ SysML2.NET/Core/AutoGenPoco/ForkNode.cs | 685 +++++ .../AutoGenPoco/FramedConcernMembership.cs | 95 + SysML2.NET/Core/AutoGenPoco/Function.cs | 403 +++ .../Core/AutoGenPoco/IAcceptActionUsage.cs | 3 +- .../Core/AutoGenPoco/IActionDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IActionUsage.cs | 9 +- .../Core/AutoGenPoco/IActorMembership.cs | 1 + .../Core/AutoGenPoco/IAllocationDefinition.cs | 2 + .../Core/AutoGenPoco/IAllocationUsage.cs | 1 + .../AutoGenPoco/IAnalysisCaseDefinition.cs | 2 + .../Core/AutoGenPoco/IAnalysisCaseUsage.cs | 1 + .../AutoGenPoco/IAssertConstraintUsage.cs | 1 + .../AutoGenPoco/IAssignmentActionUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IAssociation.cs | 2 + .../Core/AutoGenPoco/IAssociationStructure.cs | 2 + .../Core/AutoGenPoco/IAttributeDefinition.cs | 2 + .../Core/AutoGenPoco/IAttributeUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IBehavior.cs | 2 + .../Core/AutoGenPoco/IBindingConnector.cs | 1 + .../AutoGenPoco/IBindingConnectorAsUsage.cs | 1 + .../Core/AutoGenPoco/IBooleanExpression.cs | 1 + .../AutoGenPoco/ICalculationDefinition.cs | 2 + .../Core/AutoGenPoco/ICalculationUsage.cs | 3 +- .../Core/AutoGenPoco/ICaseDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/ICaseUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IClass.cs | 2 + SysML2.NET/Core/AutoGenPoco/IClassifier.cs | 2 + .../Core/AutoGenPoco/ICollectExpression.cs | 1 + .../Core/AutoGenPoco/IConcernDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IConcernUsage.cs | 1 + .../AutoGenPoco/IConjugatedPortDefinition.cs | 4 +- .../Core/AutoGenPoco/IConnectionDefinition.cs | 2 + .../Core/AutoGenPoco/IConnectionUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IConnector.cs | 1 + .../Core/AutoGenPoco/IConnectorAsUsage.cs | 1 + .../Core/AutoGenPoco/IConstraintDefinition.cs | 2 + .../Core/AutoGenPoco/IConstraintUsage.cs | 5 +- .../AutoGenPoco/IConstructorExpression.cs | 3 +- SysML2.NET/Core/AutoGenPoco/IControlNode.cs | 4 +- SysML2.NET/Core/AutoGenPoco/IDataType.cs | 2 + SysML2.NET/Core/AutoGenPoco/IDecisionNode.cs | 2 + SysML2.NET/Core/AutoGenPoco/IDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IElement.cs | 10 +- .../AutoGenPoco/IEnumerationDefinition.cs | 2 + .../Core/AutoGenPoco/IEnumerationUsage.cs | 1 + .../Core/AutoGenPoco/IEventOccurrenceUsage.cs | 1 + .../Core/AutoGenPoco/IExhibitStateUsage.cs | 2 + SysML2.NET/Core/AutoGenPoco/IExpression.cs | 7 +- SysML2.NET/Core/AutoGenPoco/IFeature.cs | 37 +- .../AutoGenPoco/IFeatureChainExpression.cs | 3 +- .../IFeatureReferenceExpression.cs | 5 +- SysML2.NET/Core/AutoGenPoco/IFlow.cs | 1 + .../Core/AutoGenPoco/IFlowDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IFlowEnd.cs | 1 + SysML2.NET/Core/AutoGenPoco/IFlowUsage.cs | 2 + .../Core/AutoGenPoco/IForLoopActionUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IForkNode.cs | 2 + SysML2.NET/Core/AutoGenPoco/IFunction.cs | 2 + SysML2.NET/Core/AutoGenPoco/IIfActionUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IImport.cs | 2 +- .../Core/AutoGenPoco/IIncludeUseCaseUsage.cs | 1 + .../Core/AutoGenPoco/IIndexExpression.cs | 1 + .../AutoGenPoco/IInstantiationExpression.cs | 3 +- SysML2.NET/Core/AutoGenPoco/IInteraction.cs | 2 + .../Core/AutoGenPoco/IInterfaceDefinition.cs | 2 + .../Core/AutoGenPoco/IInterfaceUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IInvariant.cs | 1 + .../Core/AutoGenPoco/IInvocationExpression.cs | 5 +- .../Core/AutoGenPoco/IItemDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IItemUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IJoinNode.cs | 2 + .../Core/AutoGenPoco/ILibraryPackage.cs | 3 +- .../Core/AutoGenPoco/ILiteralBoolean.cs | 1 + .../Core/AutoGenPoco/ILiteralExpression.cs | 5 +- .../Core/AutoGenPoco/ILiteralInfinity.cs | 1 + .../Core/AutoGenPoco/ILiteralInteger.cs | 1 + .../Core/AutoGenPoco/ILiteralRational.cs | 1 + SysML2.NET/Core/AutoGenPoco/ILiteralString.cs | 1 + .../Core/AutoGenPoco/ILoopActionUsage.cs | 2 + SysML2.NET/Core/AutoGenPoco/IMembership.cs | 2 +- .../Core/AutoGenPoco/IMembershipImport.cs | 2 +- SysML2.NET/Core/AutoGenPoco/IMergeNode.cs | 2 + SysML2.NET/Core/AutoGenPoco/IMetaclass.cs | 2 + .../AutoGenPoco/IMetadataAccessExpression.cs | 7 +- .../Core/AutoGenPoco/IMetadataDefinition.cs | 2 + .../Core/AutoGenPoco/IMetadataFeature.cs | 9 +- SysML2.NET/Core/AutoGenPoco/IMetadataUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IMultiplicity.cs | 1 + .../Core/AutoGenPoco/IMultiplicityRange.cs | 5 +- SysML2.NET/Core/AutoGenPoco/INamespace.cs | 22 +- .../Core/AutoGenPoco/INamespaceImport.cs | 2 +- .../Core/AutoGenPoco/INullExpression.cs | 5 +- .../Core/AutoGenPoco/IOccurrenceDefinition.cs | 2 + .../Core/AutoGenPoco/IOccurrenceUsage.cs | 1 + .../Core/AutoGenPoco/IOperatorExpression.cs | 3 +- .../Core/AutoGenPoco/IOwningMembership.cs | 2 +- SysML2.NET/Core/AutoGenPoco/IPackage.cs | 5 +- .../Core/AutoGenPoco/IParameterMembership.cs | 2 +- .../Core/AutoGenPoco/IPartDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IPartUsage.cs | 1 + .../Core/AutoGenPoco/IPayloadFeature.cs | 1 + .../Core/AutoGenPoco/IPerformActionUsage.cs | 4 +- .../Core/AutoGenPoco/IPortDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IPortUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IPredicate.cs | 2 + .../Core/AutoGenPoco/IReferenceUsage.cs | 3 +- SysML2.NET/Core/AutoGenPoco/IRelationship.cs | 4 +- .../Core/AutoGenPoco/IRenderingDefinition.cs | 2 + .../Core/AutoGenPoco/IRenderingUsage.cs | 1 + .../AutoGenPoco/IRequirementDefinition.cs | 2 + .../Core/AutoGenPoco/IRequirementUsage.cs | 1 + .../AutoGenPoco/IReturnParameterMembership.cs | 2 +- .../AutoGenPoco/ISatisfyRequirementUsage.cs | 1 + .../Core/AutoGenPoco/ISelectExpression.cs | 1 + .../Core/AutoGenPoco/ISendActionUsage.cs | 1 + .../AutoGenPoco/IStakeholderMembership.cs | 1 + .../Core/AutoGenPoco/IStateDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IStateUsage.cs | 4 +- SysML2.NET/Core/AutoGenPoco/IStep.cs | 1 + SysML2.NET/Core/AutoGenPoco/IStructure.cs | 2 + .../Core/AutoGenPoco/ISubjectMembership.cs | 1 + SysML2.NET/Core/AutoGenPoco/ISuccession.cs | 1 + .../Core/AutoGenPoco/ISuccessionAsUsage.cs | 1 + .../Core/AutoGenPoco/ISuccessionFlow.cs | 1 + .../Core/AutoGenPoco/ISuccessionFlowUsage.cs | 2 + .../Core/AutoGenPoco/ITerminateActionUsage.cs | 1 + .../Core/AutoGenPoco/ITransitionUsage.cs | 5 +- .../ITriggerInvocationExpression.cs | 3 +- SysML2.NET/Core/AutoGenPoco/IType.cs | 29 +- SysML2.NET/Core/AutoGenPoco/IUsage.cs | 5 +- .../Core/AutoGenPoco/IUseCaseDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IUseCaseUsage.cs | 1 + .../IVerificationCaseDefinition.cs | 2 + .../AutoGenPoco/IVerificationCaseUsage.cs | 1 + .../Core/AutoGenPoco/IViewDefinition.cs | 2 + SysML2.NET/Core/AutoGenPoco/IViewUsage.cs | 3 +- .../Core/AutoGenPoco/IViewpointDefinition.cs | 2 + .../Core/AutoGenPoco/IViewpointUsage.cs | 1 + .../Core/AutoGenPoco/IWhileLoopActionUsage.cs | 1 + SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs | 666 +++++ .../Core/AutoGenPoco/IncludeUseCaseUsage.cs | 731 +++++ .../Core/AutoGenPoco/IndexExpression.cs | 694 +++++ SysML2.NET/Core/AutoGenPoco/Interaction.cs | 423 +++ .../Core/AutoGenPoco/InterfaceDefinition.cs | 423 +++ SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs | 643 +++++ SysML2.NET/Core/AutoGenPoco/Intersecting.cs | 70 + SysML2.NET/Core/AutoGenPoco/Invariant.cs | 649 +++++ .../Core/AutoGenPoco/InvocationExpression.cs | 685 +++++ SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/ItemUsage.cs | 623 +++++ SysML2.NET/Core/AutoGenPoco/JoinNode.cs | 685 +++++ SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs | 234 ++ SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs | 671 +++++ .../Core/AutoGenPoco/LiteralExpression.cs | 671 +++++ .../Core/AutoGenPoco/LiteralInfinity.cs | 671 +++++ SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs | 671 +++++ .../Core/AutoGenPoco/LiteralRational.cs | 671 +++++ SysML2.NET/Core/AutoGenPoco/LiteralString.cs | 671 +++++ SysML2.NET/Core/AutoGenPoco/Membership.cs | 85 + .../Core/AutoGenPoco/MembershipExpose.cs | 95 + .../Core/AutoGenPoco/MembershipImport.cs | 95 + SysML2.NET/Core/AutoGenPoco/MergeNode.cs | 685 +++++ SysML2.NET/Core/AutoGenPoco/Metaclass.cs | 403 +++ .../AutoGenPoco/MetadataAccessExpression.cs | 685 +++++ .../Core/AutoGenPoco/MetadataDefinition.cs | 403 +++ .../Core/AutoGenPoco/MetadataFeature.cs | 644 +++++ SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs | 662 +++++ SysML2.NET/Core/AutoGenPoco/Multiplicity.cs | 605 +++++ .../Core/AutoGenPoco/MultiplicityRange.cs | 632 +++++ SysML2.NET/Core/AutoGenPoco/Namespace.cs | 203 ++ .../Core/AutoGenPoco/NamespaceExpose.cs | 95 + .../Core/AutoGenPoco/NamespaceImport.cs | 95 + SysML2.NET/Core/AutoGenPoco/NullExpression.cs | 671 +++++ .../Core/AutoGenPoco/ObjectiveMembership.cs | 95 + .../Core/AutoGenPoco/OccurrenceDefinition.cs | 403 +++ .../Core/AutoGenPoco/OccurrenceUsage.cs | 623 +++++ .../Core/AutoGenPoco/OperatorExpression.cs | 694 +++++ .../Core/AutoGenPoco/OwningMembership.cs | 95 + SysML2.NET/Core/AutoGenPoco/Package.cs | 226 ++ .../Core/AutoGenPoco/ParameterMembership.cs | 103 + SysML2.NET/Core/AutoGenPoco/PartDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/PartUsage.cs | 623 +++++ SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs | 605 +++++ .../Core/AutoGenPoco/PerformActionUsage.cs | 677 +++++ .../Core/AutoGenPoco/PortConjugation.cs | 70 + SysML2.NET/Core/AutoGenPoco/PortDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/PortUsage.cs | 623 +++++ SysML2.NET/Core/AutoGenPoco/Predicate.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/Redefinition.cs | 70 + .../Core/AutoGenPoco/ReferenceSubsetting.cs | 70 + SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs | 632 +++++ .../Core/AutoGenPoco/RenderingDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs | 623 +++++ .../RequirementConstraintMembership.cs | 95 + .../Core/AutoGenPoco/RequirementDefinition.cs | 403 +++ .../Core/AutoGenPoco/RequirementUsage.cs | 688 +++++ .../RequirementVerificationMembership.cs | 95 + .../AutoGenPoco/ResultExpressionMembership.cs | 95 + .../AutoGenPoco/ReturnParameterMembership.cs | 112 + .../AutoGenPoco/SatisfyRequirementUsage.cs | 688 +++++ .../Core/AutoGenPoco/SelectExpression.cs | 694 +++++ .../Core/AutoGenPoco/SendActionUsage.cs | 666 +++++ SysML2.NET/Core/AutoGenPoco/Specialization.cs | 70 + .../Core/AutoGenPoco/StakeholderMembership.cs | 104 + .../Core/AutoGenPoco/StateDefinition.cs | 403 +++ .../AutoGenPoco/StateSubactionMembership.cs | 95 + SysML2.NET/Core/AutoGenPoco/StateUsage.cs | 681 +++++ SysML2.NET/Core/AutoGenPoco/Step.cs | 605 +++++ SysML2.NET/Core/AutoGenPoco/Structure.cs | 403 +++ .../Core/AutoGenPoco/Subclassification.cs | 70 + .../Core/AutoGenPoco/SubjectMembership.cs | 104 + SysML2.NET/Core/AutoGenPoco/Subsetting.cs | 70 + SysML2.NET/Core/AutoGenPoco/Succession.cs | 625 +++++ .../Core/AutoGenPoco/SuccessionAsUsage.cs | 643 +++++ SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs | 625 +++++ .../Core/AutoGenPoco/SuccessionFlowUsage.cs | 687 +++++ .../Core/AutoGenPoco/TerminateActionUsage.cs | 666 +++++ .../Core/AutoGenPoco/TextualRepresentation.cs | 50 + .../TransitionFeatureMembership.cs | 95 + .../Core/AutoGenPoco/TransitionUsage.cs | 684 +++++ .../TriggerInvocationExpression.cs | 695 +++++ SysML2.NET/Core/AutoGenPoco/Type.cs | 402 +++ SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs | 70 + SysML2.NET/Core/AutoGenPoco/Unioning.cs | 70 + SysML2.NET/Core/AutoGenPoco/Usage.cs | 623 +++++ .../Core/AutoGenPoco/UseCaseDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs | 721 +++++ .../Core/AutoGenPoco/VariantMembership.cs | 95 + .../AutoGenPoco/VerificationCaseDefinition.cs | 403 +++ .../Core/AutoGenPoco/VerificationCaseUsage.cs | 721 +++++ SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs | 403 +++ .../AutoGenPoco/ViewRenderingMembership.cs | 95 + SysML2.NET/Core/AutoGenPoco/ViewUsage.cs | 634 +++++ .../Core/AutoGenPoco/ViewpointDefinition.cs | 403 +++ SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs | 688 +++++ .../Core/AutoGenPoco/WhileLoopActionUsage.cs | 666 +++++ SysML2.NET/Extend/ElementExtensions.cs | 26 +- SysML2.NET/Extend/ImportExtensions.cs | 11 +- SysML2.NET/Extend/NamespaceExtensions.cs | 260 +- .../Extend/NamespaceImportExtensions.cs | 13 +- .../Extend/OwningMembershipExtensions.cs | 3 +- SysML2.NET/Extensions/StringExtensions.cs | 88 + SysML2.NET/SysML2.NET.csproj | 4 +- 365 files changed, 81400 insertions(+), 1382 deletions(-) create mode 100644 SysML2.NET.Tests/Extend/NamespaceExtensionsTestFixture.cs diff --git a/CLAUDE.md b/CLAUDE.md index 810726b27..112a18320 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -41,7 +41,7 @@ Test framework: **NUnit**. Test classes use `[TestFixture]` and `[Test]` attribu Most code in this repo is **auto-generated** — files marked `THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!` must not be edited directly. The pipeline: -1. **Input**: `Resources/KerML_only_xmi.uml` and `Resources/SysML_only_xmi.uml` (UML XMI metamodel files) +1. **Input**: `Resources/KerML_only_xmi.uml` and `Resources/SysML_only_xmi.uml` — these two UML-based XMI files define the KerML and SysML v2 specification respectively. They are the **single source of truth** for all generated DTOs, POCOs, serializers, extension methods, and other auto-generated code. All OCL constraints (derivation rules, validation invariants, and operation body conditions) for each metaclass are also defined within these XMI files. 2. **Generator**: `SysML2.NET.CodeGenerator` reads these via `uml4net.xmi`, uses Handlebars templates (`Templates/Uml/*.hbs`) to generate code 3. **Output**: `AutoGen*` directories across multiple projects @@ -114,3 +114,6 @@ Auto-generated DTOs use structured namespaces reflecting the KerML/SysML package - Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance - Use 'StringBuilder.Append(char)' instead of 'StringBuilder.Append(string)' when the input is a constant unit string +- Prefer 'string.IsNullOrWhiteSpace' over 'string.IsNullOrEmpty' when checking the non-nullable value of a string +- Prefer switch expressions/statements over if-else chains when applicable +- Prefer indexer syntax (e.g., 'list[^1]') and range syntax (e.g., 'array[1..^1]') over LINQ methods (e.g., 'list.Last()', 'list.Skip(1).Take(n)') when applicable diff --git a/SySML2.NET.REST.Tests/SySML2.NET.REST.Tests.csproj b/SySML2.NET.REST.Tests/SySML2.NET.REST.Tests.csproj index 1674ddcd7..b06bb8d44 100644 --- a/SySML2.NET.REST.Tests/SySML2.NET.REST.Tests.csproj +++ b/SySML2.NET.REST.Tests/SySML2.NET.REST.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/AnnotatingElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/AnnotatingElement.cs index 19a5bbd2d..f44cb12d7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/AnnotatingElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/AnnotatingElement.cs @@ -264,6 +264,56 @@ public AnnotatingElement() [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Association.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Association.cs index 52e709347..aa422657e 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Association.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Association.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -626,6 +628,427 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Dependency.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Dependency.cs index a5da6dd52..c8434d5d2 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Dependency.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Dependency.cs @@ -320,6 +320,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/EnumerationDefinition.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/EnumerationDefinition.cs index 7f5e5c812..12e2d343e 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/EnumerationDefinition.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/EnumerationDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -827,6 +829,407 @@ bool Systems.DefinitionAndUsage.IDefinition.IsVariation [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs index 17ffe96f6..b965864d8 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Feature.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -751,6 +752,610 @@ public Feature() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FeatureTyping.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FeatureTyping.cs index 69a5b6736..31c39f27c 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FeatureTyping.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FeatureTyping.cs @@ -380,6 +380,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IFeatureTyping.TypedFeature")] public IFeature TypedFeature { get; set; } + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs index df70f3314..fe7f78fa2 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Flow.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -937,6 +938,630 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FramedConcernMembership.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FramedConcernMembership.cs index 16805fc42..3c053af75 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FramedConcernMembership.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/FramedConcernMembership.cs @@ -484,6 +484,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IAssociation.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IAssociation.cs index 7d9aa226c..4e0df58b3 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IAssociation.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IAssociation.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IElement.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IElement.cs index f8b12730b..2c9fe56c7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IElement.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IElement.cs @@ -193,7 +193,7 @@ public partial interface IElement /// /// The expected /// - string EscapedName() => this.ComputeEscapedNameOperation(); + string EscapedName(); /// /// Return an effective shortName for this Element. By default this is the same as its @@ -202,7 +202,7 @@ public partial interface IElement /// /// The expected /// - string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + string EffectiveShortName(); /// /// Return an effective name for this Element. By default this is the same as its declaredName. @@ -210,7 +210,7 @@ public partial interface IElement /// /// The expected /// - string EffectiveName() => this.ComputeEffectiveNameOperation(); + string EffectiveName(); /// /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. @@ -218,7 +218,7 @@ public partial interface IElement /// /// The expected /// - INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + INamespace LibraryNamespace(); /// /// Return a unique description of the location of this Element in the containment structure rooted in a @@ -232,7 +232,7 @@ public partial interface IElement /// /// The expected /// - string Path() => this.ComputePathOperation(); + string Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IEnumerationDefinition.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IEnumerationDefinition.cs index 1e2c81525..00c328fa7 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IEnumerationDefinition.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IEnumerationDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFeature.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFeature.cs index 197842b94..15eb0b30a 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFeature.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFeature.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -271,7 +272,7 @@ public partial interface IFeature : IType /// /// The expected /// - FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + FeatureDirectionKind? DirectionFor(IType type); /// /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the @@ -280,7 +281,7 @@ public partial interface IFeature : IType /// /// The expected /// - new string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + new string EffectiveShortName(); /// /// If a Feature has no declaredName or declaredShortName , then its @@ -290,7 +291,7 @@ public partial interface IFeature : IType /// /// The expected /// - new string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + new string EffectiveName(); /// /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first @@ -299,7 +300,7 @@ public partial interface IFeature : IType /// /// The expected /// - IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + IFeature NamingFeature(); /// /// @@ -309,7 +310,7 @@ public partial interface IFeature : IType /// /// The expected collection of /// - new List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + new List Supertypes(bool excludeImplied); /// /// Check whether this Feature directly redefines the given redefinedFeature. @@ -320,7 +321,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + bool Redefines(IFeature redefinedFeature); /// /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must @@ -332,7 +333,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + bool RedefinesFromLibrary(string libraryFeatureName); /// /// Check whether this Feature directly or indirectly specializes a Feature whose last two @@ -347,7 +348,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + bool SubsetsChain(IFeature first, IFeature second); /// /// A Feature is compatible with an otherType if it either directly or indirectly specializes the @@ -363,7 +364,7 @@ public partial interface IFeature : IType /// /// The expected /// - new bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + new bool IsCompatibleWith(IType otherType); /// /// Return the Features used to determine the types of this Feature (other than this Feature itself). If @@ -378,7 +379,7 @@ public partial interface IFeature : IType /// /// The expected collection of /// - List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + List TypingFeatures(); /// /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be @@ -388,7 +389,7 @@ public partial interface IFeature : IType /// /// The expected collection of /// - List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + List AsCartesianProduct(); /// /// Check whether this Feature can be used to represent a Cartesian product of Types. @@ -396,7 +397,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + bool IsCartesianProduct(); /// /// Return whether this Feature is an owned cross Feature of an end Feature. @@ -404,7 +405,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + bool IsOwnedCrossFeature(); /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the @@ -414,7 +415,7 @@ public partial interface IFeature : IType /// /// The expected /// - IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + IFeature OwnedCrossFeature(); /// /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. @@ -422,7 +423,7 @@ public partial interface IFeature : IType /// /// The expected collection of /// - List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + List AllRedefinedFeatures(); /// /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, @@ -437,7 +438,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + bool IsFeaturedWithin(IType type); /// /// A Feature can access another feature if the other feature is featured within one of the direct or @@ -449,7 +450,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + bool CanAccess(IFeature feature); /// /// Return whether the given type must be a featuringType of this Feature. If this Feature has @@ -463,7 +464,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + bool IsFeaturingType(IType type); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFlow.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFlow.cs index 0ce518fc4..186b92449 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFlow.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IFlow.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ILiteralInteger.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ILiteralInteger.cs index 119cb7971..b48749b01 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ILiteralInteger.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ILiteralInteger.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ILiteralRational.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ILiteralRational.cs index 50eb96cb5..e5bbab237 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ILiteralRational.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ILiteralRational.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IMembership.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IMembership.cs index 1059310dc..c0cc31af1 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IMembership.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IMembership.cs @@ -101,7 +101,7 @@ public partial interface IMembership : IRelationship /// /// The expected /// - bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + bool IsDistinguishableFrom(IMembership other); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IMultiplicityRange.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IMultiplicityRange.cs index e7fc2a4ef..68b5d4fca 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IMultiplicityRange.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IMultiplicityRange.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Multiplicities using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Functions; @@ -87,7 +88,7 @@ public partial interface IMultiplicityRange : IMultiplicity /// /// The expected /// - bool HasBounds(int lower, string upper) => this.ComputeHasBoundsOperation(lower, upper); + bool HasBounds(int lower, string upper); /// /// Evaluate the given bound Expression (at model level) and return the result represented as a MOF @@ -99,7 +100,7 @@ public partial interface IMultiplicityRange : IMultiplicity /// /// The expected /// - string ValueOf(IExpression bound) => this.ComputeValueOfOperation(bound); + string ValueOf(IExpression bound); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IOwningMembership.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IOwningMembership.cs index 2fca30169..77497285c 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IOwningMembership.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IOwningMembership.cs @@ -79,7 +79,7 @@ public partial interface IOwningMembership : IMembership /// /// The expected /// - new string Path() => this.ComputeRedefinedPathOperation(); + new string Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRelationship.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRelationship.cs index a45fddbc2..a624afbca 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRelationship.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRelationship.cs @@ -99,7 +99,7 @@ public partial interface IRelationship : IElement /// /// The expected /// - new INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + new INamespace LibraryNamespace(); /// /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, @@ -110,7 +110,7 @@ public partial interface IRelationship : IElement /// /// The expected /// - new string Path() => this.ComputeRedefinedPathOperation(); + new string Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRequirementUsage.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRequirementUsage.cs index 4224cff82..d030dd1c6 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRequirementUsage.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IRequirementUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ISelectExpression.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ISelectExpression.cs index 40abbd0e8..eb6494053 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ISelectExpression.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ISelectExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IUsage.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IUsage.cs index a52ecc29b..7682f5267 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IUsage.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/IUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -348,7 +349,7 @@ public partial interface IUsage : IFeature /// /// The expected /// - new IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + new IFeature NamingFeature(); /// /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the @@ -357,7 +358,7 @@ public partial interface IUsage : IFeature /// /// The expected /// - IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + IFeature ReferencedFeatureTarget(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs index 8909a3551..ce10683e4 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralInteger.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -793,6 +794,676 @@ public LiteralInteger() [Implements(implementation: "ILiteralInteger.Value")] public int Value { get; set; } + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// The model-level value of a LiteralExpression is itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A LiteralExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs index a85b1e428..ebace2d06 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/LiteralRational.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -793,6 +794,676 @@ public LiteralRational() [Implements(implementation: "ILiteralRational.Value")] public double Value { get; set; } + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// The model-level value of a LiteralExpression is itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A LiteralExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Membership.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Membership.cs index 9de34abb4..cb63d8fe6 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Membership.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Membership.cs @@ -354,6 +354,91 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs index c89c98918..e88bb7c84 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/MultiplicityRange.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Multiplicities using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Functions; @@ -771,6 +772,637 @@ public MultiplicityRange() [Implements(implementation: "IMultiplicityRange.UpperBound")] public IExpression upperBound => this.ComputeUpperBound(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Check whether this MultiplicityRange represents the range bounded by the given values lower and + /// upper, presuming the lowerBound and upperBound Expressions are model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool HasBounds(int lower, string upper) => this.ComputeHasBoundsOperation(lower, upper); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Evaluate the given bound Expression (at model level) and return the result represented as a MOF + /// UnlimitedNatural value. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string ValueOf(IExpression bound) => this.ComputeValueOfOperation(bound); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/OwningMembership.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/OwningMembership.cs index 1d02076ee..076182467 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/OwningMembership.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/OwningMembership.cs @@ -398,6 +398,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ReferenceSubsetting.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ReferenceSubsetting.cs index f9b4e0e51..5d37c0094 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ReferenceSubsetting.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/ReferenceSubsetting.cs @@ -416,6 +416,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs index 53ba0c5f9..c3c49c9f0 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/RequirementUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1265,6 +1266,693 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A ConstraintUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// The naming Feature of a ConstraintUsage that is owned by a RequirementConstraintMembership and has + /// an ownedReferenceSubsetting is the featureTarget of the referencedFeature of that + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs index d6b941966..ef56866ed 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/SelectExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -827,6 +828,699 @@ string IOperatorExpression.Operator [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Apply the Function that is the type of this InvocationExpression to the argument values resulting + /// from evaluating each of the argument Expressions on the given target. If the application is not + /// possible, then return an empty sequence. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// The instantiatedType of an OperatorExpression is the resolution of it's operator from one of the + /// packages BaseFunctions, DataFunctions, or ControlFunctions from the Kernel Function Library. + /// + /// + /// The expected + /// + public IType InstantiatedType() => this.ComputeRedefinedInstantiatedTypeOperation(); + + /// + /// Return the Type to act as the instantiatedType for this InstantiationExpression. By default, this is + /// the memberElement of the first ownedMembership that is not a FeatureMembership, which must be a + /// Type. Note. This operation is overridden in the subclass + /// OperatorExpression. + /// + /// + /// The expected + /// + IType IInstantiationExpression.InstantiatedType() => this.InstantiatedType(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// An InvocationExpression is model-level evaluable if all its argument Expressions are model-level + /// evaluable and its function is model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Subclassification.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Subclassification.cs index d6f677ec6..f085dd787 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Subclassification.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Subclassification.cs @@ -380,6 +380,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/TextualRepresentation.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/TextualRepresentation.cs index c54db3bc8..3d407b630 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/TextualRepresentation.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/TextualRepresentation.cs @@ -313,6 +313,56 @@ public TextualRepresentation() [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); } } diff --git a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs index e8a2465ad..a4a2fcd71 100644 --- a/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs +++ b/SysML2.NET.CodeGenerator.Tests/Expected/UML/Core/AutoGenPoco/Usage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -1078,6 +1079,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj index 6f1dd22e4..b6541a2fb 100644 --- a/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj +++ b/SysML2.NET.CodeGenerator.Tests/SysML2.NET.CodeGenerator.Tests.csproj @@ -1,1183 +1,1172 @@  - - - net10.0 - 14.0 - Starion Group S.A. - Sam Gerene - Nunit test suite for the SysML2.NET.CodeGenerator - Copyright © Starion Group S.A. - Apache-2.0 - https://github.com/STARIONGROUP/SysML2.NET.git - Git - false - disable - false - true - en-US - - - - - - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - Always - - - - - - Always - - - Always - - - Always - - - - - - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - - - - Always - - - - - - - + + net10.0 + 14.0 + Starion Group S.A. + Sam Gerene + Nunit test suite for the SysML2.NET.CodeGenerator + Copyright © Starion Group S.A. + Apache-2.0 + https://github.com/STARIONGROUP/SysML2.NET.git + Git + false + disable + false + true + en-US + + + + + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + Always + + + + + Always + + + Always + + + Always + + + + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + Always + + + + + \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs index 017023bc5..c629bf04f 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/ClassHelper.cs @@ -62,7 +62,31 @@ public static void RegisterClassHelper(this IHandlebars handlebars) uniqueNamespaces.Add(Extensions.NamedElementExtensions.QueryNamespace(prop.Type)); } - var parameters = @class.OwnedOperation.SelectMany(x => x.OwnedParameter); + var orderedNamespaces = uniqueNamespaces.Order().ToList(); + + foreach (var orderedNamespace in orderedNamespaces) + { + writer.WriteSafeString($"using SysML2.NET.Core.{orderedNamespace} ;{Environment.NewLine}"); + } + }); + + handlebars.RegisterHelper("Class.WriteEnumerationNameSpacesWithOperation", (writer, context, _) => + { + if (context.Value is not IClass @class) + { + throw new ArgumentException("supposed to be IClass"); + } + + var uniqueNamespaces = new HashSet(); + + var allProperties = @class.QueryAllProperties(); + + foreach (var prop in allProperties.Where(x => x.QueryIsEnum())) + { + uniqueNamespaces.Add(Extensions.NamedElementExtensions.QueryNamespace(prop.Type)); + } + + var parameters = @class.QueryAllOperations().SelectMany(x => x.OwnedParameter); foreach (var enumeration in parameters.Where(x => x.Type is IEnumeration).Select(x => x.Type as IEnumeration)) { @@ -133,7 +157,7 @@ public static void RegisterClassHelper(this IHandlebars handlebars) } } - foreach (var operation in @class.OwnedOperation) + foreach (var operation in @class.QueryAllOperations()) { foreach (var parameterType in operation.OwnedParameter.Where(x => x.Type is IClass).Select(x => x.Type as IClass)) { diff --git a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj index bd02f3af4..3389fd24c 100644 --- a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj +++ b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj @@ -20,8 +20,8 @@ - - + + diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-class-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-class-uml-template.hbs index 3c9cb3174..da5e5b45e 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-class-uml-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-class-uml-template.hbs @@ -29,7 +29,7 @@ namespace SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace thi using System.Collections.Generic; using System.Linq; - {{ #Class.WriteEnumerationNameSpaces this}} + {{ #Class.WriteEnumerationNameSpacesWithOperation this}} {{ #Class.WriteNameSpaces this POCO}} using SysML2.NET.Collections; using SysML2.NET.Decorators; @@ -66,6 +66,15 @@ namespace SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace thi {{ #Property.WriteForPOCOClass property ../ }} {{/each}} + + {{#each (Class.QueryAllOperations this) as | operation | }} + {{ #Documentation operation }} + {{ #ParameterDocumentation operation }} + {{ #Operation.WriteForPOCOClass operation ../}} + {{#unless @last}} + + {{/unless}} + {{/each}} } } diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-interface-uml-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-interface-uml-template.hbs index 31c548650..bad307758 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-interface-uml-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-poco-interface-uml-template.hbs @@ -28,7 +28,7 @@ namespace SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace thi using System.CodeDom.Compiler; using System.Collections.Generic; - {{ #Class.WriteEnumerationNameSpaces this}} + {{ #Class.WriteEnumerationNameSpacesWithOperation this}} {{ #Class.WriteNameSpaces this POCO}} using SysML2.NET.Decorators; diff --git a/SysML2.NET.Dal.Tests/SysML2.NET.Dal.Tests.csproj b/SysML2.NET.Dal.Tests/SysML2.NET.Dal.Tests.csproj index 228593a52..94d464a0a 100644 --- a/SysML2.NET.Dal.Tests/SysML2.NET.Dal.Tests.csproj +++ b/SysML2.NET.Dal.Tests/SysML2.NET.Dal.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/SysML2.NET.Extensions.Tests/SysML2.NET.Extensions.Tests.csproj b/SysML2.NET.Extensions.Tests/SysML2.NET.Extensions.Tests.csproj index af9e72711..7febcbe2c 100644 --- a/SysML2.NET.Extensions.Tests/SysML2.NET.Extensions.Tests.csproj +++ b/SysML2.NET.Extensions.Tests/SysML2.NET.Extensions.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/SysML2.NET.Kpar.Tests/SysML2.NET.Kpar.Tests.csproj b/SysML2.NET.Kpar.Tests/SysML2.NET.Kpar.Tests.csproj index 806560566..a49e959fe 100644 --- a/SysML2.NET.Kpar.Tests/SysML2.NET.Kpar.Tests.csproj +++ b/SysML2.NET.Kpar.Tests/SysML2.NET.Kpar.Tests.csproj @@ -55,7 +55,7 @@ - + diff --git a/SysML2.NET.Serializer.Json.Tests/SysML2.NET.Serializer.Json.Tests.csproj b/SysML2.NET.Serializer.Json.Tests/SysML2.NET.Serializer.Json.Tests.csproj index abcf955b7..bdc38a854 100644 --- a/SysML2.NET.Serializer.Json.Tests/SysML2.NET.Serializer.Json.Tests.csproj +++ b/SysML2.NET.Serializer.Json.Tests/SysML2.NET.Serializer.Json.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/SysML2.NET.Serializer.Json/SysML2.NET.Serializer.Json.csproj b/SysML2.NET.Serializer.Json/SysML2.NET.Serializer.Json.csproj index 1c3aa7e8c..8ec899a41 100644 --- a/SysML2.NET.Serializer.Json/SysML2.NET.Serializer.Json.csproj +++ b/SysML2.NET.Serializer.Json/SysML2.NET.Serializer.Json.csproj @@ -24,7 +24,7 @@ - + diff --git a/SysML2.NET.Serializer.MessagePack.Tests/SysML2.NET.Serializer.MessagePack.Tests.csproj b/SysML2.NET.Serializer.MessagePack.Tests/SysML2.NET.Serializer.MessagePack.Tests.csproj index fce5ac99b..43b5d3f8a 100644 --- a/SysML2.NET.Serializer.MessagePack.Tests/SysML2.NET.Serializer.MessagePack.Tests.csproj +++ b/SysML2.NET.Serializer.MessagePack.Tests/SysML2.NET.Serializer.MessagePack.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/SysML2.NET.Serializer.MessagePack/SysML2.NET.Serializer.MessagePack.csproj b/SysML2.NET.Serializer.MessagePack/SysML2.NET.Serializer.MessagePack.csproj index badeec7c4..cbf17d884 100644 --- a/SysML2.NET.Serializer.MessagePack/SysML2.NET.Serializer.MessagePack.csproj +++ b/SysML2.NET.Serializer.MessagePack/SysML2.NET.Serializer.MessagePack.csproj @@ -29,7 +29,7 @@ - + diff --git a/SysML2.NET.Serializer.Xmi.Tests/SysML2.NET.Serializer.Xmi.Tests.csproj b/SysML2.NET.Serializer.Xmi.Tests/SysML2.NET.Serializer.Xmi.Tests.csproj index fb6ed8a78..22baf1cb5 100644 --- a/SysML2.NET.Serializer.Xmi.Tests/SysML2.NET.Serializer.Xmi.Tests.csproj +++ b/SysML2.NET.Serializer.Xmi.Tests/SysML2.NET.Serializer.Xmi.Tests.csproj @@ -18,7 +18,7 @@ - + diff --git a/SysML2.NET.Tests/Extend/ElementExtensionsTestFixture.cs b/SysML2.NET.Tests/Extend/ElementExtensionsTestFixture.cs index 632cb7640..11f560518 100644 --- a/SysML2.NET.Tests/Extend/ElementExtensionsTestFixture.cs +++ b/SysML2.NET.Tests/Extend/ElementExtensionsTestFixture.cs @@ -289,7 +289,7 @@ public void VerifyComputePathOperation() using (Assert.EnterMultipleScope()) { Assert.That(element.ComputePathOperation, Is.EqualTo("name")); - Assert.That(secondElement.ComputePathOperation, Is.EqualTo("/2/1")); + Assert.That(secondElement.ComputePathOperation, Throws.TypeOf()); } namespaceElement.DeclaredName = "namespace"; @@ -299,7 +299,7 @@ public void VerifyComputePathOperation() using (Assert.EnterMultipleScope()) { Assert.That(element.ComputePathOperation, Is.EqualTo("name")); - Assert.That(secondElement.ComputePathOperation, Is.EqualTo("/2/1")); + Assert.That(secondElement.ComputePathOperation, Throws.TypeOf()); } } @@ -318,5 +318,29 @@ public void VerifyComputeEscapedNameOperation() element.DeclaredName = "non basic"; Assert.That(element.ComputeEscapedNameOperation, Is.EqualTo("\'non basic\'")); } + + [Test] + public void VerifyValidateIsImpliedIncluded() + { + Assert.That(() => ((IElement)null).ValidateIsImpliedIncluded(), Throws.TypeOf()); + + var element = new Definition(); + + Assert.That(element.ValidateIsImpliedIncluded, Is.True); + + var annotation = new Annotation(); + var documentation = new Documentation(); + element.AssignOwnership(annotation, documentation); + + Assert.That(element.ValidateIsImpliedIncluded, Is.True); + + annotation.IsImplied = true; + + Assert.That(element.ValidateIsImpliedIncluded, Is.False); + + element.IsImpliedIncluded = true; + + Assert.That(element.ValidateIsImpliedIncluded, Is.True); + } } } diff --git a/SysML2.NET.Tests/Extend/ImportExtensionsTestFixture.cs b/SysML2.NET.Tests/Extend/ImportExtensionsTestFixture.cs index d8d1954ed..b3e794bbe 100644 --- a/SysML2.NET.Tests/Extend/ImportExtensionsTestFixture.cs +++ b/SysML2.NET.Tests/Extend/ImportExtensionsTestFixture.cs @@ -36,9 +36,9 @@ public void ComputeImportedElement_ThrowsNotSupportedException() } [Test] - public void ComputeImportOwningNamespace_ThrowsNotSupportedException() + public void ComputeImportOwningNamespace_ThrowsArgumentNullException() { - Assert.That(() => ((IImport)null).ComputeImportOwningNamespace(), Throws.TypeOf()); + Assert.That(() => ((IImport)null).ComputeImportOwningNamespace(), Throws.TypeOf()); } } } diff --git a/SysML2.NET.Tests/Extend/NamespaceExtensionsTestFixture.cs b/SysML2.NET.Tests/Extend/NamespaceExtensionsTestFixture.cs new file mode 100644 index 000000000..28a504561 --- /dev/null +++ b/SysML2.NET.Tests/Extend/NamespaceExtensionsTestFixture.cs @@ -0,0 +1,420 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Tests.Extend +{ + using System; + + using NUnit.Framework; + + using SysML2.NET.Core.Root.Namespaces; + using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Core.POCO.Root.Namespaces; + using SysML2.NET.Core.POCO.Systems.DefinitionAndUsage; + using SysML2.NET.Extensions; + + [TestFixture] + public class NamespaceExtensionsTestFixture + { + [Test] + public void VerifyComputeImportedMembership() + { + Assert.That(() => ((INamespace)null).ComputeImportedMembership(), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + Assert.That(namespaceElement.ComputeImportedMembership(), Has.Count.EqualTo(0)); + + var importedNamespace = new Namespace(); + var importedElement = new Definition { DeclaredName = "imported" }; + var importedMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + importedNamespace.AssignOwnership(importedMembership, importedElement); + + var namespaceImport = new NamespaceImport { ImportedNamespace = importedNamespace }; + namespaceElement.AssignOwnership(namespaceImport, new Namespace()); + + Assert.That(namespaceElement.ComputeImportedMembership(), Is.EquivalentTo([importedMembership])); + } + + [Test] + public void VerifyComputeMember() + { + Assert.That(() => ((INamespace)null).ComputeMember(), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + Assert.That(namespaceElement.ComputeMember(), Has.Count.EqualTo(0)); + + var element = new Definition(); + var membership = new OwningMembership(); + namespaceElement.AssignOwnership(membership, element); + + Assert.That(namespaceElement.ComputeMember(), Is.EquivalentTo([element])); + } + + [Test] + public void VerifyComputeMembership() + { + Assert.That(() => ((INamespace)null).ComputeMembership(), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + Assert.That(namespaceElement.ComputeMembership(), Has.Count.EqualTo(0)); + + var element = new Definition(); + var membership = new OwningMembership(); + namespaceElement.AssignOwnership(membership, element); + + Assert.That(namespaceElement.ComputeMembership(), Is.EquivalentTo([membership])); + } + + [Test] + public void VerifyComputeOwnedImport() + { + Assert.That(() => ((INamespace)null).ComputeOwnedImport(), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + Assert.That(namespaceElement.ComputeOwnedImport(), Has.Count.EqualTo(0)); + + var namespaceImport = new NamespaceImport(); + namespaceElement.AssignOwnership(namespaceImport, new Namespace()); + + Assert.That(namespaceElement.ComputeOwnedImport(), Is.EquivalentTo([namespaceImport])); + } + + [Test] + public void VerifyComputeOwnedMember() + { + Assert.That(() => ((INamespace)null).ComputeOwnedMember(), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + Assert.That(namespaceElement.ComputeOwnedMember(), Has.Count.EqualTo(0)); + + var element = new Definition(); + var membership = new OwningMembership(); + namespaceElement.AssignOwnership(membership, element); + + Assert.That(namespaceElement.ComputeOwnedMember(), Is.EquivalentTo([element])); + } + + [Test] + public void VerifyComputeOwnedMembership() + { + Assert.That(() => ((INamespace)null).ComputeOwnedMembership(), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + Assert.That(namespaceElement.ComputeOwnedMembership(), Has.Count.EqualTo(0)); + + var element = new Definition(); + var membership = new OwningMembership(); + namespaceElement.AssignOwnership(membership, element); + + Assert.That(namespaceElement.ComputeOwnedMembership(), Is.EquivalentTo([membership])); + } + + [Test] + public void VerifyComputeNamesOfOperation() + { + Assert.That(() => ((INamespace)null).ComputeNamesOfOperation(new Definition()), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + Assert.That(() => namespaceElement.ComputeNamesOfOperation(null), Throws.TypeOf()); + + var element = new Definition(); + + Assert.That(namespaceElement.ComputeNamesOfOperation(element), Has.Count.EqualTo(0)); + + var membership = new Membership { MemberName = "elementName", MemberShortName = "en", MemberElement = element }; + namespaceElement.AssignOwnership(membership, element); + + Assert.That(namespaceElement.ComputeNamesOfOperation(element), Is.EquivalentTo(new[] { "en", "elementName" })); + + membership.MemberShortName = null; + + Assert.That(namespaceElement.ComputeNamesOfOperation(element), Is.EquivalentTo(new[] { "elementName" })); + } + + [Test] + public void VerifyComputeVisibilityOfOperation() + { + Assert.That(() => ((INamespace)null).ComputeVisibilityOfOperation(new Membership()), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + Assert.That(() => namespaceElement.ComputeVisibilityOfOperation(null), Throws.TypeOf()); + + var element = new Definition(); + var membership = new OwningMembership(); + namespaceElement.AssignOwnership(membership, element); + + Assert.That(namespaceElement.ComputeVisibilityOfOperation(membership), Is.EqualTo(VisibilityKind.Public)); + + membership.Visibility = VisibilityKind.Private; + + Assert.That(namespaceElement.ComputeVisibilityOfOperation(membership), Is.EqualTo(VisibilityKind.Private)); + + var unrelatedMembership = new Membership(); + + Assert.That(namespaceElement.ComputeVisibilityOfOperation(unrelatedMembership), Is.EqualTo(VisibilityKind.Private)); + } + + [Test] + public void VerifyComputeVisibleMembershipsOperation() + { + Assert.That(() => ((INamespace)null).ComputeVisibleMembershipsOperation([], false, false), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + var element = new Definition(); + var publicMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + var privateMembership = new OwningMembership { Visibility = VisibilityKind.Private }; + var privateElement = new Definition(); + + namespaceElement.AssignOwnership(publicMembership, element); + namespaceElement.AssignOwnership(privateMembership, privateElement); + + using (Assert.EnterMultipleScope()) + { + Assert.That(namespaceElement.ComputeVisibleMembershipsOperation([], false, true), Has.Count.EqualTo(2)); + Assert.That(namespaceElement.ComputeVisibleMembershipsOperation([], false, false), Is.EquivalentTo([publicMembership])); + } + + var nestedNamespace = new Namespace(); + var nestedElement = new Definition(); + var nestedMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + nestedNamespace.AssignOwnership(nestedMembership, nestedElement); + + var nestedOwning = new OwningMembership { Visibility = VisibilityKind.Public }; + namespaceElement.AssignOwnership(nestedOwning, nestedNamespace); + + using (Assert.EnterMultipleScope()) + { + Assert.That(namespaceElement.ComputeVisibleMembershipsOperation([], false, false), Has.Count.EqualTo(2)); + Assert.That(() => namespaceElement.ComputeVisibleMembershipsOperation([], true, false), Throws.TypeOf()); + } + } + + [Test] + public void VerifyComputeImportedMembershipsOperation() + { + var namespaceElement = new Namespace(); + + Assert.That(namespaceElement.ComputeImportedMembershipsOperation([]), Has.Count.EqualTo(0)); + + var importedNamespace = new Namespace(); + var importedElement = new Definition { DeclaredName = "imported" }; + var importedMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + importedNamespace.AssignOwnership(importedMembership, importedElement); + + var namespaceImport = new NamespaceImport { ImportedNamespace = importedNamespace }; + namespaceElement.AssignOwnership(namespaceImport, new Namespace()); + + Assert.That(namespaceElement.ComputeImportedMembershipsOperation([]), Is.EquivalentTo([importedMembership])); + + var collidingElement = new Definition { DeclaredName = "imported" }; + var ownedMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + namespaceElement.AssignOwnership(ownedMembership, collidingElement); + + Assert.That(namespaceElement.ComputeImportedMembershipsOperation([]), Has.Count.EqualTo(0)); + } + + [Test] + public void VerifyComputeMembershipsOfVisibilityOperation() + { + Assert.That(() => ((INamespace)null).ComputeMembershipsOfVisibilityOperation(null, []), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + var publicElement = new Definition(); + var privateElement = new Definition(); + var publicMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + var privateMembership = new OwningMembership { Visibility = VisibilityKind.Private }; + + namespaceElement.AssignOwnership(publicMembership, publicElement); + namespaceElement.AssignOwnership(privateMembership, privateElement); + + using (Assert.EnterMultipleScope()) + { + Assert.That(namespaceElement.ComputeMembershipsOfVisibilityOperation(null, []), Has.Count.EqualTo(2)); + Assert.That(namespaceElement.ComputeMembershipsOfVisibilityOperation(VisibilityKind.Public, []), Is.EquivalentTo([publicMembership])); + Assert.That(namespaceElement.ComputeMembershipsOfVisibilityOperation(VisibilityKind.Private, []), Is.EquivalentTo([privateMembership])); + Assert.That(namespaceElement.ComputeMembershipsOfVisibilityOperation(VisibilityKind.Protected, []), Has.Count.EqualTo(0)); + } + } + + [Test] + public void VerifyComputeResolveVisibleOperation() + { + Assert.That(() => ((INamespace)null).ComputeResolveVisibleOperation("name"), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(namespaceElement.ComputeResolveVisibleOperation(null), Is.Null); + Assert.That(namespaceElement.ComputeResolveVisibleOperation(" "), Is.Null); + } + + var element = new Definition { DeclaredName = "myElement" }; + var membership = new OwningMembership { Visibility = VisibilityKind.Public }; + namespaceElement.AssignOwnership(membership, element); + + using (Assert.EnterMultipleScope()) + { + Assert.That(namespaceElement.ComputeResolveVisibleOperation("myElement"), Is.EqualTo(membership)); + Assert.That(namespaceElement.ComputeResolveVisibleOperation("nonExistent"), Is.Null); + } + + membership.Visibility = VisibilityKind.Private; + + Assert.That(namespaceElement.ComputeResolveVisibleOperation("myElement"), Is.Null); + } + + [Test] + public void VerifyComputeResolveLocalOperation() + { + Assert.That(() => ((INamespace)null).ComputeResolveLocalOperation("name"), Throws.TypeOf()); + + var rootNamespace = new Namespace(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(rootNamespace.ComputeResolveLocalOperation(null), Is.Null); + Assert.That(rootNamespace.ComputeResolveLocalOperation(" "), Is.Null); + } + + var element = new Definition { DeclaredName = "myElement" }; + var membership = new OwningMembership { Visibility = VisibilityKind.Public }; + rootNamespace.AssignOwnership(membership, element); + + Assert.That(rootNamespace.ComputeResolveLocalOperation("myElement"), Is.EqualTo(membership)); + + var childNamespace = new Namespace(); + var childOwning = new OwningMembership { Visibility = VisibilityKind.Public }; + rootNamespace.AssignOwnership(childOwning, childNamespace); + + using (Assert.EnterMultipleScope()) + { + Assert.That(childNamespace.ComputeResolveLocalOperation("myElement"), Is.EqualTo(membership)); + Assert.That(childNamespace.ComputeResolveLocalOperation("nonExistent"), Is.Null); + } + } + + [Test] + public void VerifyComputeResolveOperation() + { + Assert.That(() => ((INamespace)null).ComputeResolveOperation("name"), Throws.TypeOf()); + + var rootNamespace = new Namespace(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(rootNamespace.ComputeResolveOperation(null), Is.Null); + Assert.That(rootNamespace.ComputeResolveOperation(" "), Is.Null); + } + + var childNamespace = new Namespace { DeclaredName = "child" }; + var childMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + rootNamespace.AssignOwnership(childMembership, childNamespace); + + var element = new Definition { DeclaredName = "leaf" }; + var elementMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + childNamespace.AssignOwnership(elementMembership, element); + + using (Assert.EnterMultipleScope()) + { + Assert.That(rootNamespace.ComputeResolveOperation("child"), Is.EqualTo(childMembership)); + Assert.That(rootNamespace.ComputeResolveOperation("child::leaf"), Is.EqualTo(elementMembership)); + Assert.That(rootNamespace.ComputeResolveOperation("child::nonExistent"), Is.Null); + Assert.That(rootNamespace.ComputeResolveOperation("nonExistent::leaf"), Is.Null); + } + } + + [Test] + public void VerifyComputeResolveGlobalOperation() + { + Assert.That(() => ((INamespace)null).ComputeResolveGlobalOperation("name"), Throws.TypeOf()); + + var rootNamespace = new Namespace(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(rootNamespace.ComputeResolveGlobalOperation(null), Is.Null); + Assert.That(rootNamespace.ComputeResolveGlobalOperation(" "), Is.Null); + } + + var childNamespace = new Namespace { DeclaredName = "child" }; + var childMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + rootNamespace.AssignOwnership(childMembership, childNamespace); + + var element = new Definition { DeclaredName = "leaf" }; + var elementMembership = new OwningMembership { Visibility = VisibilityKind.Public }; + childNamespace.AssignOwnership(elementMembership, element); + + using (Assert.EnterMultipleScope()) + { + Assert.That(childNamespace.ComputeResolveGlobalOperation("child"), Is.EqualTo(childMembership)); + Assert.That(childNamespace.ComputeResolveGlobalOperation("child::leaf"), Is.EqualTo(elementMembership)); + Assert.That(childNamespace.ComputeResolveGlobalOperation("nonExistent"), Is.Null); + } + } + + [Test] + public void VerifyComputeQualificationOfOperation() + { + Assert.That(() => ((INamespace)null).ComputeQualificationOfOperation("name"), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(namespaceElement.ComputeQualificationOfOperation(null), Is.Null); + Assert.That(namespaceElement.ComputeQualificationOfOperation(" "), Is.Null); + Assert.That(namespaceElement.ComputeQualificationOfOperation("simpleName"), Is.Null); + Assert.That(namespaceElement.ComputeQualificationOfOperation("a::b"), Is.EqualTo("a")); + Assert.That(namespaceElement.ComputeQualificationOfOperation("a::b::c"), Is.EqualTo("a::b")); + Assert.That(namespaceElement.ComputeQualificationOfOperation("'a::b'::c"), Is.EqualTo("'a::b'")); + Assert.That(namespaceElement.ComputeQualificationOfOperation("a::'b::c'"), Is.EqualTo("a")); + } + } + + [Test] + public void VerifyComputeUnqualifiedNameOfOperation() + { + Assert.That(() => ((INamespace)null).ComputeUnqualifiedNameOfOperation("name"), Throws.TypeOf()); + + var namespaceElement = new Namespace(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(namespaceElement.ComputeUnqualifiedNameOfOperation(null), Is.Null); + Assert.That(namespaceElement.ComputeUnqualifiedNameOfOperation(" "), Is.Null); + Assert.That(namespaceElement.ComputeUnqualifiedNameOfOperation("simpleName"), Is.EqualTo("simpleName")); + Assert.That(namespaceElement.ComputeUnqualifiedNameOfOperation("a::b"), Is.EqualTo("b")); + Assert.That(namespaceElement.ComputeUnqualifiedNameOfOperation("a::b::c"), Is.EqualTo("c")); + Assert.That(namespaceElement.ComputeUnqualifiedNameOfOperation("a::'non basic'"), Is.EqualTo("non basic")); + Assert.That(namespaceElement.ComputeUnqualifiedNameOfOperation("a::'it\\'s'"), Is.EqualTo("it's")); + Assert.That(namespaceElement.ComputeUnqualifiedNameOfOperation("'a::b'::c"), Is.EqualTo("c")); + } + } + } +} diff --git a/SysML2.NET.Tests/Extend/OwningMembershipExtensionsTestFixture.cs b/SysML2.NET.Tests/Extend/OwningMembershipExtensionsTestFixture.cs index 61b8b4490..bc38e1f12 100644 --- a/SysML2.NET.Tests/Extend/OwningMembershipExtensionsTestFixture.cs +++ b/SysML2.NET.Tests/Extend/OwningMembershipExtensionsTestFixture.cs @@ -48,9 +48,9 @@ public void ComputeOwnedMemberName_ThrowsNotSupportedException() } [Test] - public void ComputeOwnedMemberShortName_ThrowsNotSupportedException() + public void ComputeOwnedMemberShortName_ThrowsArgumentNullException() { - Assert.That(() => ((IOwningMembership)null).ComputeOwnedMemberShortName(), Throws.TypeOf()); + Assert.That(() => ((IOwningMembership)null).ComputeOwnedMemberShortName(), Throws.TypeOf()); } } } diff --git a/SysML2.NET.Tests/SysML2.NET.Tests.csproj b/SysML2.NET.Tests/SysML2.NET.Tests.csproj index 4d3b47a14..980bce51a 100644 --- a/SysML2.NET.Tests/SysML2.NET.Tests.csproj +++ b/SysML2.NET.Tests/SysML2.NET.Tests.csproj @@ -18,7 +18,7 @@ - + @@ -38,9 +38,5 @@ - - - - diff --git a/SysML2.NET.Viewer.Tests/SysML2.NET.Viewer.Tests.csproj b/SysML2.NET.Viewer.Tests/SysML2.NET.Viewer.Tests.csproj index 5b1195cf5..ca92b31f6 100644 --- a/SysML2.NET.Viewer.Tests/SysML2.NET.Viewer.Tests.csproj +++ b/SysML2.NET.Viewer.Tests/SysML2.NET.Viewer.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/SysML2.NET.Viewer/SysML2.NET.Viewer.csproj b/SysML2.NET.Viewer/SysML2.NET.Viewer.csproj index 8e2529e36..8316307b9 100644 --- a/SysML2.NET.Viewer/SysML2.NET.Viewer.csproj +++ b/SysML2.NET.Viewer/SysML2.NET.Viewer.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs index d6a523e53..0caf04fb5 100644 --- a/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AcceptActionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1168,6 +1169,679 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// Check if this AcceptActionUsage is the triggerAction of a TransitionUsage. + /// + /// + /// The expected + /// + public bool IsTriggerAction() => this.ComputeIsTriggerActionOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs index ad96965a7..9691c7dd0 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActionDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -834,6 +836,407 @@ public ActionDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs index 7680237bf..f7db86727 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1143,6 +1144,671 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs b/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs index 3daa8b556..b817fa620 100644 --- a/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ActorMembership.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -442,6 +443,109 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return the required value of the direction of the ownedMemberParameter. By default, this is in. + /// + /// + /// The expected + /// + public FeatureDirectionKind ParameterDirection() => this.ComputeParameterDirectionOperation(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs index 95b049dd6..56e9a7f76 100644 --- a/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/AllocationDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -952,6 +954,427 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs b/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs index 386d12504..773ddbbc9 100644 --- a/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AllocationUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1277,6 +1278,648 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs index 51a00ed82..4707948d4 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -904,6 +906,407 @@ public AnalysisCaseDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs index f6b87adfa..ba833c90a 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnalysisCaseUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1229,6 +1230,726 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A CalculationUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs b/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs index d664fd698..d89032412 100644 --- a/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs +++ b/SysML2.NET/Core/AutoGenPoco/AnnotatingElement.cs @@ -264,6 +264,56 @@ public AnnotatingElement() [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Annotation.cs b/SysML2.NET/Core/AutoGenPoco/Annotation.cs index d09ee6382..c9b494b4f 100644 --- a/SysML2.NET/Core/AutoGenPoco/Annotation.cs +++ b/SysML2.NET/Core/AutoGenPoco/Annotation.cs @@ -344,6 +344,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs index 7544b9389..c12dfa4b0 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssertConstraintUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1195,6 +1196,693 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A ConstraintUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// The naming Feature of a ConstraintUsage that is owned by a RequirementConstraintMembership and has + /// an ownedReferenceSubsetting is the featureTarget of the referencedFeature of that + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs index c136253bd..92911b9e3 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssignmentActionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1167,6 +1168,671 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Association.cs b/SysML2.NET/Core/AutoGenPoco/Association.cs index 6f98b8bfd..c5f22db77 100644 --- a/SysML2.NET/Core/AutoGenPoco/Association.cs +++ b/SysML2.NET/Core/AutoGenPoco/Association.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -626,6 +628,427 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs b/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs index caaa99a90..9becc2cce 100644 --- a/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs +++ b/SysML2.NET/Core/AutoGenPoco/AssociationStructure.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -628,6 +630,427 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs b/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs index ee2318b72..d91fcd5e0 100644 --- a/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/AttributeDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Attributes using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -803,6 +805,407 @@ public AttributeDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs b/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs index 3eaad33cb..644d4ae10 100644 --- a/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/AttributeUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Attributes using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -1098,6 +1099,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Behavior.cs b/SysML2.NET/Core/AutoGenPoco/Behavior.cs index aea7b579f..36558c145 100644 --- a/SysML2.NET/Core/AutoGenPoco/Behavior.cs +++ b/SysML2.NET/Core/AutoGenPoco/Behavior.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -536,6 +538,407 @@ public Behavior() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs b/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs index 1211d294c..bd8c1d590 100644 --- a/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs +++ b/SysML2.NET/Core/AutoGenPoco/BindingConnector.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Associations; @@ -865,6 +866,630 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs index 0bc3b6384..ea5336aa1 100644 --- a/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/BindingConnectorAsUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -1198,6 +1199,648 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs b/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs index 9760ce726..2cba11e4a 100644 --- a/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/BooleanExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -794,6 +795,654 @@ public BooleanExpression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeModelLevelEvaluableOperation(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs index e5507f34b..a85ff6ba4 100644 --- a/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/CalculationDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -871,6 +873,407 @@ public CalculationDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs b/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs index 9aca6dcdc..59734e37a 100644 --- a/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/CalculationUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1181,6 +1182,726 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A CalculationUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs index 9c67cd9d8..6725297d8 100644 --- a/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/CaseDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Cases using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -896,6 +898,407 @@ public CaseDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs index 7944c922f..50543efa5 100644 --- a/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/CaseUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Cases using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1211,6 +1212,726 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A CalculationUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Class.cs b/SysML2.NET/Core/AutoGenPoco/Class.cs index f577aba50..f285dd672 100644 --- a/SysML2.NET/Core/AutoGenPoco/Class.cs +++ b/SysML2.NET/Core/AutoGenPoco/Class.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Classes using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -518,6 +520,407 @@ public Class() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Classifier.cs b/SysML2.NET/Core/AutoGenPoco/Classifier.cs index f5ac18d6a..7c8df5249 100644 --- a/SysML2.NET/Core/AutoGenPoco/Classifier.cs +++ b/SysML2.NET/Core/AutoGenPoco/Classifier.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; @@ -521,6 +523,407 @@ public Classifier() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs b/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs index 551256880..08df0a279 100644 --- a/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/CollectExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -827,6 +828,699 @@ string IOperatorExpression.Operator [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Apply the Function that is the type of this InvocationExpression to the argument values resulting + /// from evaluating each of the argument Expressions on the given target. If the application is not + /// possible, then return an empty sequence. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// The instantiatedType of an OperatorExpression is the resolution of it's operator from one of the + /// packages BaseFunctions, DataFunctions, or ControlFunctions from the Kernel Function Library. + /// + /// + /// The expected + /// + public IType InstantiatedType() => this.ComputeRedefinedInstantiatedTypeOperation(); + + /// + /// Return the Type to act as the instantiatedType for this InstantiationExpression. By default, this is + /// the memberElement of the first ownedMembership that is not a FeatureMembership, which must be a + /// Type. Note. This operation is overridden in the subclass + /// OperatorExpression. + /// + /// + /// The expected + /// + IType IInstantiationExpression.InstantiatedType() => this.InstantiatedType(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// An InvocationExpression is model-level evaluable if all its argument Expressions are model-level + /// evaluable and its function is model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Comment.cs b/SysML2.NET/Core/AutoGenPoco/Comment.cs index d7fcd96b7..0ed01ef2d 100644 --- a/SysML2.NET/Core/AutoGenPoco/Comment.cs +++ b/SysML2.NET/Core/AutoGenPoco/Comment.cs @@ -278,6 +278,56 @@ public Comment() [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs index 1fa722a87..9d3003e04 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConcernDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -934,6 +936,407 @@ string Root.Elements.IElement.DeclaredShortName [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs index 5423bab6b..70e58dce4 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConcernUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1277,6 +1278,693 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A ConstraintUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// The naming Feature of a ConstraintUsage that is owned by a RequirementConstraintMembership and has + /// an ownedReferenceSubsetting is the featureTarget of the referencedFeature of that + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs index 1847a53e7..b224c03bf 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -839,6 +841,416 @@ public ConjugatedPortDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If the name of the originalPortDefinition is non-empty, then return that with the character ~ + /// prepended. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs index d3f86460d..b8b5688e0 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConjugatedPortTyping.cs @@ -407,6 +407,76 @@ IType Core.Features.IFeatureTyping.Type [Implements(implementation: "IFeatureTyping.TypedFeature")] public IFeature TypedFeature { get; set; } + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Conjugation.cs b/SysML2.NET/Core/AutoGenPoco/Conjugation.cs index 9256126e5..6760befce 100644 --- a/SysML2.NET/Core/AutoGenPoco/Conjugation.cs +++ b/SysML2.NET/Core/AutoGenPoco/Conjugation.cs @@ -338,6 +338,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs index b99c5ee6e..f56a5de59 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConnectionDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -940,6 +942,427 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs index c43f815e4..3e64d8cde 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConnectionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1270,6 +1271,648 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Connector.cs b/SysML2.NET/Core/AutoGenPoco/Connector.cs index c377ccf24..a61be8681 100644 --- a/SysML2.NET/Core/AutoGenPoco/Connector.cs +++ b/SysML2.NET/Core/AutoGenPoco/Connector.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Associations; @@ -867,6 +868,630 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs index a174b9950..3de725ea8 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstraintDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -854,6 +856,407 @@ public ConstraintDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs index 5fa605f3a..965e69ae2 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstraintUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1180,6 +1181,693 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A ConstraintUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// The naming Feature of a ConstraintUsage that is owned by a RequirementConstraintMembership and has + /// an ownedReferenceSubsetting is the featureTarget of the referencedFeature of that + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs b/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs index 3dee94d36..4b037f6fa 100644 --- a/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/ConstructorExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -805,6 +806,677 @@ public ConstructorExpression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Type to act as the instantiatedType for this InstantiationExpression. By default, this is + /// the memberElement of the first ownedMembership that is not a FeatureMembership, which must be a + /// Type. Note. This operation is overridden in the subclass + /// OperatorExpression. + /// + /// + /// The expected + /// + public IType InstantiatedType() => this.ComputeInstantiatedTypeOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A ConstructorExpression is model-level evaluable if all its argument Expressions are model-level + /// evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs b/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs index 3d8258228..d7cd66f2a 100644 --- a/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs +++ b/SysML2.NET/Core/AutoGenPoco/CrossSubsetting.cs @@ -425,6 +425,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/DataType.cs b/SysML2.NET/Core/AutoGenPoco/DataType.cs index 5db59bdec..167b21ed7 100644 --- a/SysML2.NET/Core/AutoGenPoco/DataType.cs +++ b/SysML2.NET/Core/AutoGenPoco/DataType.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.DataTypes using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -522,6 +524,407 @@ public DataType() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs b/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs index 14b24ba63..81d5faa2f 100644 --- a/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/DecisionNode.cs @@ -30,12 +30,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -1139,6 +1141,689 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Check that the given Multiplicity has lowerBound and upperBound expressions that are model-level + /// evaluable to the given lower and upper values. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool MultiplicityHasBounds(IMultiplicity mult, int lower, string upper) => this.ComputeMultiplicityHasBoundsOperation(mult, lower, upper); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Definition.cs b/SysML2.NET/Core/AutoGenPoco/Definition.cs index 6d82220eb..5c61f5dde 100644 --- a/SysML2.NET/Core/AutoGenPoco/Definition.cs +++ b/SysML2.NET/Core/AutoGenPoco/Definition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -807,6 +809,407 @@ public Definition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Dependency.cs b/SysML2.NET/Core/AutoGenPoco/Dependency.cs index 9f2a17b26..f8b54b5cd 100644 --- a/SysML2.NET/Core/AutoGenPoco/Dependency.cs +++ b/SysML2.NET/Core/AutoGenPoco/Dependency.cs @@ -320,6 +320,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Differencing.cs b/SysML2.NET/Core/AutoGenPoco/Differencing.cs index 7f3d8af35..c9a3f3332 100644 --- a/SysML2.NET/Core/AutoGenPoco/Differencing.cs +++ b/SysML2.NET/Core/AutoGenPoco/Differencing.cs @@ -320,6 +320,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IDifferencing.TypeDifferenced")] public IType typeDifferenced => this.ComputeTypeDifferenced(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Disjoining.cs b/SysML2.NET/Core/AutoGenPoco/Disjoining.cs index 792a797d3..7c83a2d26 100644 --- a/SysML2.NET/Core/AutoGenPoco/Disjoining.cs +++ b/SysML2.NET/Core/AutoGenPoco/Disjoining.cs @@ -334,6 +334,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IDisjoining.TypeDisjoined")] public IType TypeDisjoined { get; set; } + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Documentation.cs b/SysML2.NET/Core/AutoGenPoco/Documentation.cs index 40a7cc787..672a3e9d1 100644 --- a/SysML2.NET/Core/AutoGenPoco/Documentation.cs +++ b/SysML2.NET/Core/AutoGenPoco/Documentation.cs @@ -288,6 +288,56 @@ public Documentation() [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs b/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs index 30642113f..a01ff6ba9 100644 --- a/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ElementFilterMembership.cs @@ -412,6 +412,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs b/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs index 50f4e8bad..9890f8f08 100644 --- a/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/EndFeatureMembership.cs @@ -428,6 +428,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs index 280716ee1..14a1ddbfb 100644 --- a/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/EnumerationDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -827,6 +829,407 @@ bool Systems.DefinitionAndUsage.IDefinition.IsVariation [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs b/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs index 432035f5f..20442bc6c 100644 --- a/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/EnumerationUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -1101,6 +1102,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs index 3813bd42b..96219e74f 100644 --- a/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/EventOccurrenceUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1132,6 +1133,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs b/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs index 7644095b9..a3e1be755 100644 --- a/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ExhibitStateUsage.cs @@ -30,12 +30,14 @@ namespace SysML2.NET.Core.POCO.Systems.States using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -1226,6 +1228,695 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// Check if this StateUsage is composite and has an owningType that is a StateDefinition or StateUsage + /// with the given value of isParallel, but is not an entryAction, doAction, or exitAction. If so, then + /// it represents a StateAction that is a substate or exclusiveState (for isParallel = false) of another + /// StateAction. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsSubstateUsage(bool isParallel) => this.ComputeIsSubstateUsageOperation(isParallel); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// The naming Feature of a PerformActionUsage is its performedAction, if this is different than the + /// PerformActionUsage. If the PerformActionUsage is its own performedAction, then the naming Feature is + /// the same as the usual default for a Usage. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Expression.cs b/SysML2.NET/Core/AutoGenPoco/Expression.cs index 4f74d7901..d2bcf72a5 100644 --- a/SysML2.NET/Core/AutoGenPoco/Expression.cs +++ b/SysML2.NET/Core/AutoGenPoco/Expression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -788,6 +789,654 @@ public Expression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeModelLevelEvaluableOperation(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Feature.cs b/SysML2.NET/Core/AutoGenPoco/Feature.cs index 1bc856e10..70eec94b2 100644 --- a/SysML2.NET/Core/AutoGenPoco/Feature.cs +++ b/SysML2.NET/Core/AutoGenPoco/Feature.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -751,6 +752,610 @@ public Feature() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs b/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs index 703637a14..173745030 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureChainExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -837,6 +838,708 @@ string IOperatorExpression.Operator [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Apply the Function that is the type of this InvocationExpression to the argument values resulting + /// from evaluating each of the argument Expressions on the given target. If the application is not + /// possible, then return an empty sequence. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// The instantiatedType of an OperatorExpression is the resolution of it's operator from one of the + /// packages BaseFunctions, DataFunctions, or ControlFunctions from the Kernel Function Library. + /// + /// + /// The expected + /// + public IType InstantiatedType() => this.ComputeRedefinedInstantiatedTypeOperation(); + + /// + /// Return the Type to act as the instantiatedType for this InstantiationExpression. By default, this is + /// the memberElement of the first ownedMembership that is not a FeatureMembership, which must be a + /// Type. Note. This operation is overridden in the subclass + /// OperatorExpression. + /// + /// + /// The expected + /// + IType IInstantiationExpression.InstantiatedType() => this.InstantiatedType(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// An InvocationExpression is model-level evaluable if all its argument Expressions are model-level + /// evaluable and its function is model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Return the first ownedFeature of the first owned input parameter of this FeatureChainExpression (if + /// any). + /// + /// + /// The expected + /// + public IFeature SourceTargetFeature() => this.ComputeSourceTargetFeatureOperation(); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs b/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs index d2ada4c8e..5b937516c 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureChaining.cs @@ -320,6 +320,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs b/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs index 46b73511e..72f5f0d21 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureInverting.cs @@ -335,6 +335,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs b/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs index 2d1d971ff..762cf6ec0 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureMembership.cs @@ -423,6 +423,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs b/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs index 5b9707603..d76f68284 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureReferenceExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -794,6 +795,689 @@ public FeatureReferenceExpression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// First, determine a value Expression for the referent:
    + ///
  • If the target Element is a Type that has a feature that is the referent or (directly + /// or indirectly) redefines it, then the value Expression of the FeatureValue for that feature (if + /// any).
  • Else, if the referent has no featuringTypes, the value + /// Expression of the FeatureValue for the referent (if any).
+ /// Then:
  • If such a + /// value Expression exists, return the result of evaluating that Expression on the target.
  • + ///
  • Else, if the referent is not an Expression, return the referent.
  • + ///
  • Else return the empty sequence.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A FeatureReferenceExpression is model-level evaluable if it's referent + ///
  • conforms to the self-reference feature Anything::self;
  • + ///
  • is an Expression that is model-level evaluable;
  • + ///
  • has an owningType that is a Metaclass or MetadataFeature; or
  • + ///
  • has no featuringTypes and, if it has a FeatureValue, the value Expression is model-level + /// evaluable.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs b/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs index 6e70454b2..8d74cd51d 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureTyping.cs @@ -380,6 +380,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IFeatureTyping.TypedFeature")] public IFeature TypedFeature { get; set; } + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs b/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs index 9cb094a4a..9d7e4c0b4 100644 --- a/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs +++ b/SysML2.NET/Core/AutoGenPoco/FeatureValue.cs @@ -442,6 +442,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Flow.cs b/SysML2.NET/Core/AutoGenPoco/Flow.cs index df70f3314..fe7f78fa2 100644 --- a/SysML2.NET/Core/AutoGenPoco/Flow.cs +++ b/SysML2.NET/Core/AutoGenPoco/Flow.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -937,6 +938,630 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs b/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs index e5bcd4540..897f0f249 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -953,6 +955,427 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs b/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs index 22caf16da..946d581e1 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowEnd.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; @@ -740,6 +741,610 @@ public FlowEnd() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs index 12152df08..5dd072bc5 100644 --- a/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/FlowUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -38,6 +39,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; using SysML2.NET.Core.POCO.Kernel.Connectors; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Kernel.Interactions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -1328,6 +1330,691 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs index 25550521b..c524ed53f 100644 --- a/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ForLoopActionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1168,6 +1169,671 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ForkNode.cs b/SysML2.NET/Core/AutoGenPoco/ForkNode.cs index 4e3ac23d8..0a8c70e34 100644 --- a/SysML2.NET/Core/AutoGenPoco/ForkNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/ForkNode.cs @@ -30,12 +30,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -1140,6 +1142,689 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
  1. Neither this Feature or the otherType have any + /// ownedFeatures.
  2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
  3. + ///
  4. This Feature can access the otherType.
+ ///
+ /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Check that the given Multiplicity has lowerBound and upperBound expressions that are model-level + /// evaluable to the given lower and upper values. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool MultiplicityHasBounds(IMultiplicity mult, int lower, string upper) => this.ComputeMultiplicityHasBoundsOperation(mult, lower, upper); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs b/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs index cb68e8c3f..6fd6bd6c6 100644 --- a/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/FramedConcernMembership.cs @@ -484,6 +484,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Function.cs b/SysML2.NET/Core/AutoGenPoco/Function.cs index e97ea5831..5db0e08df 100644 --- a/SysML2.NET/Core/AutoGenPoco/Function.cs +++ b/SysML2.NET/Core/AutoGenPoco/Function.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -565,6 +567,407 @@ public Function() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
    + ///
  1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
  2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
  3. + ///
For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
+ /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IAcceptActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IAcceptActionUsage.cs index a3aef7f32..a77345ffc 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAcceptActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAcceptActionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -100,7 +101,7 @@ public partial interface IAcceptActionUsage : IActionUsage /// /// The expected /// - bool IsTriggerAction() => this.ComputeIsTriggerActionOperation(); + bool IsTriggerAction(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IActionDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IActionDefinition.cs index ed075ed25..c773152ab 100644 --- a/SysML2.NET/Core/AutoGenPoco/IActionDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IActionDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IActionUsage.cs index 6c408de56..05dbc0a69 100644 --- a/SysML2.NET/Core/AutoGenPoco/IActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IActionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -87,7 +88,7 @@ public partial interface IActionUsage : IStep, IOccurrenceUsage /// /// The expected collection of /// - List InputParameters() => this.ComputeInputParametersOperation(); + List InputParameters(); /// /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less @@ -99,7 +100,7 @@ public partial interface IActionUsage : IStep, IOccurrenceUsage /// /// The expected /// - IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + IFeature InputParameter(int i); /// /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the @@ -112,7 +113,7 @@ public partial interface IActionUsage : IStep, IOccurrenceUsage /// /// The expected /// - IExpression Argument(int i) => this.ComputeArgumentOperation(i); + IExpression Argument(int i); /// /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or @@ -122,7 +123,7 @@ public partial interface IActionUsage : IStep, IOccurrenceUsage /// /// The expected /// - bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + bool IsSubactionUsage(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IActorMembership.cs b/SysML2.NET/Core/AutoGenPoco/IActorMembership.cs index 714380dbd..a0645ba19 100644 --- a/SysML2.NET/Core/AutoGenPoco/IActorMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/IActorMembership.cs @@ -28,6 +28,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IAllocationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IAllocationDefinition.cs index f57c9765c..ec895fff7 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAllocationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAllocationDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IAllocationUsage.cs b/SysML2.NET/Core/AutoGenPoco/IAllocationUsage.cs index c7f060800..69f85759a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAllocationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAllocationUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Allocations using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IAnalysisCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IAnalysisCaseDefinition.cs index 758a96010..e370955e6 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAnalysisCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAnalysisCaseDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IAnalysisCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/IAnalysisCaseUsage.cs index 7600e2de4..4fb3efd6e 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAnalysisCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAnalysisCaseUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.AnalysisCases using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IAssertConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/IAssertConstraintUsage.cs index e92655626..ef6eeb55c 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAssertConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAssertConstraintUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IAssignmentActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IAssignmentActionUsage.cs index d49cc921c..35e7dacf4 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAssignmentActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAssignmentActionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IAssociation.cs b/SysML2.NET/Core/AutoGenPoco/IAssociation.cs index 4f9063754..18b55ecdc 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAssociation.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAssociation.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IAssociationStructure.cs b/SysML2.NET/Core/AutoGenPoco/IAssociationStructure.cs index d4d5a3084..ef2e693db 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAssociationStructure.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAssociationStructure.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Associations using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IAttributeDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IAttributeDefinition.cs index 7d91acba5..b51387262 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAttributeDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAttributeDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Attributes using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IAttributeUsage.cs b/SysML2.NET/Core/AutoGenPoco/IAttributeUsage.cs index 84f9069c5..3933f906c 100644 --- a/SysML2.NET/Core/AutoGenPoco/IAttributeUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IAttributeUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Attributes using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IBehavior.cs b/SysML2.NET/Core/AutoGenPoco/IBehavior.cs index 3285fe05c..248c8e6fe 100644 --- a/SysML2.NET/Core/AutoGenPoco/IBehavior.cs +++ b/SysML2.NET/Core/AutoGenPoco/IBehavior.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IBindingConnector.cs b/SysML2.NET/Core/AutoGenPoco/IBindingConnector.cs index 473a64339..db30088c1 100644 --- a/SysML2.NET/Core/AutoGenPoco/IBindingConnector.cs +++ b/SysML2.NET/Core/AutoGenPoco/IBindingConnector.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Associations; diff --git a/SysML2.NET/Core/AutoGenPoco/IBindingConnectorAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/IBindingConnectorAsUsage.cs index c64a422a0..99bb0cd98 100644 --- a/SysML2.NET/Core/AutoGenPoco/IBindingConnectorAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IBindingConnectorAsUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IBooleanExpression.cs b/SysML2.NET/Core/AutoGenPoco/IBooleanExpression.cs index 38bb67827..874f34d5e 100644 --- a/SysML2.NET/Core/AutoGenPoco/IBooleanExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IBooleanExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/ICalculationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ICalculationDefinition.cs index ca99dcc3c..9d4164011 100644 --- a/SysML2.NET/Core/AutoGenPoco/ICalculationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ICalculationDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/ICalculationUsage.cs b/SysML2.NET/Core/AutoGenPoco/ICalculationUsage.cs index 8f6f64709..ddc702326 100644 --- a/SysML2.NET/Core/AutoGenPoco/ICalculationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ICalculationUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Calculations using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -90,7 +91,7 @@ public partial interface ICalculationUsage : IExpression, IActionUsage /// /// The expected /// - new bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + new bool ModelLevelEvaluable(List visited); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ICaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ICaseDefinition.cs index b0f914fb0..f6b5b8d72 100644 --- a/SysML2.NET/Core/AutoGenPoco/ICaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ICaseDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Cases using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/ICaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/ICaseUsage.cs index 08242682a..07ebb52ff 100644 --- a/SysML2.NET/Core/AutoGenPoco/ICaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ICaseUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Cases using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IClass.cs b/SysML2.NET/Core/AutoGenPoco/IClass.cs index f0acae4fc..ca4ee9d01 100644 --- a/SysML2.NET/Core/AutoGenPoco/IClass.cs +++ b/SysML2.NET/Core/AutoGenPoco/IClass.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Classes using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IClassifier.cs b/SysML2.NET/Core/AutoGenPoco/IClassifier.cs index 5cb5195cc..6153fa05f 100644 --- a/SysML2.NET/Core/AutoGenPoco/IClassifier.cs +++ b/SysML2.NET/Core/AutoGenPoco/IClassifier.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Core.Classifiers using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; diff --git a/SysML2.NET/Core/AutoGenPoco/ICollectExpression.cs b/SysML2.NET/Core/AutoGenPoco/ICollectExpression.cs index 36ed1ae36..355b2fe9d 100644 --- a/SysML2.NET/Core/AutoGenPoco/ICollectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/ICollectExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/IConcernDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IConcernDefinition.cs index fe3b3ec66..dd4e32a72 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConcernDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConcernDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IConcernUsage.cs b/SysML2.NET/Core/AutoGenPoco/IConcernUsage.cs index ab2e496b4..66be5c288 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConcernUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConcernUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IConjugatedPortDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IConjugatedPortDefinition.cs index 29d057501..5c99b8438 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConjugatedPortDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConjugatedPortDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -93,7 +95,7 @@ public partial interface IConjugatedPortDefinition : IPortDefinition /// /// The expected /// - new string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + new string EffectiveName(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IConnectionDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IConnectionDefinition.cs index 3ef7e8ee5..b8b0f69d1 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConnectionDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConnectionDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IConnectionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IConnectionUsage.cs index 3b35db9e1..b6f458647 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConnectionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConnectionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IConnector.cs b/SysML2.NET/Core/AutoGenPoco/IConnector.cs index 1a9fd3c14..9da53ad03 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConnector.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConnector.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Associations; diff --git a/SysML2.NET/Core/AutoGenPoco/IConnectorAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/IConnectorAsUsage.cs index 573701b79..01464b568 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConnectorAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConnectorAsUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IConstraintDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IConstraintDefinition.cs index e05a1f3d1..09872bac9 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConstraintDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConstraintDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IConstraintUsage.cs b/SysML2.NET/Core/AutoGenPoco/IConstraintUsage.cs index 297ea78f0..aa0b9d660 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConstraintUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConstraintUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Constraints using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -89,7 +90,7 @@ public partial interface IConstraintUsage : IBooleanExpression, IOccurrenceUsage /// /// The expected /// - new IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + new IFeature NamingFeature(); /// /// A ConstraintUsage is not model-level evaluable. @@ -100,7 +101,7 @@ public partial interface IConstraintUsage : IBooleanExpression, IOccurrenceUsage /// /// The expected /// - new bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + new bool ModelLevelEvaluable(List visited); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IConstructorExpression.cs b/SysML2.NET/Core/AutoGenPoco/IConstructorExpression.cs index 11ca9a6e1..d6bc519fd 100644 --- a/SysML2.NET/Core/AutoGenPoco/IConstructorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IConstructorExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -57,7 +58,7 @@ public partial interface IConstructorExpression : IInstantiationExpression /// /// The expected /// - new bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + new bool ModelLevelEvaluable(List visited); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IControlNode.cs b/SysML2.NET/Core/AutoGenPoco/IControlNode.cs index f0ae77d54..684fa2f05 100644 --- a/SysML2.NET/Core/AutoGenPoco/IControlNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/IControlNode.cs @@ -29,12 +29,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -86,7 +88,7 @@ public partial interface IControlNode : IActionUsage /// /// The expected /// - bool MultiplicityHasBounds(IMultiplicity mult, int lower, string upper) => this.ComputeMultiplicityHasBoundsOperation(mult, lower, upper); + bool MultiplicityHasBounds(IMultiplicity mult, int lower, string upper); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IDataType.cs b/SysML2.NET/Core/AutoGenPoco/IDataType.cs index 8459083f3..7bb0c38c1 100644 --- a/SysML2.NET/Core/AutoGenPoco/IDataType.cs +++ b/SysML2.NET/Core/AutoGenPoco/IDataType.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.DataTypes using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IDecisionNode.cs b/SysML2.NET/Core/AutoGenPoco/IDecisionNode.cs index 6c7a93b57..c98cbe2da 100644 --- a/SysML2.NET/Core/AutoGenPoco/IDecisionNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/IDecisionNode.cs @@ -29,12 +29,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; diff --git a/SysML2.NET/Core/AutoGenPoco/IDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IDefinition.cs index d88b6f112..727c1147c 100644 --- a/SysML2.NET/Core/AutoGenPoco/IDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IElement.cs b/SysML2.NET/Core/AutoGenPoco/IElement.cs index ed9015661..a9dc7220c 100644 --- a/SysML2.NET/Core/AutoGenPoco/IElement.cs +++ b/SysML2.NET/Core/AutoGenPoco/IElement.cs @@ -193,7 +193,7 @@ public partial interface IElement /// /// The expected /// - string EscapedName() => this.ComputeEscapedNameOperation(); + string EscapedName(); /// /// Return an effective shortName for this Element. By default this is the same as its @@ -202,7 +202,7 @@ public partial interface IElement /// /// The expected /// - string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + string EffectiveShortName(); /// /// Return an effective name for this Element. By default this is the same as its declaredName. @@ -210,7 +210,7 @@ public partial interface IElement /// /// The expected /// - string EffectiveName() => this.ComputeEffectiveNameOperation(); + string EffectiveName(); /// /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. @@ -218,7 +218,7 @@ public partial interface IElement /// /// The expected /// - INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + INamespace LibraryNamespace(); /// /// Return a unique description of the location of this Element in the containment structure rooted in a @@ -232,7 +232,7 @@ public partial interface IElement /// /// The expected /// - string Path() => this.ComputePathOperation(); + string Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IEnumerationDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IEnumerationDefinition.cs index 3add4f468..84d4572f8 100644 --- a/SysML2.NET/Core/AutoGenPoco/IEnumerationDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IEnumerationDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IEnumerationUsage.cs b/SysML2.NET/Core/AutoGenPoco/IEnumerationUsage.cs index 43afe2c54..6323caed9 100644 --- a/SysML2.NET/Core/AutoGenPoco/IEnumerationUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IEnumerationUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Enumerations using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IEventOccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/IEventOccurrenceUsage.cs index c62a125f7..37b889e8c 100644 --- a/SysML2.NET/Core/AutoGenPoco/IEventOccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IEventOccurrenceUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IExhibitStateUsage.cs b/SysML2.NET/Core/AutoGenPoco/IExhibitStateUsage.cs index 48fd33a78..4e129fe1a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IExhibitStateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IExhibitStateUsage.cs @@ -29,12 +29,14 @@ namespace SysML2.NET.Core.POCO.Systems.States using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; diff --git a/SysML2.NET/Core/AutoGenPoco/IExpression.cs b/SysML2.NET/Core/AutoGenPoco/IExpression.cs index da5972838..b3cc1e279 100644 --- a/SysML2.NET/Core/AutoGenPoco/IExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -88,7 +89,7 @@ public partial interface IExpression : IStep /// /// The expected /// - bool ModelLevelEvaluable(List visited) => this.ComputeModelLevelEvaluableOperation(visited); + bool ModelLevelEvaluable(List visited); /// /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element @@ -102,7 +103,7 @@ public partial interface IExpression : IStep /// /// The expected collection of /// - List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + List Evaluate(IElement target); /// /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, @@ -114,7 +115,7 @@ public partial interface IExpression : IStep /// /// The expected /// - bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + bool CheckCondition(IElement target); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IFeature.cs b/SysML2.NET/Core/AutoGenPoco/IFeature.cs index 01f4ab575..4b6992716 100644 --- a/SysML2.NET/Core/AutoGenPoco/IFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/IFeature.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Core.Features using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -271,7 +272,7 @@ public partial interface IFeature : IType /// /// The expected /// - FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + FeatureDirectionKind? DirectionFor(IType type); /// /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the @@ -280,7 +281,7 @@ public partial interface IFeature : IType /// /// The expected /// - new string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + new string EffectiveShortName(); /// /// If a Feature has no declaredName or declaredShortName , then its @@ -290,7 +291,7 @@ public partial interface IFeature : IType /// /// The expected /// - new string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + new string EffectiveName(); /// /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first @@ -299,7 +300,7 @@ public partial interface IFeature : IType /// /// The expected /// - IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + IFeature NamingFeature(); /// /// @@ -309,7 +310,7 @@ public partial interface IFeature : IType /// /// The expected collection of /// - new List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + new List Supertypes(bool excludeImplied); /// /// Check whether this Feature directly redefines the given redefinedFeature. @@ -320,7 +321,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + bool Redefines(IFeature redefinedFeature); /// /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must @@ -332,7 +333,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + bool RedefinesFromLibrary(string libraryFeatureName); /// /// Check whether this Feature directly or indirectly specializes a Feature whose last two @@ -347,7 +348,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + bool SubsetsChain(IFeature first, IFeature second); /// /// A Feature is compatible with an otherType if it either directly or indirectly specializes the @@ -363,7 +364,7 @@ public partial interface IFeature : IType /// /// The expected /// - new bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + new bool IsCompatibleWith(IType otherType); /// /// Return the Features used to determine the types of this Feature (other than this Feature itself). If @@ -378,7 +379,7 @@ public partial interface IFeature : IType /// /// The expected collection of /// - List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + List TypingFeatures(); /// /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be @@ -388,7 +389,7 @@ public partial interface IFeature : IType /// /// The expected collection of /// - List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + List AsCartesianProduct(); /// /// Check whether this Feature can be used to represent a Cartesian product of Types. @@ -396,7 +397,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + bool IsCartesianProduct(); /// /// Return whether this Feature is an owned cross Feature of an end Feature. @@ -404,7 +405,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + bool IsOwnedCrossFeature(); /// /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the @@ -414,7 +415,7 @@ public partial interface IFeature : IType /// /// The expected /// - IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + IFeature OwnedCrossFeature(); /// /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. @@ -422,7 +423,7 @@ public partial interface IFeature : IType /// /// The expected collection of /// - List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + List AllRedefinedFeatures(); /// /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, @@ -437,7 +438,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + bool IsFeaturedWithin(IType type); /// /// A Feature can access another feature if the other feature is featured within one of the direct or @@ -449,7 +450,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + bool CanAccess(IFeature feature); /// /// Return whether the given type must be a featuringType of this Feature. If this Feature has @@ -463,7 +464,7 @@ public partial interface IFeature : IType /// /// The expected /// - bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + bool IsFeaturingType(IType type); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IFeatureChainExpression.cs b/SysML2.NET/Core/AutoGenPoco/IFeatureChainExpression.cs index fd87937df..e73037d58 100644 --- a/SysML2.NET/Core/AutoGenPoco/IFeatureChainExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IFeatureChainExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -68,7 +69,7 @@ public partial interface IFeatureChainExpression : IOperatorExpression /// /// The expected /// - IFeature SourceTargetFeature() => this.ComputeSourceTargetFeatureOperation(); + IFeature SourceTargetFeature(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IFeatureReferenceExpression.cs b/SysML2.NET/Core/AutoGenPoco/IFeatureReferenceExpression.cs index 4b12cf5a2..8a96a053e 100644 --- a/SysML2.NET/Core/AutoGenPoco/IFeatureReferenceExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IFeatureReferenceExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -67,7 +68,7 @@ public partial interface IFeatureReferenceExpression : IExpression /// /// The expected /// - new bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + new bool ModelLevelEvaluable(List visited); /// /// First, determine a value Expression for the referent:
    @@ -86,7 +87,7 @@ public partial interface IFeatureReferenceExpression : IExpression /// /// The expected collection of /// - new List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + new List Evaluate(IElement target); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IFlow.cs b/SysML2.NET/Core/AutoGenPoco/IFlow.cs index 0ce518fc4..186b92449 100644 --- a/SysML2.NET/Core/AutoGenPoco/IFlow.cs +++ b/SysML2.NET/Core/AutoGenPoco/IFlow.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IFlowDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IFlowDefinition.cs index 27874e1cb..7f915b25a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IFlowDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IFlowDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IFlowEnd.cs b/SysML2.NET/Core/AutoGenPoco/IFlowEnd.cs index c5003c357..93604070b 100644 --- a/SysML2.NET/Core/AutoGenPoco/IFlowEnd.cs +++ b/SysML2.NET/Core/AutoGenPoco/IFlowEnd.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; diff --git a/SysML2.NET/Core/AutoGenPoco/IFlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/IFlowUsage.cs index 311c6d502..2bd892084 100644 --- a/SysML2.NET/Core/AutoGenPoco/IFlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IFlowUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -37,6 +38,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; using SysML2.NET.Core.POCO.Kernel.Connectors; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Kernel.Interactions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/Core/AutoGenPoco/IForLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IForLoopActionUsage.cs index 7bc80830b..e8ecc811a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IForLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IForLoopActionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IForkNode.cs b/SysML2.NET/Core/AutoGenPoco/IForkNode.cs index f8fbfccbd..8bb601cac 100644 --- a/SysML2.NET/Core/AutoGenPoco/IForkNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/IForkNode.cs @@ -29,12 +29,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; diff --git a/SysML2.NET/Core/AutoGenPoco/IFunction.cs b/SysML2.NET/Core/AutoGenPoco/IFunction.cs index 583c7de52..23ebc8274 100644 --- a/SysML2.NET/Core/AutoGenPoco/IFunction.cs +++ b/SysML2.NET/Core/AutoGenPoco/IFunction.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IIfActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IIfActionUsage.cs index 540d8a0d3..f493c3297 100644 --- a/SysML2.NET/Core/AutoGenPoco/IIfActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IIfActionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IImport.cs b/SysML2.NET/Core/AutoGenPoco/IImport.cs index 93d98c246..65a50a93e 100644 --- a/SysML2.NET/Core/AutoGenPoco/IImport.cs +++ b/SysML2.NET/Core/AutoGenPoco/IImport.cs @@ -91,7 +91,7 @@ public partial interface IImport : IRelationship /// /// The expected collection of /// - List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + List ImportedMemberships(List excluded); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IIncludeUseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/IIncludeUseCaseUsage.cs index ddbc70ac3..400f53739 100644 --- a/SysML2.NET/Core/AutoGenPoco/IIncludeUseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IIncludeUseCaseUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IIndexExpression.cs b/SysML2.NET/Core/AutoGenPoco/IIndexExpression.cs index 8d22d2082..14e0fec6a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IIndexExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IIndexExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/IInstantiationExpression.cs b/SysML2.NET/Core/AutoGenPoco/IInstantiationExpression.cs index 6a36c6ed1..92a2aae36 100644 --- a/SysML2.NET/Core/AutoGenPoco/IInstantiationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IInstantiationExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -73,7 +74,7 @@ public partial interface IInstantiationExpression : IExpression /// /// The expected /// - IType InstantiatedType() => this.ComputeInstantiatedTypeOperation(); + IType InstantiatedType(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IInteraction.cs b/SysML2.NET/Core/AutoGenPoco/IInteraction.cs index 1f2191f8f..1c5871d6a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IInteraction.cs +++ b/SysML2.NET/Core/AutoGenPoco/IInteraction.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IInterfaceDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IInterfaceDefinition.cs index 5644d25ea..d58941c05 100644 --- a/SysML2.NET/Core/AutoGenPoco/IInterfaceDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IInterfaceDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Interfaces using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IInterfaceUsage.cs b/SysML2.NET/Core/AutoGenPoco/IInterfaceUsage.cs index c183a79ef..03a4846d4 100644 --- a/SysML2.NET/Core/AutoGenPoco/IInterfaceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IInterfaceUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Interfaces using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IInvariant.cs b/SysML2.NET/Core/AutoGenPoco/IInvariant.cs index 09ff242ca..5d67a3714 100644 --- a/SysML2.NET/Core/AutoGenPoco/IInvariant.cs +++ b/SysML2.NET/Core/AutoGenPoco/IInvariant.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/IInvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/IInvocationExpression.cs index 24548a8f9..eac433826 100644 --- a/SysML2.NET/Core/AutoGenPoco/IInvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IInvocationExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -60,7 +61,7 @@ public partial interface IInvocationExpression : IInstantiationExpression /// /// The expected /// - new bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + new bool ModelLevelEvaluable(List visited); /// /// Apply the Function that is the type of this InvocationExpression to the argument values resulting @@ -73,7 +74,7 @@ public partial interface IInvocationExpression : IInstantiationExpression /// /// The expected collection of /// - new List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + new List Evaluate(IElement target); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IItemDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IItemDefinition.cs index 411a00cc3..60ca91907 100644 --- a/SysML2.NET/Core/AutoGenPoco/IItemDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IItemDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Items using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IItemUsage.cs b/SysML2.NET/Core/AutoGenPoco/IItemUsage.cs index 07dc0f0bd..125a4158a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IItemUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IItemUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Items using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IJoinNode.cs b/SysML2.NET/Core/AutoGenPoco/IJoinNode.cs index e678bb7c4..3a2709983 100644 --- a/SysML2.NET/Core/AutoGenPoco/IJoinNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/IJoinNode.cs @@ -29,12 +29,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; diff --git a/SysML2.NET/Core/AutoGenPoco/ILibraryPackage.cs b/SysML2.NET/Core/AutoGenPoco/ILibraryPackage.cs index 5b68951c2..21715b29b 100644 --- a/SysML2.NET/Core/AutoGenPoco/ILibraryPackage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ILibraryPackage.cs @@ -28,6 +28,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -56,7 +57,7 @@ public partial interface ILibraryPackage : IPackage /// /// The expected /// - new INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + new INamespace LibraryNamespace(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ILiteralBoolean.cs b/SysML2.NET/Core/AutoGenPoco/ILiteralBoolean.cs index 01e3049b7..5220f630d 100644 --- a/SysML2.NET/Core/AutoGenPoco/ILiteralBoolean.cs +++ b/SysML2.NET/Core/AutoGenPoco/ILiteralBoolean.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/ILiteralExpression.cs b/SysML2.NET/Core/AutoGenPoco/ILiteralExpression.cs index 5d2ce84f2..a2a01ccab 100644 --- a/SysML2.NET/Core/AutoGenPoco/ILiteralExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/ILiteralExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -54,7 +55,7 @@ public partial interface ILiteralExpression : IExpression /// /// The expected /// - new bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + new bool ModelLevelEvaluable(List visited); /// /// The model-level value of a LiteralExpression is itself. @@ -65,7 +66,7 @@ public partial interface ILiteralExpression : IExpression /// /// The expected collection of /// - new List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + new List Evaluate(IElement target); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ILiteralInfinity.cs b/SysML2.NET/Core/AutoGenPoco/ILiteralInfinity.cs index 42610bef8..36b685f70 100644 --- a/SysML2.NET/Core/AutoGenPoco/ILiteralInfinity.cs +++ b/SysML2.NET/Core/AutoGenPoco/ILiteralInfinity.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/ILiteralInteger.cs b/SysML2.NET/Core/AutoGenPoco/ILiteralInteger.cs index 5fdd4b53e..0d6510e12 100644 --- a/SysML2.NET/Core/AutoGenPoco/ILiteralInteger.cs +++ b/SysML2.NET/Core/AutoGenPoco/ILiteralInteger.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/ILiteralRational.cs b/SysML2.NET/Core/AutoGenPoco/ILiteralRational.cs index 071d2bb2c..a8ac1cae1 100644 --- a/SysML2.NET/Core/AutoGenPoco/ILiteralRational.cs +++ b/SysML2.NET/Core/AutoGenPoco/ILiteralRational.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/ILiteralString.cs b/SysML2.NET/Core/AutoGenPoco/ILiteralString.cs index e731f2250..4e5cb0d84 100644 --- a/SysML2.NET/Core/AutoGenPoco/ILiteralString.cs +++ b/SysML2.NET/Core/AutoGenPoco/ILiteralString.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/ILoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ILoopActionUsage.cs index dbe8f1299..c165215ec 100644 --- a/SysML2.NET/Core/AutoGenPoco/ILoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ILoopActionUsage.cs @@ -29,12 +29,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; diff --git a/SysML2.NET/Core/AutoGenPoco/IMembership.cs b/SysML2.NET/Core/AutoGenPoco/IMembership.cs index e21d91249..be70eab87 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMembership.cs @@ -101,7 +101,7 @@ public partial interface IMembership : IRelationship /// /// The expected /// - bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + bool IsDistinguishableFrom(IMembership other); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IMembershipImport.cs b/SysML2.NET/Core/AutoGenPoco/IMembershipImport.cs index e7f9b609e..78353e515 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMembershipImport.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMembershipImport.cs @@ -60,7 +60,7 @@ public partial interface IMembershipImport : IImport /// /// The expected collection of /// - new List ImportedMemberships(List excluded) => this.ComputeRedefinedImportedMembershipsOperation(excluded); + new List ImportedMemberships(List excluded); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IMergeNode.cs b/SysML2.NET/Core/AutoGenPoco/IMergeNode.cs index a17226644..3678b90e5 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMergeNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMergeNode.cs @@ -29,12 +29,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; diff --git a/SysML2.NET/Core/AutoGenPoco/IMetaclass.cs b/SysML2.NET/Core/AutoGenPoco/IMetaclass.cs index 29930476e..e53a4c38b 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMetaclass.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMetaclass.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Metadata using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IMetadataAccessExpression.cs b/SysML2.NET/Core/AutoGenPoco/IMetadataAccessExpression.cs index 3490c34af..05296e06f 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMetadataAccessExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMetadataAccessExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -65,7 +66,7 @@ public partial interface IMetadataAccessExpression : IExpression /// /// The expected /// - new bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + new bool ModelLevelEvaluable(List visited); /// /// Return the ownedElements of the referencedElement that are MetadataFeatures and have the @@ -80,7 +81,7 @@ public partial interface IMetadataAccessExpression : IExpression /// /// The expected collection of /// - new List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + new List Evaluate(IElement target); /// /// Return a MetadataFeature whose annotatedElement is the referencedElement, whose metaclass is the @@ -90,7 +91,7 @@ public partial interface IMetadataAccessExpression : IExpression /// /// The expected /// - IMetadataFeature MetaclassFeature() => this.ComputeMetaclassFeatureOperation(); + IMetadataFeature MetaclassFeature(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IMetadataDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IMetadataDefinition.cs index e14f81e63..5c7a072ba 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMetadataDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMetadataDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Metadata using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IMetadataFeature.cs b/SysML2.NET/Core/AutoGenPoco/IMetadataFeature.cs index 8b2fcf622..71d770ee4 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMetadataFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMetadataFeature.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Metadata using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; @@ -63,7 +64,7 @@ public partial interface IMetadataFeature : IAnnotatingElement, IFeature /// /// The expected collection of /// - List EvaluateFeature(IFeature baseFeature) => this.ComputeEvaluateFeatureOperation(baseFeature); + List EvaluateFeature(IFeature baseFeature); /// /// Check if this MetadataFeature has a metaclass which is a kind of SemanticMetadata. @@ -71,7 +72,7 @@ public partial interface IMetadataFeature : IAnnotatingElement, IFeature /// /// The expected /// - bool IsSemantic() => this.ComputeIsSemanticOperation(); + bool IsSemantic(); /// /// Check if this MetadataFeature has a metaclass that is a kind of KerML::Element (that is, it is from @@ -80,7 +81,7 @@ public partial interface IMetadataFeature : IAnnotatingElement, IFeature /// /// The expected /// - bool IsSyntactic() => this.ComputeIsSyntacticOperation(); + bool IsSyntactic(); /// /// If this MetadataFeature reflectively represents a model element, then return the corresponding @@ -89,7 +90,7 @@ public partial interface IMetadataFeature : IAnnotatingElement, IFeature /// /// The expected /// - IElement SyntaxElement() => this.ComputeSyntaxElementOperation(); + IElement SyntaxElement(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IMetadataUsage.cs b/SysML2.NET/Core/AutoGenPoco/IMetadataUsage.cs index 76aac05c1..49b5115b3 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMetadataUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMetadataUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Metadata using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IMultiplicity.cs b/SysML2.NET/Core/AutoGenPoco/IMultiplicity.cs index f423b9a76..19618467c 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMultiplicity.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMultiplicity.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/Core/AutoGenPoco/IMultiplicityRange.cs b/SysML2.NET/Core/AutoGenPoco/IMultiplicityRange.cs index fcf8b6991..1872e8f51 100644 --- a/SysML2.NET/Core/AutoGenPoco/IMultiplicityRange.cs +++ b/SysML2.NET/Core/AutoGenPoco/IMultiplicityRange.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Multiplicities using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Functions; @@ -87,7 +88,7 @@ public partial interface IMultiplicityRange : IMultiplicity /// /// The expected /// - bool HasBounds(int lower, string upper) => this.ComputeHasBoundsOperation(lower, upper); + bool HasBounds(int lower, string upper); /// /// Evaluate the given bound Expression (at model level) and return the result represented as a MOF @@ -99,7 +100,7 @@ public partial interface IMultiplicityRange : IMultiplicity /// /// The expected /// - string ValueOf(IExpression bound) => this.ComputeValueOfOperation(bound); + string ValueOf(IExpression bound); } } diff --git a/SysML2.NET/Core/AutoGenPoco/INamespace.cs b/SysML2.NET/Core/AutoGenPoco/INamespace.cs index 22a6d43aa..8a81fd519 100644 --- a/SysML2.NET/Core/AutoGenPoco/INamespace.cs +++ b/SysML2.NET/Core/AutoGenPoco/INamespace.cs @@ -106,7 +106,7 @@ public partial interface INamespace : IElement /// /// The expected collection of /// - List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + List NamesOf(IElement element); /// /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is @@ -118,7 +118,7 @@ public partial interface INamespace : IElement /// /// The expected /// - VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + VisibilityKind VisibilityOf(IMembership mem); /// /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the @@ -140,7 +140,7 @@ public partial interface INamespace : IElement /// /// The expected collection of /// - List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeVisibleMembershipsOperation(excluded, isRecursive, includeAll); + List VisibleMemberships(List excluded, bool isRecursive, bool includeAll); /// /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, @@ -153,7 +153,7 @@ public partial interface INamespace : IElement /// /// The expected collection of /// - List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + List ImportedMemberships(List excluded); /// /// If visibility is not null, return the Memberships of this Namespace with the given visibility, @@ -171,7 +171,7 @@ public partial interface INamespace : IElement /// /// The expected collection of /// - List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + List MembershipsOfVisibility(VisibilityKind? visibility, List excluded); /// /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as @@ -185,7 +185,7 @@ public partial interface INamespace : IElement /// /// The expected /// - IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + IMembership Resolve(string qualifiedName); /// /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace @@ -198,7 +198,7 @@ public partial interface INamespace : IElement /// /// The expected /// - IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + IMembership ResolveGlobal(string qualifiedName); /// /// Resolve a simple name starting with this Namespace as the local scope, and continuing with @@ -211,7 +211,7 @@ public partial interface INamespace : IElement /// /// The expected /// - IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + IMembership ResolveLocal(string name); /// /// Resolve a simple name from the visible Memberships of this Namespace. @@ -222,7 +222,7 @@ public partial interface INamespace : IElement /// /// The expected /// - IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + IMembership ResolveVisible(string name); /// /// Return a string with valid KerML syntax representing the qualification part of a given @@ -235,7 +235,7 @@ public partial interface INamespace : IElement /// /// The expected /// - string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + string QualificationOf(string qualifiedName); /// /// Return the simple name that is the last segment name of the given qualifiedName. If this segment @@ -248,7 +248,7 @@ public partial interface INamespace : IElement /// /// The expected /// - string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + string UnqualifiedNameOf(string qualifiedName); } } diff --git a/SysML2.NET/Core/AutoGenPoco/INamespaceImport.cs b/SysML2.NET/Core/AutoGenPoco/INamespaceImport.cs index d6e9089bf..f5a94325f 100644 --- a/SysML2.NET/Core/AutoGenPoco/INamespaceImport.cs +++ b/SysML2.NET/Core/AutoGenPoco/INamespaceImport.cs @@ -61,7 +61,7 @@ public partial interface INamespaceImport : IImport /// /// The expected collection of /// - new List ImportedMemberships(List excluded) => this.ComputeRedefinedImportedMembershipsOperation(excluded); + new List ImportedMemberships(List excluded); } } diff --git a/SysML2.NET/Core/AutoGenPoco/INullExpression.cs b/SysML2.NET/Core/AutoGenPoco/INullExpression.cs index 6f96b2894..3daaf6f72 100644 --- a/SysML2.NET/Core/AutoGenPoco/INullExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/INullExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -54,7 +55,7 @@ public partial interface INullExpression : IExpression /// /// The expected /// - new bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + new bool ModelLevelEvaluable(List visited); /// /// The model-level value of a NullExpression is an empty sequence. @@ -65,7 +66,7 @@ public partial interface INullExpression : IExpression /// /// The expected collection of /// - new List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + new List Evaluate(IElement target); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IOccurrenceDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IOccurrenceDefinition.cs index 00002fdf8..66f4e46ed 100644 --- a/SysML2.NET/Core/AutoGenPoco/IOccurrenceDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IOccurrenceDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IOccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/IOccurrenceUsage.cs index c2b9d3b84..335d82ec2 100644 --- a/SysML2.NET/Core/AutoGenPoco/IOccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IOccurrenceUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IOperatorExpression.cs b/SysML2.NET/Core/AutoGenPoco/IOperatorExpression.cs index 928f13ef4..8b0659762 100644 --- a/SysML2.NET/Core/AutoGenPoco/IOperatorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IOperatorExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -60,7 +61,7 @@ public partial interface IOperatorExpression : IInvocationExpression /// /// The expected /// - new IType InstantiatedType() => this.ComputeRedefinedInstantiatedTypeOperation(); + new IType InstantiatedType(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IOwningMembership.cs b/SysML2.NET/Core/AutoGenPoco/IOwningMembership.cs index 538400d7b..ae7d15fdd 100644 --- a/SysML2.NET/Core/AutoGenPoco/IOwningMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/IOwningMembership.cs @@ -79,7 +79,7 @@ public partial interface IOwningMembership : IMembership /// /// The expected /// - new string Path() => this.ComputeRedefinedPathOperation(); + new string Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IPackage.cs b/SysML2.NET/Core/AutoGenPoco/IPackage.cs index 9ac2bce90..caabad72f 100644 --- a/SysML2.NET/Core/AutoGenPoco/IPackage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IPackage.cs @@ -28,6 +28,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -60,7 +61,7 @@ public partial interface IPackage : INamespace /// /// The expected collection of /// - new List ImportedMemberships(List excluded) => this.ComputeRedefinedImportedMembershipsOperation(excluded); + new List ImportedMemberships(List excluded); /// /// Determine whether the given element meets all the filterConditions. @@ -71,7 +72,7 @@ public partial interface IPackage : INamespace /// /// The expected /// - bool IncludeAsMember(IElement element) => this.ComputeIncludeAsMemberOperation(element); + bool IncludeAsMember(IElement element); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IParameterMembership.cs b/SysML2.NET/Core/AutoGenPoco/IParameterMembership.cs index 7b41cf080..f961e8279 100644 --- a/SysML2.NET/Core/AutoGenPoco/IParameterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/IParameterMembership.cs @@ -59,7 +59,7 @@ public partial interface IParameterMembership : IFeatureMembership /// /// The expected /// - FeatureDirectionKind ParameterDirection() => this.ComputeParameterDirectionOperation(); + FeatureDirectionKind ParameterDirection(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IPartDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IPartDefinition.cs index 7c9355497..04aaac039 100644 --- a/SysML2.NET/Core/AutoGenPoco/IPartDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IPartDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Parts using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IPartUsage.cs b/SysML2.NET/Core/AutoGenPoco/IPartUsage.cs index e87d272e0..55e1514ac 100644 --- a/SysML2.NET/Core/AutoGenPoco/IPartUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IPartUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Parts using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IPayloadFeature.cs b/SysML2.NET/Core/AutoGenPoco/IPayloadFeature.cs index 84ad7ad2b..f8cbec2c0 100644 --- a/SysML2.NET/Core/AutoGenPoco/IPayloadFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/IPayloadFeature.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; diff --git a/SysML2.NET/Core/AutoGenPoco/IPerformActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IPerformActionUsage.cs index 14d09adcc..a51a5e4d1 100644 --- a/SysML2.NET/Core/AutoGenPoco/IPerformActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IPerformActionUsage.cs @@ -29,12 +29,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -87,7 +89,7 @@ public partial interface IPerformActionUsage : IActionUsage, IEventOccurrenceUsa /// /// The expected /// - new IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + new IFeature NamingFeature(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IPortDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IPortDefinition.cs index ed3770b6c..22fab7748 100644 --- a/SysML2.NET/Core/AutoGenPoco/IPortDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IPortDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IPortUsage.cs b/SysML2.NET/Core/AutoGenPoco/IPortUsage.cs index 0a2be1c53..ac736ee02 100644 --- a/SysML2.NET/Core/AutoGenPoco/IPortUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IPortUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IPredicate.cs b/SysML2.NET/Core/AutoGenPoco/IPredicate.cs index 733a0b28d..40080ae99 100644 --- a/SysML2.NET/Core/AutoGenPoco/IPredicate.cs +++ b/SysML2.NET/Core/AutoGenPoco/IPredicate.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IReferenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/IReferenceUsage.cs index 915608251..dd1b5e9f2 100644 --- a/SysML2.NET/Core/AutoGenPoco/IReferenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IReferenceUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -83,7 +84,7 @@ public partial interface IReferenceUsage : IUsage /// /// The expected /// - new IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + new IFeature NamingFeature(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IRelationship.cs b/SysML2.NET/Core/AutoGenPoco/IRelationship.cs index cd742e20c..c86cf9f64 100644 --- a/SysML2.NET/Core/AutoGenPoco/IRelationship.cs +++ b/SysML2.NET/Core/AutoGenPoco/IRelationship.cs @@ -99,7 +99,7 @@ public partial interface IRelationship : IElement /// /// The expected /// - new INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + new INamespace LibraryNamespace(); /// /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, @@ -110,7 +110,7 @@ public partial interface IRelationship : IElement /// /// The expected /// - new string Path() => this.ComputeRedefinedPathOperation(); + new string Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IRenderingDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IRenderingDefinition.cs index 7a7e2f2da..5da8a3c2a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IRenderingDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IRenderingDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IRenderingUsage.cs b/SysML2.NET/Core/AutoGenPoco/IRenderingUsage.cs index 0646b4385..849fdbe02 100644 --- a/SysML2.NET/Core/AutoGenPoco/IRenderingUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IRenderingUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IRequirementDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IRequirementDefinition.cs index 72fc7b5d5..186fc9c0c 100644 --- a/SysML2.NET/Core/AutoGenPoco/IRequirementDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IRequirementDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IRequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/IRequirementUsage.cs index 5d2e7ccdc..896e82a62 100644 --- a/SysML2.NET/Core/AutoGenPoco/IRequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IRequirementUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IReturnParameterMembership.cs b/SysML2.NET/Core/AutoGenPoco/IReturnParameterMembership.cs index ee729426a..3290aba7a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IReturnParameterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/IReturnParameterMembership.cs @@ -54,7 +54,7 @@ public partial interface IReturnParameterMembership : IParameterMembership /// /// The expected /// - new FeatureDirectionKind ParameterDirection() => this.ComputeRedefinedParameterDirectionOperation(); + new FeatureDirectionKind ParameterDirection(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ISatisfyRequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/ISatisfyRequirementUsage.cs index e163372aa..4fd6b4f46 100644 --- a/SysML2.NET/Core/AutoGenPoco/ISatisfyRequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ISatisfyRequirementUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/ISelectExpression.cs b/SysML2.NET/Core/AutoGenPoco/ISelectExpression.cs index 54da6b865..86cbe34bb 100644 --- a/SysML2.NET/Core/AutoGenPoco/ISelectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/ISelectExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; diff --git a/SysML2.NET/Core/AutoGenPoco/ISendActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ISendActionUsage.cs index d60bee345..9d22e1986 100644 --- a/SysML2.NET/Core/AutoGenPoco/ISendActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ISendActionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IStakeholderMembership.cs b/SysML2.NET/Core/AutoGenPoco/IStakeholderMembership.cs index 64508a9de..d6d3b3571 100644 --- a/SysML2.NET/Core/AutoGenPoco/IStakeholderMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/IStakeholderMembership.cs @@ -28,6 +28,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IStateDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IStateDefinition.cs index 5d38e7622..95565f6f7 100644 --- a/SysML2.NET/Core/AutoGenPoco/IStateDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IStateDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.States using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IStateUsage.cs b/SysML2.NET/Core/AutoGenPoco/IStateUsage.cs index a1fd5adb3..6b4705eb8 100644 --- a/SysML2.NET/Core/AutoGenPoco/IStateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IStateUsage.cs @@ -29,12 +29,14 @@ namespace SysML2.NET.Core.POCO.Systems.States using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -124,7 +126,7 @@ public partial interface IStateUsage : IActionUsage /// /// The expected /// - bool IsSubstateUsage(bool isParallel) => this.ComputeIsSubstateUsageOperation(isParallel); + bool IsSubstateUsage(bool isParallel); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IStep.cs b/SysML2.NET/Core/AutoGenPoco/IStep.cs index 02865046e..0b5e8100b 100644 --- a/SysML2.NET/Core/AutoGenPoco/IStep.cs +++ b/SysML2.NET/Core/AutoGenPoco/IStep.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; diff --git a/SysML2.NET/Core/AutoGenPoco/IStructure.cs b/SysML2.NET/Core/AutoGenPoco/IStructure.cs index 8e7b5e5b6..9a0b87057 100644 --- a/SysML2.NET/Core/AutoGenPoco/IStructure.cs +++ b/SysML2.NET/Core/AutoGenPoco/IStructure.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Structures using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/ISubjectMembership.cs b/SysML2.NET/Core/AutoGenPoco/ISubjectMembership.cs index 56561a73b..38f8d817c 100644 --- a/SysML2.NET/Core/AutoGenPoco/ISubjectMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ISubjectMembership.cs @@ -28,6 +28,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/ISuccession.cs b/SysML2.NET/Core/AutoGenPoco/ISuccession.cs index 6254caaad..3e2434dbb 100644 --- a/SysML2.NET/Core/AutoGenPoco/ISuccession.cs +++ b/SysML2.NET/Core/AutoGenPoco/ISuccession.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Associations; diff --git a/SysML2.NET/Core/AutoGenPoco/ISuccessionAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/ISuccessionAsUsage.cs index 2a5380d61..d6d5802d3 100644 --- a/SysML2.NET/Core/AutoGenPoco/ISuccessionAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ISuccessionAsUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/ISuccessionFlow.cs b/SysML2.NET/Core/AutoGenPoco/ISuccessionFlow.cs index e88e196e8..6ddfcb619 100644 --- a/SysML2.NET/Core/AutoGenPoco/ISuccessionFlow.cs +++ b/SysML2.NET/Core/AutoGenPoco/ISuccessionFlow.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/ISuccessionFlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/ISuccessionFlowUsage.cs index e94009c8d..83888b644 100644 --- a/SysML2.NET/Core/AutoGenPoco/ISuccessionFlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ISuccessionFlowUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -37,6 +38,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; using SysML2.NET.Core.POCO.Kernel.Connectors; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Kernel.Interactions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/Core/AutoGenPoco/ITerminateActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ITerminateActionUsage.cs index e7737929c..90ff94c0f 100644 --- a/SysML2.NET/Core/AutoGenPoco/ITerminateActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ITerminateActionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/ITransitionUsage.cs b/SysML2.NET/Core/AutoGenPoco/ITransitionUsage.cs index ed670121a..12d56b8bb 100644 --- a/SysML2.NET/Core/AutoGenPoco/ITransitionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ITransitionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.States using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -130,7 +131,7 @@ public partial interface ITransitionUsage : IActionUsage /// /// The expected /// - IReferenceUsage TriggerPayloadParameter() => this.ComputeTriggerPayloadParameterOperation(); + IReferenceUsage TriggerPayloadParameter(); /// /// Return the Feature to be used as the source of the succession of this TransitionUsage, which is the @@ -140,7 +141,7 @@ public partial interface ITransitionUsage : IActionUsage /// /// The expected /// - IFeature SourceFeature() => this.ComputeSourceFeatureOperation(); + IFeature SourceFeature(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ITriggerInvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/ITriggerInvocationExpression.cs index d247ffc4b..e0667e44b 100644 --- a/SysML2.NET/Core/AutoGenPoco/ITriggerInvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/ITriggerInvocationExpression.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Actions; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -63,7 +64,7 @@ public partial interface ITriggerInvocationExpression : IInvocationExpression /// /// The expected /// - new IType InstantiatedType() => this.ComputeRedefinedInstantiatedTypeOperation(); + new IType InstantiatedType(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IType.cs b/SysML2.NET/Core/AutoGenPoco/IType.cs index 73b89fee6..95d748bf4 100644 --- a/SysML2.NET/Core/AutoGenPoco/IType.cs +++ b/SysML2.NET/Core/AutoGenPoco/IType.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -259,7 +260,7 @@ public partial interface IType : INamespace /// /// The expected collection of /// - new List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + new List VisibleMemberships(List excluded, bool isRecursive, bool includeAll); /// /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. @@ -278,7 +279,7 @@ public partial interface IType : INamespace /// /// The expected collection of /// - List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied); /// /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes @@ -297,7 +298,7 @@ public partial interface IType : INamespace /// /// The expected collection of /// - List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied); /// /// Return the public, protected and inherited Memberships of this Type. When computing imported @@ -317,7 +318,7 @@ public partial interface IType : INamespace /// /// The expected collection of /// - List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied); /// /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for @@ -335,7 +336,7 @@ public partial interface IType : INamespace /// /// The expected collection of /// - List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + List RemoveRedefinedFeatures(List memberships); /// /// If the memberElement of the given membership is a Feature, then return all Features directly or @@ -347,7 +348,7 @@ public partial interface IType : INamespace /// /// The expected collection of /// - List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + List AllRedefinedFeaturesOf(IMembership membership); /// /// If the given feature is a feature of this Type, then return its direction relative to this Type, @@ -359,7 +360,7 @@ public partial interface IType : INamespace /// /// The expected /// - FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + FeatureDirectionKind? DirectionOf(IFeature feature); /// /// Return the direction of the given feature relative to this Type, excluding a given set of Types from @@ -374,7 +375,7 @@ public partial interface IType : INamespace /// /// The expected /// - FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded); /// /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return @@ -387,7 +388,7 @@ public partial interface IType : INamespace /// /// The expected collection of /// - List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + List Supertypes(bool excludeImplied); /// /// Return this Type and all Types that are directly or transitively supertypes of this Type (as @@ -396,7 +397,7 @@ public partial interface IType : INamespace /// /// The expected collection of /// - List AllSupertypes() => this.ComputeAllSupertypesOperation(); + List AllSupertypes(); /// /// Check whether this Type is a direct or indirect specialization of the given supertype. @@ -407,7 +408,7 @@ public partial interface IType : INamespace /// /// The expected /// - bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + bool Specializes(IType supertype); /// /// Check whether this Type is a direct or indirect specialization of the named library Type. @@ -420,7 +421,7 @@ public partial interface IType : INamespace /// /// The expected /// - bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + bool SpecializesFromLibrary(string libraryTypeName); /// /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the @@ -432,7 +433,7 @@ public partial interface IType : INamespace /// /// The expected /// - bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + bool IsCompatibleWith(IType otherType); /// /// Return the owned or inherited Multiplicities for this Type<./code>. @@ -440,7 +441,7 @@ public partial interface IType : INamespace /// /// The expected collection of /// - List Multiplicities() => this.ComputeMultiplicitiesOperation(); + List Multiplicities(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IUsage.cs b/SysML2.NET/Core/AutoGenPoco/IUsage.cs index c5904647d..ca83c0da3 100644 --- a/SysML2.NET/Core/AutoGenPoco/IUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -348,7 +349,7 @@ public partial interface IUsage : IFeature /// /// The expected /// - new IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + new IFeature NamingFeature(); /// /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the @@ -357,7 +358,7 @@ public partial interface IUsage : IFeature /// /// The expected /// - IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + IFeature ReferencedFeatureTarget(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IUseCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IUseCaseDefinition.cs index 07723b226..0496fa285 100644 --- a/SysML2.NET/Core/AutoGenPoco/IUseCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IUseCaseDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IUseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/IUseCaseUsage.cs index 6cc5905fa..04927a067 100644 --- a/SysML2.NET/Core/AutoGenPoco/IUseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IUseCaseUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IVerificationCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IVerificationCaseDefinition.cs index cd1688f11..c0437dba8 100644 --- a/SysML2.NET/Core/AutoGenPoco/IVerificationCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IVerificationCaseDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IVerificationCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/IVerificationCaseUsage.cs index 04fb06954..84398e571 100644 --- a/SysML2.NET/Core/AutoGenPoco/IVerificationCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IVerificationCaseUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IViewDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IViewDefinition.cs index ea8053450..25d78aa9a 100644 --- a/SysML2.NET/Core/AutoGenPoco/IViewDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IViewDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IViewUsage.cs b/SysML2.NET/Core/AutoGenPoco/IViewUsage.cs index 61e01d4f1..131c1e41e 100644 --- a/SysML2.NET/Core/AutoGenPoco/IViewUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IViewUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -118,7 +119,7 @@ public partial interface IViewUsage : IPartUsage /// /// The expected /// - bool IncludeAsExposed(IElement element) => this.ComputeIncludeAsExposedOperation(element); + bool IncludeAsExposed(IElement element); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IViewpointDefinition.cs b/SysML2.NET/Core/AutoGenPoco/IViewpointDefinition.cs index a6b4ee0b4..93ec3771b 100644 --- a/SysML2.NET/Core/AutoGenPoco/IViewpointDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/IViewpointDefinition.cs @@ -28,6 +28,8 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.CodeDom.Compiler; using System.Collections.Generic; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; diff --git a/SysML2.NET/Core/AutoGenPoco/IViewpointUsage.cs b/SysML2.NET/Core/AutoGenPoco/IViewpointUsage.cs index e6b940e5e..a5a871c61 100644 --- a/SysML2.NET/Core/AutoGenPoco/IViewpointUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IViewpointUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IWhileLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IWhileLoopActionUsage.cs index cd67096b8..cf65b86e1 100644 --- a/SysML2.NET/Core/AutoGenPoco/IWhileLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IWhileLoopActionUsage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Collections.Generic; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; diff --git a/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs index 870c6150d..a08e48e12 100644 --- a/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IfActionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1166,6 +1167,671 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs index cd6d60330..3d336409b 100644 --- a/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/IncludeUseCaseUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1269,6 +1270,736 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A CalculationUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// The naming Feature of a PerformActionUsage is its performedAction, if this is different than the + /// PerformActionUsage. If the PerformActionUsage is its own performedAction, then the naming Feature is + /// the same as the usual default for a Usage. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs b/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs index ed02aa7ec..c1809671e 100644 --- a/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/IndexExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -827,6 +828,699 @@ string IOperatorExpression.Operator [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Apply the Function that is the type of this InvocationExpression to the argument values resulting + /// from evaluating each of the argument Expressions on the given target. If the application is not + /// possible, then return an empty sequence. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// The instantiatedType of an OperatorExpression is the resolution of it's operator from one of the + /// packages BaseFunctions, DataFunctions, or ControlFunctions from the Kernel Function Library. + /// + /// + /// The expected + /// + public IType InstantiatedType() => this.ComputeRedefinedInstantiatedTypeOperation(); + + /// + /// Return the Type to act as the instantiatedType for this InstantiationExpression. By default, this is + /// the memberElement of the first ownedMembership that is not a FeatureMembership, which must be a + /// Type. Note. This operation is overridden in the subclass + /// OperatorExpression. + /// + /// + /// The expected + /// + IType IInstantiationExpression.InstantiatedType() => this.InstantiatedType(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// An InvocationExpression is model-level evaluable if all its argument Expressions are model-level + /// evaluable and its function is model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Interaction.cs b/SysML2.NET/Core/AutoGenPoco/Interaction.cs index 8d424b70a..086299619 100644 --- a/SysML2.NET/Core/AutoGenPoco/Interaction.cs +++ b/SysML2.NET/Core/AutoGenPoco/Interaction.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -645,6 +647,427 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs b/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs index 50f69cfd5..0ca435624 100644 --- a/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/InterfaceDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Interfaces using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -949,6 +951,427 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs b/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs index 59e2f64b9..b301207fb 100644 --- a/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/InterfaceUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Interfaces using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1277,6 +1278,648 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Intersecting.cs b/SysML2.NET/Core/AutoGenPoco/Intersecting.cs index a3fd9ca1b..757175168 100644 --- a/SysML2.NET/Core/AutoGenPoco/Intersecting.cs +++ b/SysML2.NET/Core/AutoGenPoco/Intersecting.cs @@ -320,6 +320,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IIntersecting.TypeIntersected")] public IType typeIntersected => this.ComputeTypeIntersected(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Invariant.cs b/SysML2.NET/Core/AutoGenPoco/Invariant.cs index 78256410e..e0039a835 100644 --- a/SysML2.NET/Core/AutoGenPoco/Invariant.cs +++ b/SysML2.NET/Core/AutoGenPoco/Invariant.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -802,6 +803,654 @@ public Invariant() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeModelLevelEvaluableOperation(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs index 2db5b8ccd..c6242ab2c 100644 --- a/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/InvocationExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -808,6 +809,690 @@ public InvocationExpression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Apply the Function that is the type of this InvocationExpression to the argument values resulting + /// from evaluating each of the argument Expressions on the given target. If the application is not + /// possible, then return an empty sequence. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Type to act as the instantiatedType for this InstantiationExpression. By default, this is + /// the memberElement of the first ownedMembership that is not a FeatureMembership, which must be a + /// Type. Note. This operation is overridden in the subclass + /// OperatorExpression. + /// + /// + /// The expected + /// + public IType InstantiatedType() => this.ComputeInstantiatedTypeOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// An InvocationExpression is model-level evaluable if all its argument Expressions are model-level + /// evaluable and its function is model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs index 253e0d98d..a87fe8073 100644 --- a/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ItemDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Items using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -809,6 +811,407 @@ public ItemDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs b/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs index 73fbed5f0..3f3bb1a8d 100644 --- a/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ItemUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Items using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1123,6 +1124,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/JoinNode.cs b/SysML2.NET/Core/AutoGenPoco/JoinNode.cs index bfbcfe519..03de74ff6 100644 --- a/SysML2.NET/Core/AutoGenPoco/JoinNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/JoinNode.cs @@ -30,12 +30,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -1140,6 +1142,689 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Check that the given Multiplicity has lowerBound and upperBound expressions that are model-level + /// evaluable to the given lower and upper values. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool MultiplicityHasBounds(IMultiplicity mult, int lower, string upper) => this.ComputeMultiplicityHasBoundsOperation(mult, lower, upper); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs b/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs index ef2f10548..ad3440de3 100644 --- a/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs +++ b/SysML2.NET/Core/AutoGenPoco/LibraryPackage.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -300,6 +301,239 @@ public LibraryPackage() [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Exclude Elements that do not meet all the filterConditions. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeRedefinedImportedMembershipsOperation(excluded); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.ImportedMemberships(List excluded) => this.ImportedMemberships(excluded); + + /// + /// Determine whether the given element meets all the filterConditions. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IncludeAsMember(IElement element) => this.ComputeIncludeAsMemberOperation(element); + + /// + /// The libraryNamespace for a LibraryPackage is itself. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeVisibleMembershipsOperation(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs b/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs index ea27e1d9d..fd1d0e76e 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralBoolean.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -793,6 +794,676 @@ public LiteralBoolean() [Implements(implementation: "ILiteralBoolean.Value")] public bool Value { get; set; } + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// The model-level value of a LiteralExpression is itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A LiteralExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs b/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs index 7f5cf9715..5ef5e2626 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -785,6 +786,676 @@ public LiteralExpression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// The model-level value of a LiteralExpression is itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A LiteralExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs b/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs index 30decad88..707b9e335 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralInfinity.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -786,6 +787,676 @@ public LiteralInfinity() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// The model-level value of a LiteralExpression is itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A LiteralExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs b/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs index 20a075301..119668814 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralInteger.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -793,6 +794,676 @@ public LiteralInteger() [Implements(implementation: "ILiteralInteger.Value")] public int Value { get; set; } + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// The model-level value of a LiteralExpression is itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A LiteralExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs b/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs index a12ba5cb6..4b3f85ce7 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralRational.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -793,6 +794,676 @@ public LiteralRational() [Implements(implementation: "ILiteralRational.Value")] public double Value { get; set; } + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// The model-level value of a LiteralExpression is itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A LiteralExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/LiteralString.cs b/SysML2.NET/Core/AutoGenPoco/LiteralString.cs index 9d45fe1aa..509eccc4f 100644 --- a/SysML2.NET/Core/AutoGenPoco/LiteralString.cs +++ b/SysML2.NET/Core/AutoGenPoco/LiteralString.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -793,6 +794,676 @@ public LiteralString() [Implements(implementation: "ILiteralString.Value")] public string Value { get; set; } + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// The model-level value of a LiteralExpression is itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A LiteralExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Membership.cs b/SysML2.NET/Core/AutoGenPoco/Membership.cs index f2f50b872..eb57d12d9 100644 --- a/SysML2.NET/Core/AutoGenPoco/Membership.cs +++ b/SysML2.NET/Core/AutoGenPoco/Membership.cs @@ -354,6 +354,91 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs b/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs index 5ba535474..0d759ceea 100644 --- a/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs +++ b/SysML2.NET/Core/AutoGenPoco/MembershipExpose.cs @@ -382,6 +382,101 @@ VisibilityKind Root.Namespaces.IImport.Visibility [Implements(implementation: "IExpose.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Protected; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Returns at least the importedMembership. If isRecursive = true and the memberElement of the + /// importedMembership is a Namespace, then Memberships are also recursively imported from that + /// Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeRedefinedImportedMembershipsOperation(excluded); + + /// + /// Returns Memberships that are to become importedMemberships of the importOwningNamespace. (The + /// excluded parameter is used to handle the possibility of circular Import Relationships.) + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IImport.ImportedMemberships(List excluded) => this.ImportedMemberships(excluded); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs b/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs index 87941a177..1819e17fd 100644 --- a/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs +++ b/SysML2.NET/Core/AutoGenPoco/MembershipImport.cs @@ -350,6 +350,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IImport.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Private; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Returns at least the importedMembership. If isRecursive = true and the memberElement of the + /// importedMembership is a Namespace, then Memberships are also recursively imported from that + /// Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeRedefinedImportedMembershipsOperation(excluded); + + /// + /// Returns Memberships that are to become importedMemberships of the importOwningNamespace. (The + /// excluded parameter is used to handle the possibility of circular Import Relationships.) + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IImport.ImportedMemberships(List excluded) => this.ImportedMemberships(excluded); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/MergeNode.cs b/SysML2.NET/Core/AutoGenPoco/MergeNode.cs index aad62efc9..31f83c2d3 100644 --- a/SysML2.NET/Core/AutoGenPoco/MergeNode.cs +++ b/SysML2.NET/Core/AutoGenPoco/MergeNode.cs @@ -30,12 +30,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -1140,6 +1142,689 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Check that the given Multiplicity has lowerBound and upperBound expressions that are model-level + /// evaluable to the given lower and upper values. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool MultiplicityHasBounds(IMultiplicity mult, int lower, string upper) => this.ComputeMultiplicityHasBoundsOperation(mult, lower, upper); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Metaclass.cs b/SysML2.NET/Core/AutoGenPoco/Metaclass.cs index 88622a07b..553be64c0 100644 --- a/SysML2.NET/Core/AutoGenPoco/Metaclass.cs +++ b/SysML2.NET/Core/AutoGenPoco/Metaclass.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Metadata using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -517,6 +519,407 @@ public Metaclass() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs b/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs index c7fb83803..de72c42f9 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataAccessExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -797,6 +798,690 @@ public MetadataAccessExpression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return the ownedElements of the referencedElement that are MetadataFeatures and have the + /// referencedElement as an annotatedElement, plus a MetadataFeature whose annotatedElement is the + /// referencedElement, whose metaclass is the reflective Metaclass corresponding to the MOF class of the + /// referencedElement and whose ownedFeatures are bound to the values of the MOF properties of the + /// referencedElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return a MetadataFeature whose annotatedElement is the referencedElement, whose metaclass is the + /// reflective Metaclass corresponding to the MOF class of the referencedElement and whose ownedFeatures + /// are bound to the MOF properties of the referencedElement. + /// + /// + /// The expected + /// + public IMetadataFeature MetaclassFeature() => this.ComputeMetaclassFeatureOperation(); + + /// + /// A MetadataAccessExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs b/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs index f35a4751d..e71d98488 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Metadata using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -806,6 +808,407 @@ public MetadataDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs b/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs index 56ce0e497..212797369 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataFeature.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Metadata using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; @@ -784,6 +785,649 @@ public MetadataFeature() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If the given baseFeature is a feature of this MetadataFeature, or is directly or indirectly + /// redefined by a feature, then return the result of evaluating the appropriate (model-level evaluable) + /// value Expression for it (if any), with the MetadataFeature as the target. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List EvaluateFeature(IFeature baseFeature) => this.ComputeEvaluateFeatureOperation(baseFeature); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this MetadataFeature has a metaclass which is a kind of SemanticMetadata. + /// + /// + /// The expected + /// + public bool IsSemantic() => this.ComputeIsSemanticOperation(); + + /// + /// Check if this MetadataFeature has a metaclass that is a kind of KerML::Element (that is, it is from + /// the reflective abstract syntax model). + /// + /// + /// The expected + /// + public bool IsSyntactic() => this.ComputeIsSyntacticOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// If this MetadataFeature reflectively represents a model element, then return the corresponding + /// Element instance from the MOF abstract syntax representation of the model. + /// + /// + /// The expected + /// + public IElement SyntaxElement() => this.ComputeSyntaxElementOperation(); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs b/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs index cf3b4be16..ca59d5b95 100644 --- a/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/MetadataUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Metadata using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1178,6 +1179,667 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If the given baseFeature is a feature of this MetadataFeature, or is directly or indirectly + /// redefined by a feature, then return the result of evaluating the appropriate (model-level evaluable) + /// value Expression for it (if any), with the MetadataFeature as the target. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List EvaluateFeature(IFeature baseFeature) => this.ComputeEvaluateFeatureOperation(baseFeature); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this MetadataFeature has a metaclass which is a kind of SemanticMetadata. + /// + /// + /// The expected + /// + public bool IsSemantic() => this.ComputeIsSemanticOperation(); + + /// + /// Check if this MetadataFeature has a metaclass that is a kind of KerML::Element (that is, it is from + /// the reflective abstract syntax model). + /// + /// + /// The expected + /// + public bool IsSyntactic() => this.ComputeIsSyntacticOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// If this MetadataFeature reflectively represents a model element, then return the corresponding + /// Element instance from the MOF abstract syntax representation of the model. + /// + /// + /// The expected + /// + public IElement SyntaxElement() => this.ComputeSyntaxElementOperation(); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs b/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs index d86ecccb9..6512176ba 100644 --- a/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs +++ b/SysML2.NET/Core/AutoGenPoco/Multiplicity.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -748,6 +749,610 @@ public Multiplicity() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs b/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs index 797843e7d..b96157d2c 100644 --- a/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs +++ b/SysML2.NET/Core/AutoGenPoco/MultiplicityRange.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Multiplicities using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Functions; @@ -771,6 +772,637 @@ public MultiplicityRange() [Implements(implementation: "IMultiplicityRange.UpperBound")] public IExpression upperBound => this.ComputeUpperBound(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Check whether this MultiplicityRange represents the range bounded by the given values lower and + /// upper, presuming the lowerBound and upperBound Expressions are model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool HasBounds(int lower, string upper) => this.ComputeHasBoundsOperation(lower, upper); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Evaluate the given bound Expression (at model level) and return the result represented as a MOF + /// UnlimitedNatural value. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string ValueOf(IExpression bound) => this.ComputeValueOfOperation(bound); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Namespace.cs b/SysML2.NET/Core/AutoGenPoco/Namespace.cs index bb16078cb..0af4a275b 100644 --- a/SysML2.NET/Core/AutoGenPoco/Namespace.cs +++ b/SysML2.NET/Core/AutoGenPoco/Namespace.cs @@ -289,6 +289,209 @@ public Namespace() [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeVisibleMembershipsOperation(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs b/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs index ccc0c9e88..372e231fb 100644 --- a/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs +++ b/SysML2.NET/Core/AutoGenPoco/NamespaceExpose.cs @@ -382,6 +382,101 @@ VisibilityKind Root.Namespaces.IImport.Visibility } } + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Returns Memberships that are to become importedMemberships of the importOwningNamespace. (The + /// excluded parameter is used to handle the possibility of circular Import Relationships.) + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IImport.ImportedMemberships(List excluded) => this.ImportedMemberships(excluded); + + /// + /// Returns at least the visible Memberships of the importedNamespace. If isRecursive = true, then + /// Memberships are also recursively imported from any ownedMembers of the importedNamespace that are + /// themselves Namespaces. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeRedefinedImportedMembershipsOperation(excluded); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs b/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs index 1b0612f71..4414b8751 100644 --- a/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs +++ b/SysML2.NET/Core/AutoGenPoco/NamespaceImport.cs @@ -351,6 +351,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IImport.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Private; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Returns at least the visible Memberships of the importedNamespace. If isRecursive = true, then + /// Memberships are also recursively imported from any ownedMembers of the importedNamespace that are + /// themselves Namespaces. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeRedefinedImportedMembershipsOperation(excluded); + + /// + /// Returns Memberships that are to become importedMemberships of the importOwningNamespace. (The + /// excluded parameter is used to handle the possibility of circular Import Relationships.) + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IImport.ImportedMemberships(List excluded) => this.ImportedMemberships(excluded); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/NullExpression.cs b/SysML2.NET/Core/AutoGenPoco/NullExpression.cs index bb6fd4cc9..3bed8a22a 100644 --- a/SysML2.NET/Core/AutoGenPoco/NullExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/NullExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -785,6 +786,676 @@ public NullExpression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// The model-level value of a NullExpression is an empty sequence. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A NullExpression is always model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs b/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs index 46a166342..ea41ba248 100644 --- a/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ObjectiveMembership.cs @@ -431,6 +431,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs b/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs index 210974ef6..977b0ac42 100644 --- a/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/OccurrenceDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -809,6 +811,407 @@ public OccurrenceDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs index 6a49ad6b2..36e75a706 100644 --- a/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/OccurrenceUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Occurrences using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1112,6 +1113,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs b/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs index 9a95a713f..509c408f4 100644 --- a/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/OperatorExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -812,6 +813,699 @@ public OperatorExpression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Apply the Function that is the type of this InvocationExpression to the argument values resulting + /// from evaluating each of the argument Expressions on the given target. If the application is not + /// possible, then return an empty sequence. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// The instantiatedType of an OperatorExpression is the resolution of it's operator from one of the + /// packages BaseFunctions, DataFunctions, or ControlFunctions from the Kernel Function Library. + /// + /// + /// The expected + /// + public IType InstantiatedType() => this.ComputeRedefinedInstantiatedTypeOperation(); + + /// + /// Return the Type to act as the instantiatedType for this InstantiationExpression. By default, this is + /// the memberElement of the first ownedMembership that is not a FeatureMembership, which must be a + /// Type. Note. This operation is overridden in the subclass + /// OperatorExpression. + /// + /// + /// The expected + /// + IType IInstantiationExpression.InstantiatedType() => this.InstantiatedType(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// An InvocationExpression is model-level evaluable if all its argument Expressions are model-level + /// evaluable and its function is model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs b/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs index 5f6f3dc99..3561ae836 100644 --- a/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/OwningMembership.cs @@ -398,6 +398,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Package.cs b/SysML2.NET/Core/AutoGenPoco/Package.cs index df3b6c792..a8748c07d 100644 --- a/SysML2.NET/Core/AutoGenPoco/Package.cs +++ b/SysML2.NET/Core/AutoGenPoco/Package.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Packages using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -292,6 +293,231 @@ public Package() [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Exclude Elements that do not meet all the filterConditions. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeRedefinedImportedMembershipsOperation(excluded); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.ImportedMemberships(List excluded) => this.ImportedMemberships(excluded); + + /// + /// Determine whether the given element meets all the filterConditions. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IncludeAsMember(IElement element) => this.ComputeIncludeAsMemberOperation(element); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeVisibleMembershipsOperation(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs b/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs index 2034badd2..458564b3d 100644 --- a/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ParameterMembership.cs @@ -432,6 +432,109 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return the required value of the direction of the ownedMemberParameter. By default, this is in. + /// + /// + /// The expected + /// + public FeatureDirectionKind ParameterDirection() => this.ComputeParameterDirectionOperation(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs b/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs index dc7e87c0b..33cbdb4b2 100644 --- a/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/PartDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Parts using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -807,6 +809,407 @@ public PartDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/PartUsage.cs b/SysML2.NET/Core/AutoGenPoco/PartUsage.cs index 469374421..ce561ccd2 100644 --- a/SysML2.NET/Core/AutoGenPoco/PartUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PartUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Parts using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1130,6 +1131,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs b/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs index 995ba314b..6556cc1ea 100644 --- a/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs +++ b/SysML2.NET/Core/AutoGenPoco/PayloadFeature.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; @@ -738,6 +739,610 @@ public PayloadFeature() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs index 21d12855d..19735de03 100644 --- a/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PerformActionUsage.cs @@ -30,12 +30,14 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -1170,6 +1172,681 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// The naming Feature of a PerformActionUsage is its performedAction, if this is different than the + /// PerformActionUsage. If the PerformActionUsage is its own performedAction, then the naming Feature is + /// the same as the usual default for a Usage. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs b/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs index 34dccc974..68e758f3e 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortConjugation.cs @@ -364,6 +364,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs b/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs index 7afff4bc8..15b65f5bf 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -816,6 +818,407 @@ public PortDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/PortUsage.cs b/SysML2.NET/Core/AutoGenPoco/PortUsage.cs index 50a4ed426..956927b18 100644 --- a/SysML2.NET/Core/AutoGenPoco/PortUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/PortUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Ports using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1119,6 +1120,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Predicate.cs b/SysML2.NET/Core/AutoGenPoco/Predicate.cs index 818529e65..928a73fe6 100644 --- a/SysML2.NET/Core/AutoGenPoco/Predicate.cs +++ b/SysML2.NET/Core/AutoGenPoco/Predicate.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Functions using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -563,6 +565,407 @@ public Predicate() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Redefinition.cs b/SysML2.NET/Core/AutoGenPoco/Redefinition.cs index f28c73c59..fb7ae91f7 100644 --- a/SysML2.NET/Core/AutoGenPoco/Redefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/Redefinition.cs @@ -423,6 +423,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs b/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs index 8bc5fafac..1f1301bd8 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReferenceSubsetting.cs @@ -416,6 +416,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs b/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs index 675086d04..1e6837cc1 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReferenceUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -1084,6 +1085,637 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this ReferenceUsage is the payload parameter of a TransitionUsage, then its naming Feature is the + /// payloadParameter of the triggerAction of that TransitionUsage (if any). + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs b/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs index 5b2edf2c1..a1e13563d 100644 --- a/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/RenderingDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -814,6 +816,407 @@ public RenderingDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs b/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs index 6be12ea2f..e57eea5b8 100644 --- a/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/RenderingUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1138,6 +1139,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs b/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs index 8166a4466..8c3345406 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementConstraintMembership.cs @@ -448,6 +448,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs b/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs index e44e9f8c3..773862dd6 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -934,6 +936,407 @@ string Root.Elements.IElement.DeclaredShortName [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs index b6c2d1ebb..07ff44eaa 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1265,6 +1266,693 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A ConstraintUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// The naming Feature of a ConstraintUsage that is owned by a RequirementConstraintMembership and has + /// an ownedReferenceSubsetting is the featureTarget of the referencedFeature of that + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs b/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs index 505c284be..15491aad7 100644 --- a/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/RequirementVerificationMembership.cs @@ -487,6 +487,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs b/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs index 292faf776..3ae7ec088 100644 --- a/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ResultExpressionMembership.cs @@ -432,6 +432,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs b/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs index 73670a6bd..6c2e75e17 100644 --- a/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ReturnParameterMembership.cs @@ -433,6 +433,118 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// The ownedMemberParameter of a ReturnParameterMembership must have direction out. (This is a leaf + /// operation that cannot be further redefined.) + /// + /// + /// The expected + /// + public FeatureDirectionKind ParameterDirection() => this.ComputeRedefinedParameterDirectionOperation(); + + /// + /// Return the required value of the direction of the ownedMemberParameter. By default, this is in. + /// + /// + /// The expected + /// + FeatureDirectionKind IParameterMembership.ParameterDirection() => this.ParameterDirection(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs b/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs index 1b80fdd22..cef4b5608 100644 --- a/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SatisfyRequirementUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1303,6 +1304,693 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A ConstraintUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// The naming Feature of a ConstraintUsage that is owned by a RequirementConstraintMembership and has + /// an ownedReferenceSubsetting is the featureTarget of the referencedFeature of that + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs b/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs index cf16784cd..add2116aa 100644 --- a/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/SelectExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Expressions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -827,6 +828,699 @@ string IOperatorExpression.Operator [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Apply the Function that is the type of this InvocationExpression to the argument values resulting + /// from evaluating each of the argument Expressions on the given target. If the application is not + /// possible, then return an empty sequence. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// The instantiatedType of an OperatorExpression is the resolution of it's operator from one of the + /// packages BaseFunctions, DataFunctions, or ControlFunctions from the Kernel Function Library. + /// + /// + /// The expected + /// + public IType InstantiatedType() => this.ComputeRedefinedInstantiatedTypeOperation(); + + /// + /// Return the Type to act as the instantiatedType for this InstantiationExpression. By default, this is + /// the memberElement of the first ownedMembership that is not a FeatureMembership, which must be a + /// Type. Note. This operation is overridden in the subclass + /// OperatorExpression. + /// + /// + /// The expected + /// + IType IInstantiationExpression.InstantiatedType() => this.InstantiatedType(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// An InvocationExpression is model-level evaluable if all its argument Expressions are model-level + /// evaluable and its function is model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs index 38ae245c0..1a3cc5758 100644 --- a/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SendActionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1166,6 +1167,671 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Specialization.cs b/SysML2.NET/Core/AutoGenPoco/Specialization.cs index 2f094cd26..abf11e65b 100644 --- a/SysML2.NET/Core/AutoGenPoco/Specialization.cs +++ b/SysML2.NET/Core/AutoGenPoco/Specialization.cs @@ -333,6 +333,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs b/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs index a79580b3a..91deb9d03 100644 --- a/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/StakeholderMembership.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -442,6 +443,109 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return the required value of the direction of the ownedMemberParameter. By default, this is in. + /// + /// + /// The expected + /// + public FeatureDirectionKind ParameterDirection() => this.ComputeParameterDirectionOperation(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs b/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs index f78dcc343..d56861782 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.States using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -881,6 +883,407 @@ public StateDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs b/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs index af61b5f3d..5c8ab9c4c 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateSubactionMembership.cs @@ -439,6 +439,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/StateUsage.cs b/SysML2.NET/Core/AutoGenPoco/StateUsage.cs index 34af2b920..68c91e1cd 100644 --- a/SysML2.NET/Core/AutoGenPoco/StateUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/StateUsage.cs @@ -30,12 +30,14 @@ namespace SysML2.NET.Core.POCO.Systems.States using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -1189,6 +1191,685 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// Check if this StateUsage is composite and has an owningType that is a StateDefinition or StateUsage + /// with the given value of isParallel, but is not an entryAction, doAction, or exitAction. If so, then + /// it represents a StateAction that is a substate or exclusiveState (for isParallel = false) of another + /// StateAction. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsSubstateUsage(bool isParallel) => this.ComputeIsSubstateUsageOperation(isParallel); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Step.cs b/SysML2.NET/Core/AutoGenPoco/Step.cs index 8bb890086..8b850c533 100644 --- a/SysML2.NET/Core/AutoGenPoco/Step.cs +++ b/SysML2.NET/Core/AutoGenPoco/Step.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Behaviors using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Annotations; @@ -758,6 +759,610 @@ public Step() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Structure.cs b/SysML2.NET/Core/AutoGenPoco/Structure.cs index cebc67eeb..1897edc70 100644 --- a/SysML2.NET/Core/AutoGenPoco/Structure.cs +++ b/SysML2.NET/Core/AutoGenPoco/Structure.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Kernel.Structures using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -519,6 +521,407 @@ public Structure() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Subclassification.cs b/SysML2.NET/Core/AutoGenPoco/Subclassification.cs index 0f8f018d7..5f07a7c11 100644 --- a/SysML2.NET/Core/AutoGenPoco/Subclassification.cs +++ b/SysML2.NET/Core/AutoGenPoco/Subclassification.cs @@ -380,6 +380,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs b/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs index 79756fd19..dc759f18a 100644 --- a/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/SubjectMembership.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.Core.POCO.Systems.Requirements using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -442,6 +443,109 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return the required value of the direction of the ownedMemberParameter. By default, this is in. + /// + /// + /// The expected + /// + public FeatureDirectionKind ParameterDirection() => this.ComputeParameterDirectionOperation(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Subsetting.cs b/SysML2.NET/Core/AutoGenPoco/Subsetting.cs index aed07db0b..fbd5131e8 100644 --- a/SysML2.NET/Core/AutoGenPoco/Subsetting.cs +++ b/SysML2.NET/Core/AutoGenPoco/Subsetting.cs @@ -385,6 +385,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Succession.cs b/SysML2.NET/Core/AutoGenPoco/Succession.cs index 3b470e250..4aa92dedc 100644 --- a/SysML2.NET/Core/AutoGenPoco/Succession.cs +++ b/SysML2.NET/Core/AutoGenPoco/Succession.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Connectors using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Kernel.Associations; @@ -864,6 +865,630 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs index e4e651f86..97df38e78 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionAsUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Connections using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -1198,6 +1199,648 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs index 72195d8cc..67e698277 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionFlow.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Kernel.Interactions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -938,6 +939,630 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs b/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs index 8a08b3ef1..013bbf05c 100644 --- a/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/SuccessionFlowUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -38,6 +39,7 @@ namespace SysML2.NET.Core.POCO.Systems.Flows using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Classes; using SysML2.NET.Core.POCO.Kernel.Connectors; + using SysML2.NET.Core.POCO.Kernel.Functions; using SysML2.NET.Core.POCO.Kernel.Interactions; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -1328,6 +1330,691 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs index 4fe5ac967..565dd127e 100644 --- a/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/TerminateActionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1152,6 +1153,671 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs b/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs index 4232104bf..08e2c67b0 100644 --- a/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs +++ b/SysML2.NET/Core/AutoGenPoco/TextualRepresentation.cs @@ -313,6 +313,56 @@ public TextualRepresentation() [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs b/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs index ba6cd3da4..15aec5aa9 100644 --- a/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/TransitionFeatureMembership.cs @@ -440,6 +440,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs b/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs index a32ccc77b..2557bbd0c 100644 --- a/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/TransitionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.States using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1201,6 +1202,689 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Return the Feature to be used as the source of the succession of this TransitionUsage, which is the + /// first member of the TransitionUsage that is a Feature, that is owned by the TransitionUsage via a + /// Membership that is not a FeatureMembership, and whose featureTarget is an ActionUsage. + /// + /// + /// The expected + /// + public IFeature SourceFeature() => this.ComputeSourceFeatureOperation(); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the payloadParameter of the triggerAction of this TransitionUsage, if it has one. + /// + /// + /// The expected + /// + public IReferenceUsage TriggerPayloadParameter() => this.ComputeTriggerPayloadParameterOperation(); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs b/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs index 7f6ec857d..4fd2e1c73 100644 --- a/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs +++ b/SysML2.NET/Core/AutoGenPoco/TriggerInvocationExpression.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Actions; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -814,6 +815,700 @@ public TriggerInvocationExpression() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Apply the Function that is the type of this InvocationExpression to the argument values resulting + /// from evaluating each of the argument Expressions on the given target. If the application is not + /// possible, then return an empty sequence. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeRedefinedEvaluateOperation(target); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IExpression.Evaluate(IElement target) => this.Evaluate(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return one of the Functions TriggerWhen, TriggerAt or TriggerAfter, from the Kernel Semantic Library + /// Triggers package, depending on whether the kind of this TriggerInvocationExpression is when, at or + /// after, respectively. + /// + /// + /// The expected + /// + public IType InstantiatedType() => this.ComputeRedefinedInstantiatedTypeOperation(); + + /// + /// Return the Type to act as the instantiatedType for this InstantiationExpression. By default, this is + /// the memberElement of the first ownedMembership that is not a FeatureMembership, which must be a + /// Type. Note. This operation is overridden in the subclass + /// OperatorExpression. + /// + /// + /// The expected + /// + IType IInstantiationExpression.InstantiatedType() => this.InstantiatedType(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// An InvocationExpression is model-level evaluable if all its argument Expressions are model-level + /// evaluable and its function is model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Type.cs b/SysML2.NET/Core/AutoGenPoco/Type.cs index 8d232a0d5..96788f3ef 100644 --- a/SysML2.NET/Core/AutoGenPoco/Type.cs +++ b/SysML2.NET/Core/AutoGenPoco/Type.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Core.Types using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -508,6 +509,407 @@ public Type() [Implements(implementation: "IType.UnioningType")] public List unioningType => this.ComputeUnioningType(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs b/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs index 9393ecdc2..f9583d676 100644 --- a/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs +++ b/SysML2.NET/Core/AutoGenPoco/TypeFeaturing.cs @@ -333,6 +333,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IElement.TextualRepresentation")] public List textualRepresentation => this.ComputeTextualRepresentation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Unioning.cs b/SysML2.NET/Core/AutoGenPoco/Unioning.cs index 26ed48c0d..6ba69f28e 100644 --- a/SysML2.NET/Core/AutoGenPoco/Unioning.cs +++ b/SysML2.NET/Core/AutoGenPoco/Unioning.cs @@ -317,6 +317,76 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IUnioning.UnioningType")] public IType UnioningType { get; set; } + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/Usage.cs b/SysML2.NET/Core/AutoGenPoco/Usage.cs index 60686f0c8..6634ed6bc 100644 --- a/SysML2.NET/Core/AutoGenPoco/Usage.cs +++ b/SysML2.NET/Core/AutoGenPoco/Usage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.DefinitionAndUsage using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -1078,6 +1079,628 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs index 05069e833..a1ac231cf 100644 --- a/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/UseCaseDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -904,6 +906,407 @@ public UseCaseDefinition() [Implements(implementation: "IDefinition.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs index 214466648..e9d988048 100644 --- a/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/UseCaseUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.UseCases using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1228,6 +1229,726 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IUsage.VariantMembership")] public List variantMembership => this.ComputeVariantMembership(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A CalculationUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs b/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs index 12cd01e95..5d0779fc6 100644 --- a/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/VariantMembership.cs @@ -410,6 +410,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs b/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs index 05c8eacaa..479ca147d 100644 --- a/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/VerificationCaseDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -903,6 +905,407 @@ public VerificationCaseDefinition() [Implements(implementation: "IVerificationCaseDefinition.VerifiedRequirement")] public List verifiedRequirement => this.ComputeVerifiedRequirement(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs b/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs index 3654ac767..c3aeacb06 100644 --- a/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/VerificationCaseUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.VerificationCases using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1227,6 +1228,726 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IVerificationCaseUsage.VerifiedRequirement")] public List verifiedRequirement => this.ComputeVerifiedRequirement(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A CalculationUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs index 41f97f055..d432d5fe8 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -842,6 +844,407 @@ public ViewDefinition() [Implements(implementation: "IViewDefinition.ViewRendering")] public IRenderingUsage viewRendering => this.ComputeViewRendering(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs b/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs index d907151eb..2cd5f16a1 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewRenderingMembership.cs @@ -440,6 +440,101 @@ List Root.Elements.IRelationship.Target [Implements(implementation: "IMembership.Visibility")] public VisibilityKind Visibility { get; set; } = VisibilityKind.Public; + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Whether this Membership is distinguishable from a given other Membership. By default, this is true + /// if this Membership has no memberShortName or memberName; or each of the memberShortName and + /// memberName are different than both of those of the other Membership; or neither of the metaclasses + /// of the memberElement of this Membership and the memberElement of the other Membership conform to the + /// other. But this may be overridden in specializations of Membership. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsDistinguishableFrom(IMembership other) => this.ComputeIsDistinguishableFromOperation(other); + + /// + /// Return whether this Relationship has either an owningRelatedElement or owningRelationship that is a + /// library element. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeRedefinedLibraryNamespaceOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + INamespace IElement.LibraryNamespace() => this.LibraryNamespace(); + + /// + /// If the ownedMemberElement of this OwningMembership has a non-null qualifiedName, then return the + /// string constructed by appending to that qualifiedName the string "/owningMembership". Otherwise, + /// return the path of the OwningMembership as specified for a Relationship in general. + /// + /// + /// The expected + /// + public string Path() => this.ComputeRedefinedPathOperation(); + + /// + /// If the owningRelationship of the Relationship is null but its owningRelatedElement is non-null, + /// construct the path using the position of the Relationship in the list of ownedRelationships of its + /// owningRelatedElement. Otherwise, return the path of the Relationship as specified for an Element in + /// general. + /// + /// + /// The expected + /// + string IRelationship.Path() => this.Path(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + string IElement.Path() => this.Path(); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs b/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs index 5233284bf..3892bfdd8 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1175,6 +1176,639 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IViewUsage.ViewRendering")] public IRenderingUsage viewRendering => this.ComputeViewRendering(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Determine whether the given element meets all the owned and inherited viewConditions. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IncludeAsExposed(IElement element) => this.ComputeIncludeAsExposedOperation(element); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs b/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs index 6576a8de1..dafa010b9 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewpointDefinition.cs @@ -29,6 +29,8 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.Collections.Generic; using System.Linq; + using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -942,6 +944,407 @@ string Root.Elements.IElement.DeclaredShortName [Implements(implementation: "IViewpointDefinition.ViewpointStakeholder")] public List viewpointStakeholder => this.ComputeViewpointStakeholder(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeEffectiveNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeEffectiveShortNameOperation(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeIsCompatibleWithOperation(otherType); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeSupertypesOperation(excludeImplied); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs b/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs index e85fd9ebb..46b69f8b0 100644 --- a/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/ViewpointUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Views using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1282,6 +1283,693 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IViewpointUsage.ViewpointStakeholder")] public List viewpointStakeholder => this.ComputeViewpointStakeholder(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Model-level evaluate this Expression with the given target. If the result is a LiteralBoolean, + /// return its value. Otherwise return false. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CheckCondition(IElement target) => this.ComputeCheckConditionOperation(target); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// If this Expression isModelLevelEvaluable, then evaluate it using the target as the context Element + /// for resolving Feature names and testing classification. The result is a collection of Elements, + /// which, for a fully evaluable Expression, will be a LiteralExpression or a Feature that is not an + /// Expression. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Evaluate(IElement target) => this.ComputeEvaluateOperation(target); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// A ConstraintUsage is not model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool ModelLevelEvaluable(List visited) => this.ComputeRedefinedModelLevelEvaluableOperation(visited); + + /// + /// Return whether this Expression is model-level evaluable. The visited parameter is used to track + /// possible circular Feature references made from FeatureReferenceExpressions (see the redefinition of + /// this operation for FeatureReferenceExpression). Such circular references are not allowed in + /// model-level evaluable expressions. An Expression that is not otherwise + /// specialized is model-level evaluable if it has no (non-implied) ownedSpecializations and all its + /// ownedFeatures are either in parameters, the result parameter or a result Expression owned via a + /// ResultExpressionMembership. The parameters must not have any ownedFeatures or a FeatureValue, and + /// the result Expression must be model-level evaluable. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IExpression.ModelLevelEvaluable(List visited) => this.ModelLevelEvaluable(visited); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// The naming Feature of a ConstraintUsage that is owned by a RequirementConstraintMembership and has + /// an ownedReferenceSubsetting is the featureTarget of the referencedFeature of that + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + IFeature IUsage.NamingFeature() => this.NamingFeature(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs b/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs index 3a360d789..01497d2b5 100644 --- a/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs +++ b/SysML2.NET/Core/AutoGenPoco/WhileLoopActionUsage.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.Core.POCO.Systems.Actions using System.Linq; using SysML2.NET.Core.Core.Types; + using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.Systems.Occurrences; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Features; @@ -1168,6 +1169,671 @@ bool Core.Features.IFeature.IsVariable [Implements(implementation: "IWhileLoopActionUsage.WhileArgument")] public IExpression whileArgument => this.ComputeWhileArgument(); + + /// + /// Return this Feature and all the Features that are directly or indirectly Redefined by this Feature. + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeatures() => this.ComputeAllRedefinedFeaturesOperation(); + + /// + /// If the memberElement of the given membership is a Feature, then return all Features directly or + /// indirectly redefined by the memberElement. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List AllRedefinedFeaturesOf(IMembership membership) => this.ComputeAllRedefinedFeaturesOfOperation(membership); + + /// + /// Return this Type and all Types that are directly or transitively supertypes of this Type (as + /// determined by the supertypes operation with excludeImplied = false). + /// + /// + /// The expected collection of + /// + public List AllSupertypes() => this.ComputeAllSupertypesOperation(); + + /// + /// Return the i-th argument Expression of an ActionUsage, defined as the value Expression of the + /// FeatureValue of the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage + /// has less than i owned input parameters or the i-th owned input parameter has no FeatureValue. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IExpression Argument(int i) => this.ComputeArgumentOperation(i); + + /// + /// If isCartesianProduct is true, then return the list of Types whose Cartesian product can be + /// represented by this Feature. (If isCartesianProduct is not true, the operation will still return a + /// valid value, it will just not represent anything useful.) + /// + /// + /// The expected collection of + /// + public List AsCartesianProduct() => this.ComputeAsCartesianProductOperation(); + + /// + /// A Feature can access another feature if the other feature is featured within one of the direct or + /// indirect featuringTypes of this Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool CanAccess(IFeature feature) => this.ComputeCanAccessOperation(feature); + + /// + /// Return the directionOf this Feature relative to the given type. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionFor(IType type) => this.ComputeDirectionForOperation(type); + + /// + /// If the given feature is a feature of this Type, then return its direction relative to this Type, + /// taking conjugation into account. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOf(IFeature feature) => this.ComputeDirectionOfOperation(feature); + + /// + /// Return the direction of the given feature relative to this Type, excluding a given set of Types from + /// the search of supertypes of this Type. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public FeatureDirectionKind? DirectionOfExcluding(IFeature feature, List excluded) => this.ComputeDirectionOfExcludingOperation(feature, excluded); + + /// + /// If a Feature has no declaredName or declaredShortName , then its + /// effective name is given by the effective name of the Feature returned by the namingFeature() + /// operation, if any. + /// + /// + /// The expected + /// + public string EffectiveName() => this.ComputeRedefinedEffectiveNameOperation(); + + /// + /// Return an effective name for this Element. By default this is the same as its declaredName. + /// + /// + /// The expected + /// + string IElement.EffectiveName() => this.EffectiveName(); + + /// + /// If a Feature has no declaredShortName or declaredName, then its effective shortName is given by the + /// effective shortName of the Feature returned by the namingFeature() operation, if any. + /// + /// + /// The expected + /// + public string EffectiveShortName() => this.ComputeRedefinedEffectiveShortNameOperation(); + + /// + /// Return an effective shortName for this Element. By default this is the same as its + /// declaredShortName. + /// + /// + /// The expected + /// + string IElement.EffectiveShortName() => this.EffectiveShortName(); + + /// + /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If + /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, + /// otherwise, represented as a restricted name according to the lexical structure of the KerML textual + /// notation (i.e., surrounded by single quote characters and with special characters escaped). + /// + /// + /// The expected + /// + public string EscapedName() => this.ComputeEscapedNameOperation(); + + /// + /// Derive the imported Memberships of this Namespace as the importedMembership of all ownedImports, + /// excluding those Imports whose importOwningNamespace is in the excluded set, and excluding + /// Memberships that have distinguisibility collisions with each other or with any ownedMembership. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List ImportedMemberships(List excluded) => this.ComputeImportedMembershipsOperation(excluded); + + /// + /// Return all the non-private Memberships of all the supertypes of this Type, excluding any supertypes + /// that are this Type or are in the given set of excludedTypes. If excludeImplied = true, then also + /// transitively exclude any supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritableMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritableMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the Memberships inheritable from supertypes of this Type with redefined Features removed. + /// When computing inheritable Memberships, exclude Imports of excludedNamespaces, Specializations of + /// excludedTypes, and, if excludeImplied = true, all implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List InheritedMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeInheritedMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// Return the i-th owned input parameter of the ActionUsage. Return null if the ActionUsage has less + /// than i owned input parameters. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IFeature InputParameter(int i) => this.ComputeInputParameterOperation(i); + + /// + /// Return the owned input parameters of this ActionUsage. + /// + /// + /// The expected collection of + /// + public List InputParameters() => this.ComputeInputParametersOperation(); + + /// + /// Check whether this Feature can be used to represent a Cartesian product of Types. + /// + /// + /// The expected + /// + public bool IsCartesianProduct() => this.ComputeIsCartesianProductOperation(); + + /// + /// A Feature is compatible with an otherType if it either directly or indirectly specializes the + /// otherType or if the otherType is also a Feature and all of the following are true. + ///
    1. Neither this Feature or the otherType have any + /// ownedFeatures.
    2. This Feature directly or indirectly redefines a + /// Feature that is also directly or indirectly redefined by the otherType.
    3. + ///
    4. This Feature can access the otherType.
    + ///
    + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsCompatibleWith(IType otherType) => this.ComputeRedefinedIsCompatibleWithOperation(otherType); + + /// + /// By default, this Type is compatible with an otherType if it directly or indirectly specializes the + /// otherType. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + bool IType.IsCompatibleWith(IType otherType) => this.IsCompatibleWith(otherType); + + /// + /// Return if the featuringTypes of this Feature are compatible with the given type. If type is null, + /// then check if this Feature is explicitly or implicitly featured by Base::Anything. If this Feature + /// has isVariable = true, then also consider it to be featured within its owningType. If this Feature + /// is a feature chain whose first chainingFeature has isVariable = true, then also consider it to be + /// featured within the owningType of its first chainingFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturedWithin(IType type) => this.ComputeIsFeaturedWithinOperation(type); + + /// + /// Return whether the given type must be a featuringType of this Feature. If this Feature has + /// isVariable = false, then return true if the type is the owningType of the Feature. If isVariable = + /// true, then return true if the type is a Feature representing the snapshots of the owningType of this + /// Feature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool IsFeaturingType(IType type) => this.ComputeIsFeaturingTypeOperation(type); + + /// + /// Return whether this Feature is an owned cross Feature of an end Feature. + /// + /// + /// The expected + /// + public bool IsOwnedCrossFeature() => this.ComputeIsOwnedCrossFeatureOperation(); + + /// + /// Check if this ActionUsage is composite and has an owningType that is an ActionDefinition or + /// ActionUsage but is not the entryAction or exitAction of a StateDefinition or StateUsage. If so, then + /// it represents an Action that is a subaction of another Action. + /// + /// + /// The expected + /// + public bool IsSubactionUsage() => this.ComputeIsSubactionUsageOperation(); + + /// + /// By default, return the library Namespace of the owningRelationship of this Element, if it has one. + /// + /// + /// The expected + /// + public INamespace LibraryNamespace() => this.ComputeLibraryNamespaceOperation(); + + /// + /// If visibility is not null, return the Memberships of this Namespace with the given visibility, + /// including ownedMemberships with the given visibility and Memberships imported with the given + /// visibility. If visibility is null, return all ownedMemberships and imported Memberships regardless + /// of visibility. When computing imported Memberships, ignore this Namespace and any Namespaces in the + /// given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List MembershipsOfVisibility(VisibilityKind? visibility, List excluded) => this.ComputeMembershipsOfVisibilityOperation(visibility, excluded); + + /// + /// Return the owned or inherited Multiplicities for this Type<./code>. + /// + /// + /// The expected collection of + /// + public List Multiplicities() => this.ComputeMultiplicitiesOperation(); + + /// + /// Return the names of the given element as it is known in this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NamesOf(IElement element) => this.ComputeNamesOfOperation(element); + + /// + /// By default, the naming Feature of a Feature is given by its first redefinedFeature of its first + /// ownedRedefinition, if any. + /// + /// + /// The expected + /// + IFeature IFeature.NamingFeature() => this.NamingFeature(); + + /// + /// If this Usage is a variant, then its naming Feature is the referencedFeature of its + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature NamingFeature() => this.ComputeRedefinedNamingFeatureOperation(); + + /// + /// Return the public, protected and inherited Memberships of this Type. When computing imported + /// Memberships, exclude the given set of excludedNamespaces. When computing inherited Memberships, + /// exclude Types in the given set of excludedTypes. If excludeImplied = true, then also exclude any + /// supertypes from implied Specializations. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List NonPrivateMemberships(List excludedNamespaces, List excludedTypes, bool excludeImplied) => this.ComputeNonPrivateMembershipsOperation(excludedNamespaces, excludedTypes, excludeImplied); + + /// + /// If this Feature is an end Feature of its owningType, then return the first ownedMember of the + /// Feature that is a Feature, but not a Multiplicity or a MetadataFeature, and whose owningMembership + /// is not a FeatureMembership. If this exists, it is the crossFeature of the end Feature. + /// + /// + /// The expected + /// + public IFeature OwnedCrossFeature() => this.ComputeOwnedCrossFeatureOperation(); + + /// + /// Return a unique description of the location of this Element in the containment structure rooted in a + /// root Namespace. If the Element has a non-null qualifiedName, then return that. Otherwise, if it has + /// an owningRelationship, then return the string constructed by appending to the path of it's + /// owningRelationship the character / followed by the string representation of its position in the list + /// of ownedRelatedElements of the owningRelationship (indexed starting at 1). Otherwise, return the + /// empty string. (Note that this operation is overridden for Relationships + /// to use owningRelatedElement when appropriate.) + /// + /// + /// The expected + /// + public string Path() => this.ComputePathOperation(); + + /// + /// Return a string with valid KerML syntax representing the qualification part of a given + /// qualifiedName, that is, a qualified name with all the segment names of the given name except the + /// last. If the given qualifiedName has only one segment, then return null. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string QualificationOf(string qualifiedName) => this.ComputeQualificationOfOperation(qualifiedName); + + /// + /// Check whether this Feature directly redefines the given redefinedFeature. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Redefines(IFeature redefinedFeature) => this.ComputeRedefinesOperation(redefinedFeature); + + /// + /// Check whether this Feature directly redefines the named library Feature. libraryFeatureName must + /// conform to the syntax of a KerML qualified name and must resolve to a Feature in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool RedefinesFromLibrary(string libraryFeatureName) => this.ComputeRedefinesFromLibraryOperation(libraryFeatureName); + + /// + /// If ownedReferenceSubsetting is not null, return the featureTarget of the referencedFeature of the + /// ownedReferenceSubsetting. + /// + /// + /// The expected + /// + public IFeature ReferencedFeatureTarget() => this.ComputeReferencedFeatureTargetOperation(); + + /// + /// Return a subset of memberships, removing those Memberships whose memberElements are Features and for + /// which either of the following two conditions holds:
      + ///
    1. The memberElement of the Membership is included in redefined Features of another + /// Membership in memberships.
    2. One of the redefined Features of the + /// Membership is a directly redefinedFeature of an ownedFeature of this Type.
    3. + ///
    For this purpose, the redefined Features of a Membership + /// whose memberElement is a Feature includes the memberElement and all Features directly or indirectly + /// redefined by the memberElement. + ///
    + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List RemoveRedefinedFeatures(List memberships) => this.ComputeRemoveRedefinedFeaturesOperation(memberships); + + /// + /// Resolve the given qualified name to the named Membership (if any), starting with this Namespace as + /// the local scope. The qualified name string must conform to the concrete syntax of the KerML textual + /// notation. According to the KerML name resolution rules every qualified name will resolve to either a + /// single Membership, or to none. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership Resolve(string qualifiedName) => this.ComputeResolveOperation(qualifiedName); + + /// + /// Resolve the given qualified name to the named Membership (if any) in the effective global Namespace + /// that is the outermost naming scope. The qualified name string must conform to the concrete syntax of + /// the KerML textual notation. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveGlobal(string qualifiedName) => this.ComputeResolveGlobalOperation(qualifiedName); + + /// + /// Resolve a simple name starting with this Namespace as the local scope, and continuing with + /// containing outer scopes as necessary. However, if this Namespace is a root Namespace, then the + /// resolution is done directly in global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveLocal(string name) => this.ComputeResolveLocalOperation(name); + + /// + /// Resolve a simple name from the visible Memberships of this Namespace. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public IMembership ResolveVisible(string name) => this.ComputeResolveVisibleOperation(name); + + /// + /// Check whether this Type is a direct or indirect specialization of the given supertype. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool Specializes(IType supertype) => this.ComputeSpecializesOperation(supertype); + + /// + /// Check whether this Type is a direct or indirect specialization of the named library Type. + /// libraryTypeName must conform to the syntax of a KerML qualified name and must resolve to a Type in + /// global scope. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SpecializesFromLibrary(string libraryTypeName) => this.ComputeSpecializesFromLibraryOperation(libraryTypeName); + + /// + /// Check whether this Feature directly or indirectly specializes a Feature whose last two + /// chainingFeatures are the given Features first and second. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public bool SubsetsChain(IFeature first, IFeature second) => this.ComputeSubsetsChainOperation(first, second); + + /// + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List Supertypes(bool excludeImplied) => this.ComputeRedefinedSupertypesOperation(excludeImplied); + + /// + /// If this Type is conjugated, then return just the originalType of the Conjugation. Otherwise, return + /// the general Types from all ownedSpecializations of this type, if excludeImplied = false, or all + /// non-implied ownedSpecializations, if excludeImplied = true. + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List IType.Supertypes(bool excludeImplied) => this.Supertypes(excludeImplied); + + /// + /// Return the Features used to determine the types of this Feature (other than this Feature itself). If + /// this Feature is not conjugated, then the typingFeatures consist of all subsetted Features, except + /// from CrossSubsetting, and the last chainingFeature (if any). If this Feature is conjugated, then the + /// typingFeatures are only its originalType (if the originalType is a Feature). + /// Note. CrossSubsetting is excluded from the determination of the type of a + /// Feature in order to avoid circularity in the construction of implied CrossSubsetting relationships. + /// The validateFeatureCrossFeatureType requires that the crossFeature of a Feature have the same type + /// as the Feature. + /// + /// + /// The expected collection of + /// + public List TypingFeatures() => this.ComputeTypingFeaturesOperation(); + + /// + /// Return the simple name that is the last segment name of the given qualifiedName. If this segment + /// name has the form of a KerML unrestricted name, then "unescape" it by removing the surrounding + /// single quotes and replacing all escape sequences with the specified character. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public string UnqualifiedNameOf(string qualifiedName) => this.ComputeUnqualifiedNameOfOperation(qualifiedName); + + /// + /// Returns this visibility of mem relative to this Namespace. If mem is an importedMembership, this is + /// the visibility of its Import. Otherwise it is the visibility of the Membership itself. + /// + /// + /// No documentation provided + /// + /// + /// The expected + /// + public VisibilityKind VisibilityOf(IMembership mem) => this.ComputeVisibilityOfOperation(mem); + + /// + /// The visible Memberships of a Type include inheritedMemberships. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + public List VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.ComputeRedefinedVisibleMembershipsOperation(excluded, isRecursive, includeAll); + + /// + /// If includeAll = true, then return all the Memberships of this Namespace. Otherwise, return only the + /// publicly visible Memberships of this Namespace, including ownedMemberships that have a visibility of + /// public and Memberships imported with a visibility of public. If isRecursive = true, also recursively + /// include all visible Memberships of any public owned Namespaces, or, if IncludeAll = true, all + /// Memberships of all owned Namespaces. When computing imported Memberships, ignore this Namespace and + /// any Namespaces in the given excluded set. + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// No documentation provided + /// + /// + /// The expected collection of + /// + List INamespace.VisibleMemberships(List excluded, bool isRecursive, bool includeAll) => this.VisibleMemberships(excluded, isRecursive, includeAll); } } diff --git a/SysML2.NET/Extend/ElementExtensions.cs b/SysML2.NET/Extend/ElementExtensions.cs index af7a7d03c..7c61229d2 100644 --- a/SysML2.NET/Extend/ElementExtensions.cs +++ b/SysML2.NET/Extend/ElementExtensions.cs @@ -169,7 +169,7 @@ internal static string ComputeQualifiedName(this IElement elementSubject) if (elementSubject.name != null) { - var membersWithTheName = elementSubject.owningNamespace.member.Where(x => x.name == elementSubject.name).ToList(); + var membersWithTheName = elementSubject.owningNamespace.ownedMember.Where(x => x.name == elementSubject.name).ToList(); if (membersWithTheName.IndexOf(elementSubject) != 0) { @@ -220,7 +220,29 @@ internal static List ComputeTextualRepresentation(this I { return elementSubject == null ? throw new ArgumentNullException(nameof(elementSubject)) : [..elementSubject.ownedElement.OfType()]; } - + + /// + /// Validates the constraint that if an Element has any ownedRelationships for which isImplied = true, + /// then the Element must also have isImpliedIncluded = true. + /// + /// + /// The subject + /// + /// + /// true if the constraint is satisfied; false otherwise + /// + internal static bool ValidateIsImpliedIncluded(this IElement elementSubject) + { + if (elementSubject == null) + { + throw new ArgumentNullException(nameof(elementSubject)); + } + + return elementSubject.OwnedRelationship.Count == 0 + || !elementSubject.OwnedRelationship.Any(r => r.IsImplied) + || elementSubject.IsImpliedIncluded; + } + /// /// Return name, if that is not null, otherwise the shortName, if that is not null, otherwise null. If /// the returned value is non-null, it is returned as-is if it has the form of a basic name, or, diff --git a/SysML2.NET/Extend/ImportExtensions.cs b/SysML2.NET/Extend/ImportExtensions.cs index 49457afe5..c75a18292 100644 --- a/SysML2.NET/Extend/ImportExtensions.cs +++ b/SysML2.NET/Extend/ImportExtensions.cs @@ -57,10 +57,9 @@ internal static IElement ComputeImportedElement(this IImport importSubject) /// /// the computed result /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static INamespace ComputeImportOwningNamespace(this IImport importSubject) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + return importSubject == null ? throw new ArgumentNullException(nameof(importSubject)) : importSubject.OwningRelatedElement as INamespace; } /// @@ -76,10 +75,16 @@ internal static INamespace ComputeImportOwningNamespace(this IImport importSubje /// /// The expected collection of /// + /// + /// This method is no longer called at runtime. The POCO classes (, + /// ) now provide explicit interface implementations of + /// that dispatch directly to their respective + /// ComputeRedefinedImportedMembershipsOperation extension methods. + /// [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static List ComputeImportedMembershipsOperation(this IImport importSubject, List excluded) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + throw new NotSupportedException("This method should not be called. Import subtypes handle dispatch via explicit interface implementations."); } } } diff --git a/SysML2.NET/Extend/NamespaceExtensions.cs b/SysML2.NET/Extend/NamespaceExtensions.cs index 624d5c641..20828485a 100644 --- a/SysML2.NET/Extend/NamespaceExtensions.cs +++ b/SysML2.NET/Extend/NamespaceExtensions.cs @@ -24,11 +24,13 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces using System.Collections.Frozen; using System.Collections.Generic; using System.Linq; + using System.Text; using SysML2.NET.Comparer; using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Extensions; /// /// The class provides extensions methods for @@ -98,13 +100,13 @@ internal static List ComputeOwnedImport(this INamespace namespaceSubjec /// /// The subject /// + /// OCL Constraint : ownedMember = ownedMembership->selectByKind(OwningMembership).ownedMemberElement /// /// the computed result /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static List ComputeOwnedMember(this INamespace namespaceSubject) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + return namespaceSubject == null ? throw new ArgumentNullException(nameof(namespaceSubject)) : [..namespaceSubject.ownedMembership.OfType().Select(x => x.ownedMemberElement)]; } /// @@ -133,10 +135,36 @@ internal static List ComputeOwnedMembership(this INamespace namespa /// /// The expected collection of /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static List ComputeNamesOfOperation(this INamespace namespaceSubject, IElement element) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + if (element == null) + { + throw new ArgumentNullException(nameof(element)); + } + + var memberElements = namespaceSubject.membership.Where(x => x.MemberElement == element).ToList(); + + var names = new List(); + + foreach (var memberElement in memberElements) + { + if (!string.IsNullOrWhiteSpace(memberElement.MemberShortName)) + { + names.Add(memberElement.MemberShortName); + } + + if (!string.IsNullOrWhiteSpace(memberElement.MemberName)) + { + names.Add(memberElement.MemberName); + } + } + + return names; } /// @@ -152,10 +180,26 @@ internal static List ComputeNamesOfOperation(this INamespace namespaceSu /// /// The expected /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static VisibilityKind ComputeVisibilityOfOperation(this INamespace namespaceSubject, IMembership mem) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + if (mem == null) + { + throw new ArgumentNullException(nameof(mem)); + } + + var import = namespaceSubject.ownedImport.FirstOrDefault(x => x.ImportedMemberships([]).Contains(mem)); + + if (import != null) + { + return import.Visibility; + } + + return namespaceSubject.membership.Contains(mem) ? mem.Visibility : VisibilityKind.Private; } /// @@ -181,10 +225,48 @@ internal static VisibilityKind ComputeVisibilityOfOperation(this INamespace name /// /// The expected collection of /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static List ComputeVisibleMembershipsOperation(this INamespace namespaceSubject, List excluded, bool isRecursive, bool includeAll) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + var result = new List(); + + if (includeAll) + { + result.AddRange(namespaceSubject.membership); + } + else + { + result.AddRange(namespaceSubject.ownedMembership.Where(m => m.Visibility == VisibilityKind.Public)); + + var excludedWithSelf = new List(excluded) { namespaceSubject }; + + var publicImported = namespaceSubject.ImportedMemberships(excludedWithSelf) + .Where(m => namespaceSubject.VisibilityOf(m) == VisibilityKind.Public); + + result.AddRange(publicImported); + } + + if (isRecursive) + { + var namespaceMemberships = includeAll + ? namespaceSubject.ownedMembership + : namespaceSubject.ownedMembership.Where(m => m.Visibility == VisibilityKind.Public); + + foreach (var mem in namespaceMemberships) + { + if (mem.MemberElement is INamespace nestedNamespace) + { + var nestedMemberships = nestedNamespace.VisibleMemberships(excluded, true, includeAll); + result.AddRange(nestedMemberships); + } + } + } + + return result; } /// @@ -207,11 +289,11 @@ internal static List ComputeImportedMembershipsOperation(this IName .SelectMany(x => x.ImportedMemberships(excluded)) .Distinct() .ToList(); - + var ownedMembershipNames = namespaceSubject.ownedMembership .Select(m => m.MemberName) .ToHashSet(NullSafeStringComparer.Instance); - + var importedMembershipsNameFrequency = importedMemberships .GroupBy(x => x.MemberName, NullSafeStringComparer.Instance) .ToFrozenDictionary(g => g.Key, g => g.Count(), NullSafeStringComparer.Instance); @@ -222,7 +304,7 @@ internal static List ComputeImportedMembershipsOperation(this IName return !ownedMembershipNames.Contains(name) && (!importedMembershipsNameFrequency.TryGetValue(name, out var frequency) || frequency <= 1); }).ToList(); - + return nonCollidingImportedMemberships; } @@ -245,10 +327,30 @@ internal static List ComputeImportedMembershipsOperation(this IName /// /// The expected collection of /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static List ComputeMembershipsOfVisibilityOperation(this INamespace namespaceSubject, VisibilityKind? visibility, List excluded) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + var excludedWithSelf = new List(excluded) { namespaceSubject }; + + if (visibility == null) + { + var result = new List(namespaceSubject.ownedMembership); + result.AddRange(namespaceSubject.ImportedMemberships(excludedWithSelf)); + return result; + } + + var filtered = new List(); + + filtered.AddRange(namespaceSubject.ownedMembership.Where(m => m.Visibility == visibility.Value)); + + filtered.AddRange(namespaceSubject.ImportedMemberships(excludedWithSelf) + .Where(m => namespaceSubject.VisibilityOf(m) == visibility.Value)); + + return filtered; } /// @@ -266,10 +368,34 @@ internal static List ComputeMembershipsOfVisibilityOperation(this I /// /// The expected /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static IMembership ComputeResolveOperation(this INamespace namespaceSubject, string qualifiedName) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + if (string.IsNullOrWhiteSpace(qualifiedName)) + { + return null; + } + + var qualification = namespaceSubject.QualificationOf(qualifiedName); + var simpleName = namespaceSubject.UnqualifiedNameOf(qualifiedName); + + if (qualification == null) + { + return namespaceSubject.ResolveLocal(simpleName); + } + + var qualificationMembership = namespaceSubject.Resolve(qualification); + + if (qualificationMembership?.MemberElement is INamespace qualificationNamespace) + { + return qualificationNamespace.ResolveVisible(simpleName); + } + + return null; } /// @@ -286,10 +412,41 @@ internal static IMembership ComputeResolveOperation(this INamespace namespaceSub /// /// The expected /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static IMembership ComputeResolveGlobalOperation(this INamespace namespaceSubject, string qualifiedName) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + if (string.IsNullOrWhiteSpace(qualifiedName)) + { + return null; + } + + var rootNamespace = namespaceSubject; + + while (rootNamespace.owningNamespace != null) + { + rootNamespace = rootNamespace.owningNamespace; + } + + var qualification = rootNamespace.QualificationOf(qualifiedName); + var simpleName = rootNamespace.UnqualifiedNameOf(qualifiedName); + + if (qualification == null) + { + return rootNamespace.ResolveVisible(simpleName); + } + + var qualificationMembership = rootNamespace.Resolve(qualification); + + if (qualificationMembership?.MemberElement is INamespace qualificationNamespace) + { + return qualificationNamespace.ResolveVisible(simpleName); + } + + return null; } /// @@ -306,10 +463,26 @@ internal static IMembership ComputeResolveGlobalOperation(this INamespace namesp /// /// The expected /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static IMembership ComputeResolveLocalOperation(this INamespace namespaceSubject, string name) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + if (string.IsNullOrWhiteSpace(name)) + { + return null; + } + + if (namespaceSubject.owner == null) + { + return namespaceSubject.ResolveGlobal(name); + } + + var resolved = namespaceSubject.ResolveVisible(name); + + return resolved ?? namespaceSubject.owningNamespace?.ResolveLocal(name); } /// @@ -324,10 +497,21 @@ internal static IMembership ComputeResolveLocalOperation(this INamespace namespa /// /// The expected /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static IMembership ComputeResolveVisibleOperation(this INamespace namespaceSubject, string name) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + if (string.IsNullOrWhiteSpace(name)) + { + return null; + } + + var visibleMemberships = namespaceSubject.VisibleMemberships([], false, false); + + return visibleMemberships.FirstOrDefault(m => m.MemberName == name || m.MemberShortName == name); } /// @@ -344,10 +528,21 @@ internal static IMembership ComputeResolveVisibleOperation(this INamespace names /// /// The expected /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static string ComputeQualificationOfOperation(this INamespace namespaceSubject, string qualifiedName) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + if (string.IsNullOrWhiteSpace(qualifiedName)) + { + return null; + } + + var lastSeparatorIndex = qualifiedName.FindLastQualifiedNameSeparatorIndex(); + + return lastSeparatorIndex < 0 ? null : qualifiedName[..lastSeparatorIndex]; } /// @@ -364,10 +559,25 @@ internal static string ComputeQualificationOfOperation(this INamespace namespace /// /// The expected /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static string ComputeUnqualifiedNameOfOperation(this INamespace namespaceSubject, string qualifiedName) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceSubject == null) + { + throw new ArgumentNullException(nameof(namespaceSubject)); + } + + if (string.IsNullOrWhiteSpace(qualifiedName)) + { + return null; + } + + var lastSeparatorIndex = qualifiedName.FindLastQualifiedNameSeparatorIndex(); + + var lastSegment = lastSeparatorIndex < 0 + ? qualifiedName + : qualifiedName.Substring(lastSeparatorIndex + 2); + + return lastSegment.UnescapeUnrestrictedName(); } } } diff --git a/SysML2.NET/Extend/NamespaceImportExtensions.cs b/SysML2.NET/Extend/NamespaceImportExtensions.cs index afc115d3d..02f73ec4c 100644 --- a/SysML2.NET/Extend/NamespaceImportExtensions.cs +++ b/SysML2.NET/Extend/NamespaceImportExtensions.cs @@ -47,10 +47,19 @@ internal static class NamespaceImportExtensions /// /// The expected collection of /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static List ComputeRedefinedImportedMembershipsOperation(this INamespaceImport namespaceImportSubject, List excluded) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + if (namespaceImportSubject == null) + { + throw new ArgumentNullException(nameof(namespaceImportSubject)); + } + + if (namespaceImportSubject.ImportedNamespace == null) + { + return []; + } + + return namespaceImportSubject.ImportedNamespace.VisibleMemberships(excluded, namespaceImportSubject.IsRecursive, namespaceImportSubject.IsImportAll); } } } diff --git a/SysML2.NET/Extend/OwningMembershipExtensions.cs b/SysML2.NET/Extend/OwningMembershipExtensions.cs index 3cf55a65e..a691dda4e 100644 --- a/SysML2.NET/Extend/OwningMembershipExtensions.cs +++ b/SysML2.NET/Extend/OwningMembershipExtensions.cs @@ -92,10 +92,9 @@ internal static string ComputeOwnedMemberName(this IOwningMembership owningMembe /// /// the computed result /// - [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] internal static string ComputeOwnedMemberShortName(this IOwningMembership owningMembershipSubject) { - throw new NotSupportedException("Create a GitHub issue when this method is required"); + return owningMembershipSubject == null ? throw new ArgumentNullException(nameof(owningMembershipSubject)) : owningMembershipSubject.ownedMemberElement.shortName; } /// diff --git a/SysML2.NET/Extensions/StringExtensions.cs b/SysML2.NET/Extensions/StringExtensions.cs index 4aad82982..4cf1100e2 100644 --- a/SysML2.NET/Extensions/StringExtensions.cs +++ b/SysML2.NET/Extensions/StringExtensions.cs @@ -76,5 +76,93 @@ public static string ToUnrestrictedName(this string name) stringBuilder.Append("'"); return stringBuilder.ToString(); } + + /// + /// Finds the index of the last :: separator in a qualified name that is not inside + /// an unrestricted name (single-quoted segment). + /// + /// + /// The qualified name string + /// + /// + /// The index of the last :: separator, or -1 if the name has only one segment + /// + public static int FindLastQualifiedNameSeparatorIndex(this string qualifiedName) + { + var lastSeparatorIndex = -1; + var inQuote = false; + + for (var i = 0; i < qualifiedName.Length; i++) + { + var c = qualifiedName[i]; + + switch (c) + { + case '\\' when inQuote && i + 1 < qualifiedName.Length: + i++; + continue; + case '\'': + inQuote = !inQuote; + continue; + } + + if (!inQuote && c == ':' && i + 1 < qualifiedName.Length && qualifiedName[i + 1] == ':') + { + lastSeparatorIndex = i; + i++; + } + } + + return lastSeparatorIndex; + } + + /// + /// If the given name segment is an unrestricted name (surrounded by single quotes), + /// unescape it by removing the quotes and replacing escape sequences. Otherwise, + /// return the name as-is. + /// + /// + /// A single name segment from a qualified name + /// + /// + /// The unescaped name + /// + public static string UnescapeUnrestrictedName(this string nameSegment) + { + if (nameSegment.Length < 2 || nameSegment[0] != '\'' || nameSegment[^1] != '\'') + { + return nameSegment; + } + + var inner = nameSegment.Substring(1, nameSegment.Length - 2); + + var sb = new StringBuilder(inner.Length); + + for (var i = 0; i < inner.Length; i++) + { + if (inner[i] == '\\' && i + 1 < inner.Length) + { + i++; + + switch (inner[i]) + { + case '\'': sb.Append('\''); break; + case '"': sb.Append('"'); break; + case 'b': sb.Append('\b'); break; + case 'f': sb.Append('\f'); break; + case 't': sb.Append('\t'); break; + case 'n': sb.Append('\n'); break; + case '\\': sb.Append('\\'); break; + default: sb.Append(inner[i]); break; + } + } + else + { + sb.Append(inner[i]); + } + } + + return sb.ToString(); + } } } diff --git a/SysML2.NET/SysML2.NET.csproj b/SysML2.NET/SysML2.NET.csproj index a133dd387..41961a7f9 100644 --- a/SysML2.NET/SysML2.NET.csproj +++ b/SysML2.NET/SysML2.NET.csproj @@ -25,9 +25,9 @@ - + - + From 8f73f25e887bbff405639163223b956d1a446546 Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 17 Apr 2026 13:38:09 +0200 Subject: [PATCH 2/5] SQ improvement and naming convention context --- CLAUDE.md | 1 + .../Extend/NamespaceExtensionsTestFixture.cs | 4 ++-- SysML2.NET/Extensions/StringExtensions.cs | 16 ++++++++-------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 112a18320..a2f1035ef 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -117,3 +117,4 @@ Auto-generated DTOs use structured namespaces reflecting the KerML/SysML package - Prefer 'string.IsNullOrWhiteSpace' over 'string.IsNullOrEmpty' when checking the non-nullable value of a string - Prefer switch expressions/statements over if-else chains when applicable - Prefer indexer syntax (e.g., 'list[^1]') and range syntax (e.g., 'array[1..^1]') over LINQ methods (e.g., 'list.Last()', 'list.Skip(1).Take(n)') when applicable +- Use meaningful loop variable names instead of single-letter names (e.g., 'charIndex' instead of 'i', 'currentChar' instead of 'c') diff --git a/SysML2.NET.Tests/Extend/NamespaceExtensionsTestFixture.cs b/SysML2.NET.Tests/Extend/NamespaceExtensionsTestFixture.cs index 28a504561..6f683ae49 100644 --- a/SysML2.NET.Tests/Extend/NamespaceExtensionsTestFixture.cs +++ b/SysML2.NET.Tests/Extend/NamespaceExtensionsTestFixture.cs @@ -148,11 +148,11 @@ public void VerifyComputeNamesOfOperation() var membership = new Membership { MemberName = "elementName", MemberShortName = "en", MemberElement = element }; namespaceElement.AssignOwnership(membership, element); - Assert.That(namespaceElement.ComputeNamesOfOperation(element), Is.EquivalentTo(new[] { "en", "elementName" })); + Assert.That(namespaceElement.ComputeNamesOfOperation(element), Is.EquivalentTo(["en", "elementName"])); membership.MemberShortName = null; - Assert.That(namespaceElement.ComputeNamesOfOperation(element), Is.EquivalentTo(new[] { "elementName" })); + Assert.That(namespaceElement.ComputeNamesOfOperation(element), Is.EquivalentTo(["elementName"])); } [Test] diff --git a/SysML2.NET/Extensions/StringExtensions.cs b/SysML2.NET/Extensions/StringExtensions.cs index 4cf1100e2..a9a456e9f 100644 --- a/SysML2.NET/Extensions/StringExtensions.cs +++ b/SysML2.NET/Extensions/StringExtensions.cs @@ -92,24 +92,24 @@ public static int FindLastQualifiedNameSeparatorIndex(this string qualifiedName) var lastSeparatorIndex = -1; var inQuote = false; - for (var i = 0; i < qualifiedName.Length; i++) + for (var charIndex = 0; charIndex < qualifiedName.Length; charIndex++) { - var c = qualifiedName[i]; + var currentChar = qualifiedName[charIndex]; - switch (c) + switch (currentChar) { - case '\\' when inQuote && i + 1 < qualifiedName.Length: - i++; + case '\\' when inQuote && charIndex + 1 < qualifiedName.Length: + charIndex++; continue; case '\'': inQuote = !inQuote; continue; } - if (!inQuote && c == ':' && i + 1 < qualifiedName.Length && qualifiedName[i + 1] == ':') + if (!inQuote && currentChar == ':' && charIndex + 1 < qualifiedName.Length && qualifiedName[charIndex + 1] == ':') { - lastSeparatorIndex = i; - i++; + lastSeparatorIndex = charIndex; + charIndex++; } } From 864a30da163c4481659ed9ed8b6b4e8ca7e55d32 Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 17 Apr 2026 13:38:58 +0200 Subject: [PATCH 3/5] renaming of index --- SysML2.NET/Extensions/StringExtensions.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SysML2.NET/Extensions/StringExtensions.cs b/SysML2.NET/Extensions/StringExtensions.cs index a9a456e9f..e082f2658 100644 --- a/SysML2.NET/Extensions/StringExtensions.cs +++ b/SysML2.NET/Extensions/StringExtensions.cs @@ -138,13 +138,13 @@ public static string UnescapeUnrestrictedName(this string nameSegment) var sb = new StringBuilder(inner.Length); - for (var i = 0; i < inner.Length; i++) + for (var innerCharIndex = 0; innerCharIndex < inner.Length; innerCharIndex++) { - if (inner[i] == '\\' && i + 1 < inner.Length) + if (inner[innerCharIndex] == '\\' && innerCharIndex + 1 < inner.Length) { - i++; + innerCharIndex++; - switch (inner[i]) + switch (inner[innerCharIndex]) { case '\'': sb.Append('\''); break; case '"': sb.Append('"'); break; @@ -153,12 +153,12 @@ public static string UnescapeUnrestrictedName(this string nameSegment) case 't': sb.Append('\t'); break; case 'n': sb.Append('\n'); break; case '\\': sb.Append('\\'); break; - default: sb.Append(inner[i]); break; + default: sb.Append(inner[innerCharIndex]); break; } } else { - sb.Append(inner[i]); + sb.Append(inner[innerCharIndex]); } } From 1e67ca4c9752791a982d31b7ad5814a6dce70fc2 Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 17 Apr 2026 13:55:22 +0200 Subject: [PATCH 4/5] SQ issues fix --- CLAUDE.md | 2 +- SysML2.NET/Extensions/StringExtensions.cs | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a2f1035ef..af2fe8f96 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -117,4 +117,4 @@ Auto-generated DTOs use structured namespaces reflecting the KerML/SysML package - Prefer 'string.IsNullOrWhiteSpace' over 'string.IsNullOrEmpty' when checking the non-nullable value of a string - Prefer switch expressions/statements over if-else chains when applicable - Prefer indexer syntax (e.g., 'list[^1]') and range syntax (e.g., 'array[1..^1]') over LINQ methods (e.g., 'list.Last()', 'list.Skip(1).Take(n)') when applicable -- Use meaningful loop variable names instead of single-letter names (e.g., 'charIndex' instead of 'i', 'currentChar' instead of 'c') +- Use meaningful variable names instead of single-letter names in any context (e.g., 'charIndex' instead of 'i', 'currentChar' instead of 'c', 'element' instead of 'e') diff --git a/SysML2.NET/Extensions/StringExtensions.cs b/SysML2.NET/Extensions/StringExtensions.cs index e082f2658..b3584d0d3 100644 --- a/SysML2.NET/Extensions/StringExtensions.cs +++ b/SysML2.NET/Extensions/StringExtensions.cs @@ -92,23 +92,30 @@ public static int FindLastQualifiedNameSeparatorIndex(this string qualifiedName) var lastSeparatorIndex = -1; var inQuote = false; - for (var charIndex = 0; charIndex < qualifiedName.Length; charIndex++) + var charIndex = 0; + + while (charIndex < qualifiedName.Length) { var currentChar = qualifiedName[charIndex]; switch (currentChar) { case '\\' when inQuote && charIndex + 1 < qualifiedName.Length: - charIndex++; + charIndex += 2; continue; case '\'': inQuote = !inQuote; + charIndex++; continue; } if (!inQuote && currentChar == ':' && charIndex + 1 < qualifiedName.Length && qualifiedName[charIndex + 1] == ':') { lastSeparatorIndex = charIndex; + charIndex += 2; + } + else + { charIndex++; } } @@ -138,7 +145,9 @@ public static string UnescapeUnrestrictedName(this string nameSegment) var sb = new StringBuilder(inner.Length); - for (var innerCharIndex = 0; innerCharIndex < inner.Length; innerCharIndex++) + var innerCharIndex = 0; + + while (innerCharIndex < inner.Length) { if (inner[innerCharIndex] == '\\' && innerCharIndex + 1 < inner.Length) { @@ -160,6 +169,8 @@ public static string UnescapeUnrestrictedName(this string nameSegment) { sb.Append(inner[innerCharIndex]); } + + innerCharIndex++; } return sb.ToString(); From a5f514119f577e3a86719e58ad729a1061f8726d Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 17 Apr 2026 14:46:33 +0200 Subject: [PATCH 5/5] requested changes --- .../OwningMembershipExtensionsTestFixture.cs | 4 +- SysML2.NET/Extend/NamespaceExtensions.cs | 67 +++++++++++++++---- .../Extend/OwningMembershipExtensions.cs | 3 +- 3 files changed, 57 insertions(+), 17 deletions(-) diff --git a/SysML2.NET.Tests/Extend/OwningMembershipExtensionsTestFixture.cs b/SysML2.NET.Tests/Extend/OwningMembershipExtensionsTestFixture.cs index bc38e1f12..ad9ab2260 100644 --- a/SysML2.NET.Tests/Extend/OwningMembershipExtensionsTestFixture.cs +++ b/SysML2.NET.Tests/Extend/OwningMembershipExtensionsTestFixture.cs @@ -30,7 +30,7 @@ namespace SysML2.NET.Tests.Extend public class OwningMembershipExtensionsTestFixture { [Test] - public void ComputeOwnedMemberElement_ThrowsNotSupportedException() + public void ComputeOwnedMemberElement_ThrowsArgumentNullException() { Assert.That(() => ((IOwningMembership)null).ComputeOwnedMemberElement(), Throws.TypeOf()); } @@ -42,7 +42,7 @@ public void ComputeOwnedMemberElementId_ThrowsNotSupportedException() } [Test] - public void ComputeOwnedMemberName_ThrowsNotSupportedException() + public void ComputeOwnedMemberName_ThrowsArgumentNullException() { Assert.That(() => ((IOwningMembership)null).ComputeOwnedMemberName(), Throws.TypeOf()); } diff --git a/SysML2.NET/Extend/NamespaceExtensions.cs b/SysML2.NET/Extend/NamespaceExtensions.cs index 20828485a..a3180f394 100644 --- a/SysML2.NET/Extend/NamespaceExtensions.cs +++ b/SysML2.NET/Extend/NamespaceExtensions.cs @@ -21,7 +21,6 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces { using System; - using System.Collections.Frozen; using System.Collections.Generic; using System.Linq; using System.Text; @@ -77,7 +76,7 @@ internal static List ComputeMember(this INamespace namespaceSubject) /// internal static List ComputeMembership(this INamespace namespaceSubject) { - return namespaceSubject == null ? throw new ArgumentNullException(nameof(namespaceSubject)) : [..namespaceSubject.ownedMembership.Union(namespaceSubject.importedMembership)]; + return namespaceSubject == null ? throw new ArgumentNullException(nameof(namespaceSubject)) : [..namespaceSubject.ownedMembership.Union(namespaceSubject.ImportedMemberships([]))]; } /// @@ -192,11 +191,14 @@ internal static VisibilityKind ComputeVisibilityOfOperation(this INamespace name throw new ArgumentNullException(nameof(mem)); } - var import = namespaceSubject.ownedImport.FirstOrDefault(x => x.ImportedMemberships([]).Contains(mem)); - - if (import != null) + foreach (var ownedImport in namespaceSubject.ownedImport) { - return import.Visibility; + var membershipsFromImport = ownedImport.ImportedMemberships([]); + + if (membershipsFromImport.Contains(mem)) + { + return ownedImport.Visibility; + } } return namespaceSubject.membership.Contains(mem) ? mem.Visibility : VisibilityKind.Private; @@ -291,18 +293,57 @@ internal static List ComputeImportedMembershipsOperation(this IName .ToList(); var ownedMembershipNames = namespaceSubject.ownedMembership - .Select(m => m.MemberName) + .Select(membership => membership.MemberName) + .ToHashSet(NullSafeStringComparer.Instance); + + var ownedMembershipShortNames = namespaceSubject.ownedMembership + .Select(membership => membership.MemberShortName) .ToHashSet(NullSafeStringComparer.Instance); - var importedMembershipsNameFrequency = importedMemberships - .GroupBy(x => x.MemberName, NullSafeStringComparer.Instance) - .ToFrozenDictionary(g => g.Key, g => g.Count(), NullSafeStringComparer.Instance); + var importedNameFrequency = new Dictionary(importedMemberships.Count); + var importedShortNameFrequency = new Dictionary(importedMemberships.Count); + var importedNullNameCount = 0; + var importedNullShortNameCount = 0; + + foreach (var membership in importedMemberships) + { + var memberName = membership.MemberName; + + if (memberName != null) + { + importedNameFrequency[memberName] = importedNameFrequency.TryGetValue(memberName, out var nameCount) ? nameCount + 1 : 1; + } + else + { + importedNullNameCount++; + } + + var memberShortName = membership.MemberShortName; - var nonCollidingImportedMemberships = importedMemberships.Where(x => + if (memberShortName != null) + { + importedShortNameFrequency[memberShortName] = importedShortNameFrequency.TryGetValue(memberShortName, out var shortNameCount) ? shortNameCount + 1 : 1; + } + else + { + importedNullShortNameCount++; + } + } + + var nonCollidingImportedMemberships = importedMemberships.Where(membership => { - var name = x.MemberName; + var memberName = membership.MemberName; + var memberShortName = membership.MemberShortName; + + var nameCollidesWithOwned = ownedMembershipNames.Contains(memberName) || ownedMembershipShortNames.Contains(memberShortName); + + var nameCollidesWithImported = + (memberName != null && importedNameFrequency.TryGetValue(memberName, out var nameFrequency) && nameFrequency > 1) + || (memberName == null && importedNullNameCount > 1) + || (memberShortName != null && importedShortNameFrequency.TryGetValue(memberShortName, out var shortNameFrequency) && shortNameFrequency > 1) + || (memberShortName == null && importedNullShortNameCount > 1); - return !ownedMembershipNames.Contains(name) && (!importedMembershipsNameFrequency.TryGetValue(name, out var frequency) || frequency <= 1); + return !nameCollidesWithOwned && !nameCollidesWithImported; }).ToList(); return nonCollidingImportedMemberships; diff --git a/SysML2.NET/Extend/OwningMembershipExtensions.cs b/SysML2.NET/Extend/OwningMembershipExtensions.cs index a691dda4e..6dcfb9ecc 100644 --- a/SysML2.NET/Extend/OwningMembershipExtensions.cs +++ b/SysML2.NET/Extend/OwningMembershipExtensions.cs @@ -22,7 +22,6 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces { using System; using System.Collections.Generic; - using System.Linq; using SysML2.NET.Core.Root.Namespaces; using SysML2.NET.Core.POCO.Root.Annotations; @@ -51,7 +50,7 @@ internal static IElement ComputeOwnedMemberElement(this IOwningMembership owning throw new ArgumentNullException(nameof(owningMembershipSubject)); } - return owningMembershipSubject.OwnedRelatedElement.Count != 1 ? throw new IncompleteModelException($"{nameof(owningMembershipSubject)} must have exactly one related element") : owningMembershipSubject.OwnedRelatedElement.Single(); + return owningMembershipSubject.OwnedRelatedElement.Count != 1 ? throw new IncompleteModelException($"{nameof(owningMembershipSubject)} must have exactly one related element") : owningMembershipSubject.OwnedRelatedElement[0]; } ///