diff --git a/CLAUDE.md b/CLAUDE.md index 810726b2..af2fe8f9 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,7 @@ 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 +- 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.REST.Tests/SySML2.NET.REST.Tests.csproj b/SySML2.NET.REST.Tests/SySML2.NET.REST.Tests.csproj index 1674ddcd..b06bb8d4 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 19a5bbd2..f44cb12d 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 52e70934..aa422657 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 a5da6dd5..c8434d5d 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 7f5e5c81..12e2d343 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 17ffe96f..b965864d 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 69a5b673..31c39f27 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 df70f331..fe7f78fa 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 16805fc4..3c053af7 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 7d9aa226..4e0df58b 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 f8b12730..2c9fe56c 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 1e2c8152..00c328fa 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 197842b9..15eb0b30 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 0ce518fc..186b9244 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 119cb797..b48749b0 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 50eb96cb..e5bbab23 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 1059310d..c0cc31af 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 e7fc2a4e..68b5d4fc 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 2fca3016..77497285 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 a45fddbc..a624afbc 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 4224cff8..d030dd1c 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 40abbd0e..eb649405 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 a52ecc29..7682f526 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 8909a355..ce10683e 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 a85b1e42..ebace2d0 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 9de34abb..cb63d8fe 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 c89c9891..e88bb7c8 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 1d02076e..07618246 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 f9b4e0e5..5d37c009 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 53ba0c5f..c3c49c9f 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 d6b94196..ef56866e 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 d6f677ec..f085dd78 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 c54db3bc..3d407b63 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 e8a2465a..a4a2fcd7 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 6f1dd22e..b6541a2f 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 017023bc..c629bf04 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 bd02f3af..3389fd24 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 3c9cb317..da5e5b45 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 31c54865..bad30775 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 228593a5..94d464a0 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 af9e7271..7febcbe2 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 80656056..a49e959f 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 abcf955b..bdc38a85 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 1c3aa7e8..8ec899a4 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 fce5ac99..43b5d3f8 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 badeec7c..cbf17d88 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 fb6ed8a7..22baf1cb 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 632cb764..11f56051 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 d8d1954e..b3e794bb 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 00000000..6f683ae4 --- /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(["en", "elementName"])); + + membership.MemberShortName = null; + + Assert.That(namespaceElement.ComputeNamesOfOperation(element), Is.EquivalentTo(["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 61b8b449..ad9ab226 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,15 +42,15 @@ public void ComputeOwnedMemberElementId_ThrowsNotSupportedException() } [Test] - public void ComputeOwnedMemberName_ThrowsNotSupportedException() + public void ComputeOwnedMemberName_ThrowsArgumentNullException() { Assert.That(() => ((IOwningMembership)null).ComputeOwnedMemberName(), Throws.TypeOf()); } [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 4d3b47a1..980bce51 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 5b1195cf..ca92b31f 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 8e2529e3..8316307b 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 d6a523e5..0caf04fb 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 ad96965a..9691c7dd 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 7680237b..f7db8672 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 3daa8b55..b817fa62 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 95b049dd..56e9a7f7 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 386d1250..773ddbbc 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 51a00ed8..4707948d 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 f6b87adf..ba833c90 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 d664fd69..d8903241 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 d09ee638..c9b494b4 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 7544b938..c12dfa4b 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 c136253b..92911b9e 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 6f98b8bf..c5f22db7 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 caaa99a9..9becc2cc 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 ee2318b7..d91fcd5e 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 3eaad33c..644d4ae1 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 aea7b579..36558c14 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 1211d294..bd8c1d59 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 0bc3b638..ea5336aa 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 9760ce72..2cba11e4 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 e5507f34..a85ff6ba 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 9aca6dcd..59734e37 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 9c67cd9d..6725297d 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 7944c922..50543efa 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 f577aba5..f285dd67 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 f5ac18d6..7c8df524 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 55125688..08df0a27 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 d7fcd96b..0ed01ef2 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 1fa722a8..9d3003e0 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 5423bab6..70e58dce 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 1847a53e..b224c03b 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 d3f86460..b8b5688e 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 9256126e..6760befc 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 b99c5ee6..f56a5de5 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 c43f815e..3e64d8cd 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 c377ccf2..a61be868 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 a174b995..3de725ea 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 5fa605f3..965e69ae 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 3dee94d3..4b037f6f 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 3d825822..d7cd66f2 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 5db59bde..167b21ed 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 14b24ba6..81d5faa2 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 6d82220e..5c61f5dd 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 9f2a17b2..f8b54b5c 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 7f3d8af3..c9a3f333 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 792a797d..7c83a2d2 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 40a7cc78..672a3e9d 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 30642113..a01ff6ba 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 50f4e8ba..9890f8f0 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 280716ee..14a1ddbf 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 432035f5..20442bc6 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 3813bd42..96219e74 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 7644095b..a3e1be75 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 4f74d790..d2bcf72a 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 1bc856e1..70eec94b 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 703637a1..17374503 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 d2ada4c8..5b937516 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 46b73511..72f5f0d2 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 2d1d971f..762cf6ec 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 5b970760..d76f6828 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 6e70454b..8d74cd51 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 9cb094a4..9d7e4c0b 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 df70f331..fe7f78fa 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 e5bcd454..897f0f24 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 22caf16d..946d581e 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 12152df0..5dd072bc 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 25550521..c524ed53 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 4e3ac23d..0a8c70e3 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 cb68e8c3..6fd6bd6c 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 e97ea583..5db0e08d 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 a3aef7f3..a77345ff 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 ed075ed2..c773152a 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 6c408de5..05dbc0a6 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 714380db..a0645ba1 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 f57c9765..ec895fff 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 c7f06080..69f85759 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 758a9601..e370955e 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 7600e2de..4fb3efd6 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 e9265562..ef6eeb55 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 d49cc921..35e7dacf 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 4f906375..18b55ecd 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 d4d5a308..ef2e693d 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 7d91acba..b5138726 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 84f9069c..3933f906 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 3285fe05..248c8e6f 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 473a6433..db30088c 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 c64a422a..99bb0cd9 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 38bb6782..874f34d5 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 ca99dcc3..9d416401 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 8f6f6470..ddc70232 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 b0f914fb..f6b5b8d7 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 08242682..07ebb52f 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 f0acae4f..ca4ee9d0 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 5cb5195c..6153fa05 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 36ed1ae3..355b2fe9 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 fe3b3ec6..dd4e32a7 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 ab2e496b..66be5c28 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 29d05750..5c99b843 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 3ef7e8ee..b8b0f69d 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 3b35db9e..b6f45864 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 1a9fd3c1..9da53ad0 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 573701b7..01464b56 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 e05a1f3d..09872bac 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 297ea78f..aa0b9d66 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 11ca9a6e..d6bc519f 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 f0ae77d5..684fa2f0 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 8459083f..7bb0c38c 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 6c7a93b5..c98cbe2d 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 d88b6f11..727c1147 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 ed901566..a9dc7220 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 3add4f46..84d4572f 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 43afe2c5..6323caed 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 c62a125f..37b889e8 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 48fd33a7..4e129fe1 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 da597283..b3cc1e27 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 01f4ab57..4b699271 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 fd87937d..e73037d5 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 4b12cf5a..8a96a053 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 0ce518fc..186b9244 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 27874e1c..7f915b25 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 c5003c35..93604070 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 311c6d50..2bd89208 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 7bc80830..e8ecc811 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 f8fbfccb..8bb601ca 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 583c7de5..23ebc827 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 540d8a0d..f493c329 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 93d98c24..65a50a93 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 ddbc70ac..400f5373 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 8d22d208..14e0fec6 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 6a36c6ed..92a2aae3 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 1f2191f8..1c5871d6 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 5644d25e..d58941c0 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 c183a79e..03a4846d 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 09ff242c..5d67a371 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 24548a8f..eac43382 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 411a00cc..60ca9190 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 07dc0f0b..125a4158 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 e678bb7c..3a270998 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 5b68951c..21715b29 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 01e3049b..5220f630 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 5d2ce84f..a2a01cca 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 42610bef..36b685f7 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 5fdd4b53..0d6510e1 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 071d2bb2..a8ac1cae 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 e731f225..4e5cb0d8 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 dbe8f129..c165215e 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 e21d9124..be70eab8 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 e7f9b609..78353e51 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 a1722664..3678b90e 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 29930476..e53a4c38 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 3490c34a..05296e06 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 e14f81e6..5c7a072b 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 8b2fcf62..71d770ee 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 76aac05c..49b5115b 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 f423b9a7..19618467 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 fcf8b699..1872e8f5 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 22a6d43a..8a81fd51 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 d6e9089b..f5a94325 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 6f96b289..3daaf6f7 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 00002fdf..66f4e46e 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 c2b9d3b8..335d82ec 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 928f13ef..8b065976 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 538400d7..ae7d15fd 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 9ac2bce9..caabad72 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 7b41cf08..f961e827 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 7c935549..04aaac03 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 e87d272e..55e1514a 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 84ad7ad2..f8cbec2c 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 14d09adc..a51a5e4d 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 ed3770b6..22fab774 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 0a2be1c5..ac736ee0 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 733a0b28..40080ae9 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 91560825..dd1b5e9f 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 cd742e20..c86cf9f6 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 7a7e2f2d..5da8a3c2 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 0646b438..849fdbe0 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 72fc7b5d..186fc9c0 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 5d2e7ccd..896e82a6 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 ee729426..3290aba7 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 e163372a..4fd6b4f4 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 54da6b86..86cbe34b 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 d60bee34..9d22e198 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 64508a9d..d6d3b357 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 5d38e762..95565f6f 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 a1fd5adb..6b4705eb 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 02865046..0b5e8100 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 8e7b5e5b..9a0b8705 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 56561a73..38f8d817 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 6254caaa..3e2434db 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 2a5380d6..d6d5802d 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 e88e196e..6ddfcb61 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 e94009c8..83888b64 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 e7737929..90ff94c0 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 ed670121..12d56b8b 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 d247ffc4..e0667e44 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 73b89fee..95d748bf 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 c5904647..ca83c0da 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 07723b22..0496fa28 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 6cc5905f..04927a06 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 cd1688f1..c0437dba 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 04fb0695..84398e57 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 ea805345..25d78aa9 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 61e01d4f..131c1e41 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 a6b4ee0b..93ec3771 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 e6b940e5..a5a871c6 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 cd67096b..cf65b86e 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 870c6150..a08e48e1 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 cd6d6033..3d336409 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 ed02aa7e..c1809671 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 8d424b70..08629961 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 50f69cfd..0ca43562 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 59e2f64b..b301207f 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 a3fd9ca1..75717516 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 78256410..e0039a83 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 2db5b8cc..c6242ab2 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 253e0d98..a87fe807 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 73fbed5f..3f3bb1a8 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 bfbcfe51..03de74ff 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 ef2f1054..ad3440de 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 ea27e1d9..fd1d0e76 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 7f5cf971..5ef5e262 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 30decad8..707b9e33 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 20a07530..11966881 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 a12ba5cb..4b3f85ce 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 9d45fe1a..509eccc4 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 f2f50b87..eb57d12d 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 5ba53547..0d759cee 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 87941a17..1819e17f 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 aad62efc..31f83c2d 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 88622a07..553be64c 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 c7fb8380..de72c42f 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 f35a4751..e71d9848 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 56ce0e49..21279736 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 cf3b4be1..ca59d5b9 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 d86ecccb..6512176b 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 797843e7..b96157d2 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 bb16078c..0af4a275 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 ccc0c9e8..372e231f 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 1b0612f7..4414b875 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 bb6fd4cc..3bed8a22 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 46a16634..ea41ba24 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 210974ef..977b0ac4 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 6a49ad6b..36e75a70 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 9a95a713..509c408f 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 5f6f3dc9..3561ae83 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 df3b6c79..a8748c07 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 2034badd..458564b3 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 dc7e87c0..33cbdb4b 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 46937442..ce561ccd 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 995ba314..6556cc1e 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 21d12855..19735de0 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 34dccc97..68e758f3 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 7afff4bc..15b65f5b 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 50a4ed42..956927b1 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 818529e6..928a73fe 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 f28c73c5..fb7ae91f 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 8bc5fafa..1f1301bd 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 675086d0..1e6837cc 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 5b2edf2c..a1e13563 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 6be12ea2..e57eea5b 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 8166a446..8c334540 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 e44e9f8c..773862dd 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 b6c2d1eb..07ff44ea 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 505c284b..15491aad 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 292faf77..3ae7ec08 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 73670a6b..6c2e75e1 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 1b80fdd2..cef4b560 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 cf16784c..add2116a 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 38ae245c..1a3cc575 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 2f094cd2..abf11e65 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 a79580b3..91deb9d0 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 f78dcc34..d5686178 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 af61b5f3..5c8ab9c4 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 34af2b92..68c91e1c 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 8bb89008..8b850c53 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 cebc67ee..1897edc7 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 0f8f018d..5f07a7c1 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 79756fd1..dc759f18 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 aed07db0..fbd5131e 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 3b470e25..4aa92ded 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 e4e651f8..97df38e7 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 72195d8c..67e69827 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 8a08b3ef..013bbf05 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 4fe5ac96..565dd127 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 4232104b..08e2c67b 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 ba6cd3da..15aec5aa 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 a32ccc77..2557bbd0 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 7f6ec857..4fd2e1c7 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 8d232a0d..96788f3e 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 9393ecdc..f9583d67 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 26ed48c0..6ba69f28 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 60686f0c..6634ed6b 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 05069e83..a1ac231c 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 21446664..e9d98804 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 12cd01e9..5d0779fc 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 05c8eaca..479ca147 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 3654ac76..c3aeacb0 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 41f97f05..d432d5fe 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 d907151e..2cd5f16a 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 5233284b..3892bfdd 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 6576a8de..dafa010b 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 e85fd9eb..46b69f8b 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 3a360d78..01497d2b 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 af7a7d03..7c61229d 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 49457afe..c75a1829 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 624d5c64..a3180f39 100644 --- a/SysML2.NET/Extend/NamespaceExtensions.cs +++ b/SysML2.NET/Extend/NamespaceExtensions.cs @@ -21,14 +21,15 @@ namespace SysML2.NET.Core.POCO.Root.Namespaces { using System; - 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 @@ -75,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([]))]; } /// @@ -98,13 +99,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 +134,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 +179,29 @@ 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)); + } + + foreach (var ownedImport in namespaceSubject.ownedImport) + { + var membershipsFromImport = ownedImport.ImportedMemberships([]); + + if (membershipsFromImport.Contains(mem)) + { + return ownedImport.Visibility; + } + } + + return namespaceSubject.membership.Contains(mem) ? mem.Visibility : VisibilityKind.Private; } /// @@ -181,10 +227,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,22 +291,61 @@ internal static List ComputeImportedMembershipsOperation(this IName .SelectMany(x => x.ImportedMemberships(excluded)) .Distinct() .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 nonCollidingImportedMemberships = importedMemberships.Where(x => + var importedNameFrequency = new Dictionary(importedMemberships.Count); + var importedShortNameFrequency = new Dictionary(importedMemberships.Count); + var importedNullNameCount = 0; + var importedNullShortNameCount = 0; + + foreach (var membership in importedMemberships) { - var name = x.MemberName; + var memberName = membership.MemberName; + + if (memberName != null) + { + importedNameFrequency[memberName] = importedNameFrequency.TryGetValue(memberName, out var nameCount) ? nameCount + 1 : 1; + } + else + { + importedNullNameCount++; + } - return !ownedMembershipNames.Contains(name) && (!importedMembershipsNameFrequency.TryGetValue(name, out var frequency) || frequency <= 1); + var memberShortName = membership.MemberShortName; + + if (memberShortName != null) + { + importedShortNameFrequency[memberShortName] = importedShortNameFrequency.TryGetValue(memberShortName, out var shortNameCount) ? shortNameCount + 1 : 1; + } + else + { + importedNullShortNameCount++; + } + } + + var nonCollidingImportedMemberships = importedMemberships.Where(membership => + { + 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 !nameCollidesWithOwned && !nameCollidesWithImported; }).ToList(); - + return nonCollidingImportedMemberships; } @@ -245,10 +368,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 +409,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 +453,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 +504,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 +538,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 +569,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 +600,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 afc115d3..02f73ec4 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 3cf55a65..6dcfb9ec 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]; } /// @@ -92,10 +91,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 4aad8298..b3584d0d 100644 --- a/SysML2.NET/Extensions/StringExtensions.cs +++ b/SysML2.NET/Extensions/StringExtensions.cs @@ -76,5 +76,104 @@ 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; + + var charIndex = 0; + + while (charIndex < qualifiedName.Length) + { + var currentChar = qualifiedName[charIndex]; + + switch (currentChar) + { + case '\\' when inQuote && charIndex + 1 < qualifiedName.Length: + charIndex += 2; + continue; + case '\'': + inQuote = !inQuote; + charIndex++; + continue; + } + + if (!inQuote && currentChar == ':' && charIndex + 1 < qualifiedName.Length && qualifiedName[charIndex + 1] == ':') + { + lastSeparatorIndex = charIndex; + charIndex += 2; + } + else + { + charIndex++; + } + } + + 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); + + var innerCharIndex = 0; + + while (innerCharIndex < inner.Length) + { + if (inner[innerCharIndex] == '\\' && innerCharIndex + 1 < inner.Length) + { + innerCharIndex++; + + switch (inner[innerCharIndex]) + { + 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[innerCharIndex]); break; + } + } + else + { + sb.Append(inner[innerCharIndex]); + } + + innerCharIndex++; + } + + return sb.ToString(); + } } } diff --git a/SysML2.NET/SysML2.NET.csproj b/SysML2.NET/SysML2.NET.csproj index a133dd38..41961a7f 100644 --- a/SysML2.NET/SysML2.NET.csproj +++ b/SysML2.NET/SysML2.NET.csproj @@ -25,9 +25,9 @@ - + - +