From d5026889cc2bd02c1faa6c27769f93237dbd93b1 Mon Sep 17 00:00:00 2001 From: atheate Date: Wed, 18 Feb 2026 15:11:07 +0100 Subject: [PATCH 01/15] [WIP]: KEBNF files are parsed and turn into object graph --- Resources/KerML-textual-bnf.kebnf | 1467 ++++++++++++++ Resources/SysML-textual-bnf.kebnf | 1705 +++++++++++++++++ Resources/kebnf.g4 | 100 + ...NotationSpecificationVisitorTestFixture.cs | 62 + .../NET/CodeGenerator/Grammar/kebnf.interp | 86 + .../NET/CodeGenerator/Grammar/kebnf.tokens | 50 + .../Grammar/kebnfBaseListener.cs | 257 +++ .../CodeGenerator/Grammar/kebnfBaseVisitor.cs | 209 ++ .../NET/CodeGenerator/Grammar/kebnfLexer.cs | 174 ++ .../CodeGenerator/Grammar/kebnfLexer.interp | 104 + .../CodeGenerator/Grammar/kebnfLexer.tokens | 50 + .../CodeGenerator/Grammar/kebnfListener.cs | 205 ++ .../NET/CodeGenerator/Grammar/kebnfParser.cs | 1413 ++++++++++++++ .../NET/CodeGenerator/Grammar/kebnfVisitor.cs | 138 ++ .../Grammar/Model/AssignmentElement.cs | 43 + .../Grammar/Model/GroupElement.cs | 35 + .../Model/NonParsingAssignmentElement.cs | 43 + .../Grammar/Model/NonTerminalElement.cs | 33 + .../Grammar/Model/RuleElement.cs | 55 + .../Grammar/Model/RuleParameter.cs | 38 + .../Grammar/Model/TerminalElement.cs | 33 + .../Grammar/Model/TextualNotationRule.cs | 50 + .../Model/TextualNotationSpecification.cs | 35 + .../TextualNotationSpecificationVisitor.cs | 180 ++ .../SysML2.NET.CodeGenerator.csproj | 14 + 25 files changed, 6579 insertions(+) create mode 100644 Resources/KerML-textual-bnf.kebnf create mode 100644 Resources/SysML-textual-bnf.kebnf create mode 100644 Resources/kebnf.g4 create mode 100644 SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/NonParsingAssignmentElement.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/NonTerminalElement.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/RuleParameter.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/TerminalElement.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationSpecification.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs diff --git a/Resources/KerML-textual-bnf.kebnf b/Resources/KerML-textual-bnf.kebnf new file mode 100644 index 00000000..2837bcfd --- /dev/null +++ b/Resources/KerML-textual-bnf.kebnf @@ -0,0 +1,1467 @@ +// Manual corrections by HP de Koning + +// Part 1 - Kernel Modeling Language (KerML) + +// Clause 8.2 Concrete Syntax + +// Clause 8.2.1 Concrete Syntax Overview + +// Clause 8.2.2 Lexical Structure + +// Clause 8.2.2.1 Line Terminators and White Space + +LINE_TERMINATOR = + '\n' | '\r' | '\r\n' +// implementation defined character sequence + +LINE_TEXT = + '[^\r\n]*' +// character sequence excluding LINE_TERMINATORs + +WHITE_SPACE = + ' ' | '\t' | '\f' | LINE_TERMINATOR +// space | tab | form_feed | LINE_TERMINATOR + +// Notes: +// 1. Notation text is divided up into lines separated by line terminators. A line terminator may be a single character (such as a line feed) or a sequence of characters (such as a carriage return/line feed combination). This specification does not require any specific encoding for a line terminator, but any encoding used must be consistent throughout any specific input text. +// 2. Any characters in text line that are not a part of the line terminator are referred to as line text. +// 3. A white space character is a space, tab, form feed or line terminator. Any contiguous sequence of white space characters can be used to separate tokens that would otherwise be considered to be part of a single token. It is otherwise ignored, with the single exception that a line terminator is used to mark the end of a single-line note (see 8.2.2.2). + +// Clause 8.2.2.2 Notes and Comments + +SINGLE_LINE_NOTE = + '//' LINE_TEXT + +MULTILINE_NOTE = + '//*' COMMENT_TEXT '*/' + +REGULAR_COMMENT = + '/*' COMMENT_TEXT '*/' + +COMMENT_TEXT = + ( COMMENT_LINE_TEXT | LINE_TERMINATOR )* + +COMMENT_LINE_TEXT = + '.*(?=(\r|\n|\*/))' +// LINE_TEXT excluding the sequence '*/' + +// Clause 8.2.2.3 Names + +NAME = + BASIC_NAME | UNRESTRICTED_NAME + +BASIC_NAME = + BASIC_INITIAL_CHARACTER BASIC_NAME_CHARACTER* + +SINGLE_QUOTE = + '#x27' + +UNRESTRICTED_NAME = + SINGLE_QUOTE ( NAME_CHARACTER | ESCAPE_SEQUENCE )* SINGLE_QUOTE + +// (See Note 1) + +BASIC_INITIAL_CHARACTER = + ALPHABETIC_CHARACTER | '_' + +BASIC_NAME_CHARACTER = + BASIC_INITIAL_CHARACTER | DECIMAL_DIGIT + +ALPHABETIC_CHARACTER = + 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | + 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' +// any character 'a' through 'z' or 'A' through 'Z' + +DECIMAL_DIGIT = + '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' + +NAME_CHARACTER = + 'any printable character other than backslash or single_quote' + +ESCAPE_SEQUENCE = + '\f' | '\n' | '\t' | '\r' | '\v' +// (See Note 2) + +// Notes: +// 1. The single_quote character is '. The name represented by an UNRESTRICTED_NAME shall consist of the characters within the single quotes, with escape characters resolved as described below. The surrounding single quote characters are not part of the represented name. +// 2. An ESCAPE_SEQUENCE is a sequence of two text characters starting with a backslash that actually denotes only a single character, except for the newline escape sequence, which represents however many characters is necessary to represent an end of line in a specific implementation (see also 8.2.2.1). Table 4 shows the meaning of the allowed escape sequences. The ESCAPE_SEQUENCES in an UNRESTRICTED_NAME shall be replaced by the characters specified as their meanings in the actual represented name. + +// Clause 8.2.2.4 Numeric Values + +DECIMAL_VALUE = + DECIMAL_DIGIT+ + +EXPONENTIAL_VALUE = + DECIMAL_VALUE ('e' | 'E') ('+' | '-')? DECIMAL_VALUE + +// Notes: +// 1. A DECIMAL_VALUE may specify a natural literal, or it may be part of the specification of a real literal (see 8.2.5.8.4). Note that a DECIMAL_VALUE does not include a sign, because negating a literal is an operator in the KerML Expression syntax. +// 2. An EXPONENTIAL_VALUE may be used in the specification of a real literal (see 8.2.5.8.4). Note that a decimal point and fractional part are not included in the lexical structure of an exponential value. They are handled as part of the syntax of real literals. + +// Clause 8.2.2.5 String Value + +STRING_VALUE = + '"' ( STRING_CHARACTER | ESCAPE_SEQUENCE )* '"' + +STRING_CHARACTER = + 'any printable character other than backslash or "' + +// Notes: +// 1. ESCAPE_SEQUENCE is specified in 8.2.2.3. + +// Clause 8.2.2.6 Reserved Words + +RESERVED_KEYWORD = + 'about' | 'abstract' | 'alias' | 'all' | 'and' | 'as' | 'assoc' | 'behavior' | 'binding' | 'bool' | 'by' | 'chains' + | 'class' | 'classifier' | 'comment' | 'composite' | 'conjugate' | 'conjugates' | 'conjugation' | 'connector' + | 'const' | 'crosses' | 'datatype' | 'default' | 'dependency' | 'derived' | 'differences' | 'disjoining' | 'disjoint' + | 'doc' | 'else' | 'end' | 'expr' | 'false' | 'feature' | 'featured' | 'featuring' | 'filter' | 'first' | 'flow' + | 'for' | 'from' | 'function' | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'inout' | 'interaction' + | 'intersects' | 'inv' | 'inverse' | 'inverting' | 'istype' | 'language' | 'library' | 'locale' | 'member' | 'meta' + | 'metaclass' | 'metadata' | 'multiplicity' | 'namespace' | 'nonunique' | 'not' | 'null' | 'of' | 'or' | 'ordered' + | 'out' | 'package' | 'portion' | 'predicate' | 'private' | 'protected' | 'public' | 'redefines' | 'redefinition' + | 'references' | 'rep' | 'return' | 'specialization' | 'specializes' | 'standard' | 'step' | 'struct' + | 'subclassifier' | 'subset' | 'subsets' | 'subtype' | 'succession' | 'then' | 'to' | 'true' | 'type' | 'typed' + | 'typing' | 'unions' | 'var' | 'xor' + +// Clause 8.2.2.7 Symbols + +RESERVED_SYMBOL = + '~' | '}' | '|' | '{' | '^' | ']' | '[' | '@' | '??' | '?' | '>=' | '>' | '=>' | '===' | '==' | '=' | '<=' | '<' + | ';' | ':>>' | ':>' | ':=' | '::>' | '::' | ':' | '/' | '.?' | '..' | '.' | '->' | '-' | ',' | '+' | '**' | '*' | ')' + | '(' | '&' | '%' | '$' | '#' | '!==' | '!=' + +TYPED_BY = ':' | 'typed' 'by' + +SPECIALIZES = ':>' | 'specializes' + +SUBSETS = ':>' | 'subsets' + +REFERENCES = '::>' | 'references' + +CROSSES = '=>' | 'crosses' + +REDEFINES = ':>>' | 'redefines' + +CONJUGATES = '~' | 'conjugates' + +// Clause 8.2.3 Root Concrete Syntax + +// Clause 8.2.3.1 Elements and Relationships Concrete Syntax + +Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? + +RelationshipBody : Relationship = + ';' | '{' RelationshipOwnedElement* '}' + +RelationshipOwnedElement : Relationship = + ownedRelatedElement += OwnedRelatedElement + | ownedRelationship += OwnedAnnotation + +OwnedRelatedElement : Element = + NonFeatureElement | FeatureElement + +// Clause 8.2.3.2 Dependencies Concrete Syntax + +Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' ( Identification? 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* + RelationshipBody + +// Notes: +// 1. PrefixMetadataAnnotation is defined in the Kernel layer (see 8.2.5.12). + +// Clause 8.2.3.3 Annotations Concrete Syntax + +// Clause 8.2.3.3.1 Annotations + +Annotation = + annotatedElement = [QualifiedName] + +OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement + +AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature + +// Notes: +// 1. MetadataFeature is defined in the Kernel layer (see 8.2.5.12). + +// Clause 8.2.3.3.2 Comments and Documentation + +Comment = + ( 'comment' Identification + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +// Notes: +// 1. The text of a lexical REGULAR_COMMENT or PREFIX_COMMENT shall be processed as follows before it is included as the body of a Comment or Documentation: +// • Remove the initial /* and final */ characters. +// • Remove any white space immediately after the initial /*, up to and including the first line terminator (if any). +// • On each subsequent line of the text: +// • Strip initial white space other than line terminators. +// • Then, if the first remaining character is "*", remove it. +// • Then, if the first remaining character is now a space, remove it. +// 2. The body text of a Comment can include markup information (such as HTML), and a conforming tool may display such text as rendered according to the markup. However, marked up "rich text" for a Comment written using the KerML textual concrete syntax shall be stored in the Comment body in plain text including all mark up text, with all line terminators and white space included as entered, other than what is removed according to the rules above. + +// Clause 8.2.3.3.3 Textual Representation + +TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE + body = REGULAR_COMMENT + +// Notes: +// 1. The lexical text of a REGULAR_COMMENT shall be processed as specified in 8.2.3.3.2 for Comments before being included as the body of a TextualRepresentation. +// 2. See also 8.3.2.3.6 on the standard language names recognized for a TextualRepresentation. + +// Clause 8.2.3.4 Namespaces Concrete Syntax + +// Clause 8.2.3.4.1 Namespaces + +RootNamespace : Namespace = + NamespaceBodyElement* + +// (See Note 1) + +Namespace = + ( ownedRelationship += PrefixMetadataMember )* + NamespaceDeclaration NamespaceBody + +// (See Note 2) + +NamespaceDeclaration : Namespace = + 'namespace' Identification + +NamespaceBody : Namespace = + ';' | '{' NamespaceBodyElement* '}' + +NamespaceBodyElement : Namespace = + ownedRelationship += NamespaceMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? + +VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' + +NamespaceMember : OwningMembership = + NonFeatureMember + | NamespaceFeatureMember + +NonFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += MemberElement + +NamespaceFeatureMember : OwningMembership = + MemberPrefix + ownedRelatedElement += FeatureElement + +AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody + +QualifiedName = + ( '$' '::' )? ( NAME '::' )* NAME + +// (See Note 3) + +// Notes: +// 1. A root Namespace is a Namespace that has no owningNamespace (see 8.3.2.4). Every Element other than a root Namespace must be contained, directly or indirectly, within some root Namespace. Therefore, every valid KerML concrete syntax text can be parsed starting from the RootNamespace production. +// 2. PrefixMetadataMember is defined in the Kernel layer (see 8.2.5.12). +// 3. A qualified name is notated as a sequence of segment names separated by "::" punctuation, optionally with the global scope qualifier "$" as an initial segment. An unqualified name can be considered the degenerate case of a qualified name with a single segment name. A qualified name is used in the KerML textual concrete syntax to identify an Element that is being referred to in the representation of another Element. A qualified name used in this way does not appear in the corresponding abstract syntax—instead, the abstract syntax representation contains an actual reference to the identified Element. Name resolution is the process of determining the Element that is identified by a qualified name. The segment names of the qualified name other than the last identify a sequence of nested Namespaces that provide the context for resolving the final segment name (see 8.2.3.5). The notation [QualifiedName] is used in concrete syntax grammar productions to indicate the result of resolving text parsed as a QualifiedName (see also 8.2.1). + +// Clause 8.2.3.4.2 Imports + +Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration RelationshipBody + +ImportDeclaration : Import = + MembershipImport | NamespaceImport + +MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? + +// (See Note 1) + +NamespaceImport = + importedNamespace = [QualifiedName] '::' '*' + ( '::' isRecursive ?= '**' )? + | importedNamespace = FilterPackage + { ownedRelatedElement += importedNamespace } + +FilterPackage : Package = + ownedRelationship += ImportDeclaration + ( ownedRelationship += FilterPackageMember )+ + +FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' + +// Notes: +// 1. The importedMembership of a MembershipImport is the single case in which the Element required from the resolution [QualifiedName] is the actual Membership identified by the QualifedName, not the memberElement of that Membership (see 8.2.3.5). + +// Clause 8.2.3.4.3 Namespace Elements + +MemberElement : Element = + AnnotatingElement | NonFeatureElement + +NonFeatureElement : Element = + Dependency + | Namespace + | Type + | Classifier + | DataType + | Class + | Structure + | Metaclass + | Association + | AssociationStructure + | Interaction + | Behavior + | Function + | Predicate + | Multiplicity + | Package + | LibraryPackage + | Specialization + | Conjugation + | Subclassification + | Disjoining + | FeatureInverting + | FeatureTyping + | Subsetting + | Redefinition + | TypeFeaturing + +FeatureElement : Feature = + Feature + | Step + | Expression + | BooleanExpression + | Invariant + | Connector + | BindingConnector + | Succession + | Flow + | SuccessionFlow + +// Clause 8.2.3.5 Name Resolution + +// Clause 8.2.3.5.1 Name Resolution Overview + +// Clause 8.2.3.5.2 Local and Global Namespaces + +// Clause 8.2.3.5.3 Local and Visible Resolution + +// Clause 8.2.3.5.4 Full Resolution + +// Clause 8.2.4 Core Concrete Syntax + +// Clause 8.2.4.1 Types Concrete Syntax + +// Clause 8.2.4.1.1 Types + +Type = + TypePrefix 'type' + TypeDeclaration TypeBody + +TypePrefix : Type = + ( isAbstract ?= 'abstract' )? + ( ownedRelationship += PrefixMetadataMember )* + +TypeDeclaration : Type = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SpecializationPart | ConjugationPart )+ + TypeRelationshipPart* + +SpecializationPart : Type = + SPECIALIZES ownedRelationship += OwnedSpecialization + ( ',' ownedRelationship += OwnedSpecialization )* + +ConjugationPart : Type = + CONJUGATES ownedRelationship += OwnedConjugation + +TypeRelationshipPart : Type = + DisjoiningPart + | UnioningPart + | IntersectingPart + | DifferencingPart + +DisjoiningPart : Type = + 'disjoint' 'from' ownedRelationship += OwnedDisjoining + ( ',' ownedRelationship += OwnedDisjoining )* + +UnioningPart : Type = + 'unions' ownedRelationship += Unioning + ( ',' ownedRelationship += Unioning )* + +IntersectingPart : Type = + 'intersects' ownedRelationship += Intersecting + ( ',' ownedRelationship += Intersecting )* + +DifferencingPart : Type = + 'differences' ownedRelationship += Differencing + ( ',' ownedRelationship += Differencing )* + +TypeBody : Type = + ';' | '{' TypeBodyElement* '}' + +TypeBodyElement : Type = + ownedRelationship += NonFeatureMember + | ownedRelationship += FeatureMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +// Clause 8.2.4.1.2 Specialization + +Specialization = + ( 'specialization' Identification )? + 'subtype' SpecificType + SPECIALIZES GeneralType + RelationshipBody + +OwnedSpecialization : Specialization = + GeneralType + +SpecificType : Specialization = + specific = [QualifiedName] + | specific += OwnedFeatureChain + { ownedRelatedElement += specific } + +GeneralType : Specialization = + general = [QualifiedName] + | general += OwnedFeatureChain + { ownedRelatedElement += general } + +// Clause 8.2.4.1.3 Conjugation + +Conjugation = + ( 'conjugation' Identification )? + 'conjugate' + ( conjugatedType = [QualifiedName] + | conjugatedType = FeatureChain + { ownedRelatedElement += conjugatedType } + ) + CONJUGATES + ( originalType = [QualifiedName] + | originalType = FeatureChain + { ownedRelatedElement += originalType } + ) + RelationshipBody + +OwnedConjugation : Conjugation = + originalType = [QualifiedName] + | originalType = FeatureChain + { ownedRelatedElement += originalType } + +// Clause 8.2.4.1.4 Disjoining + +Disjoining = + ( 'disjoining' Identification )? + 'disjoint' + ( typeDisjoined = [QualifiedName] + | typeDisjoined = FeatureChain + { ownedRelatedElement += typeDisjoined } + ) + 'from' + ( disjoiningType = [QualifiedName] + | disjoiningType = FeatureChain + { ownedRelatedElement += disjoiningType } + ) + RelationshipBody + +OwnedDisjoining : Disjoining = + disjoiningType = [QualifiedName] + | disjoiningType = FeatureChain + { ownedRelatedElement += disjoiningType } + +// Clause 8.2.4.1.5 Unioning, Intersecting and Differencing + +Unioning = + unioningType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + +Intersecting = + intersectingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + +Differencing = + differencingType = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + +// Clause 8.2.4.1.6 Feature Membership + +FeatureMember : OwningMembership = + TypeFeatureMember + | OwnedFeatureMember + +TypeFeatureMember : OwningMembership = + MemberPrefix 'member' ownedRelatedElement += FeatureElement + +OwnedFeatureMember : FeatureMembership = + MemberPrefix ownedRelatedElement += FeatureElement + +// Clause 8.2.4.2 Classifiers Concrete Syntax + +// Clause 8.2.4.2.1 Classifiers + +Classifier = + TypePrefix 'classifier' + ClassifierDeclaration TypeBody + +ClassifierDeclaration : Classifier = + ( isSufficient ?= 'all' )? Identification + ( ownedRelationship += OwnedMultiplicity )? + ( SuperclassingPart | ConjugationPart )? + TypeRelationshipPart* + +SuperclassingPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* + +// Clause 8.2.4.2.2 Subclassification + +Subclassification = + ( 'specialization' Identification )? + 'subclassifier' subclassifier = [QualifiedName] + SPECIALIZES superclassifier = [QualifiedName] + RelationshipBody + +OwnedSubclassification : Subclassification = + superclassifier = [QualifiedName] + +// Clause 8.2.4.3 Features Concrete Syntax + +// Clause 8.2.4.3.1 Features + +Feature = + ( FeaturePrefix + ( 'feature' | ownedRelationship += PrefixMetadataMember ) + FeatureDeclaration? + | ( EndFeaturePrefix | BasicFeaturePrefix ) + FeatureDeclaration + ) + ValuePart? TypeBody + +// (See Note 1) + +EndFeaturePrefix : Feature = + ( isConstant ?= 'const' { isVariable = true } )? + isEnd ?= 'end' + +BasicFeaturePrefix : Feature = + ( direction = FeatureDirection )? + ( isDerived ?= 'derived' )? + ( isAbstract ?= 'abstract' )? + ( isComposite ?= 'composite' | isPortion ?= 'portion' )? + ( isVariable ?= 'var' | isConstant ?= 'const' { isVariable = true } )? + +FeaturePrefix = + ( EndFeaturePrefix ( ownedRelationship += OwnedCrossFeatureMember )? + | BasicFeaturePrefix + ) + ( ownedRelationship += PrefixMetadataMember )* + +// (See Note 1) + +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature + +OwnedCrossFeature : Feature = + BasicFeaturePrefix FeatureDeclaration + +FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' + +FeatureDeclaration : Feature = + ( isSufficient ?= 'all' )? + ( FeatureIdentification + ( FeatureSpecializationPart | ConjugationPart )? + | FeatureSpecializationPart + | ConjugationPart + ) + FeatureRelationshipPart* + +FeatureIdentification : Feature = + '<' declaredShortName = NAME '>' ( declaredName = NAME )? + | declaredName = NAME + +FeatureRelationshipPart : Feature = + TypeRelationshipPart + | ChainingPart + | InvertingPart + | TypeFeaturingPart + +ChainingPart : Feature = + 'chains' + ( ownedRelationship += OwnedFeatureChaining + | FeatureChain ) + +InvertingPart : Feature = + 'inverse' 'of' ownedRelationship += OwnedFeatureInverting + +TypeFeaturingPart : Feature = + 'featured' 'by' ownedRelationship += OwnedTypeFeaturing + ( ',' ownedTypeFeaturing += OwnedTypeFeaturing )* + +FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* + +MultiplicityPart : Feature = + ownedRelationship += OwnedMultiplicity + | ( ownedRelationship += OwnedMultiplicity )? + ( isOrdered ?= 'ordered' ( {isUnique = false} 'nonunique' )? + | {isUnique = false} 'nonunique' ( isOrdered ?= 'ordered' )? ) + +FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions + +Typings : Feature = + TypedBy ( ',' ownedRelationship += OwnedFeatureTyping )* + +TypedBy : Feature = + TYPED_BY ownedRelationship += OwnedFeatureTyping + +Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* + +Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting + +References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting + +Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting + +Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* + +Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition + +// Notes: +// 1. PrefixMetadataMember is defined in the Kernel layer (see 8.3.4.12). + +// Clause 8.2.4.3.2 Feature Typing + +FeatureTyping = + ( 'specialization' Identification )? + 'typing' typedFeature = [QualifiedName] + TYPED_BY GeneralType + RelationshipBody + +OwnedFeatureTyping : FeatureTyping = + GeneralType + +// Clause 8.2.4.3.3 Subsetting + +Subsetting = + ( 'specialization' Identification )? + 'subset' SpecificType + SUBSETS GeneralType + RelationshipBody + +OwnedSubsetting : Subsetting = + GeneralType + +OwnedReferenceSubsetting : ReferenceSubsetting = + GeneralType + +OwnedCrossSubsetting : CrossSubsetting = + GeneralType + +// Clause 8.2.4.3.4 Redefinition + +Redefinition = + ( 'specialization' Identification )? + 'redefinition' SpecificType + REDEFINES GeneralType + RelationshipBody + +OwnedRedefinition : Redefinition = + GeneralType + +// Clause 8.2.4.3.5 Feature Chaining + +OwnedFeatureChain : Feature = + FeatureChain + +FeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ + +OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] + +// Clause 8.2.4.3.6 Feature Inverting + +FeatureInverting = + ( 'inverting' Identification? )? + 'inverse' + ( featureInverted = [QualifiedName] + | featureInverted = OwnedFeatureChain + { ownedRelatedElement += featureInverted } + ) + 'of' + ( invertingFeature = [QualifiedName] + | ownedRelatedElement += OwnedFeatureChain + { ownedRelatedElement += invertingFeature } + ) + RelationshipBody + +OwnedFeatureInverting : FeatureInverting = + invertingFeature = [QualifiedName] + | invertingFeature = OwnedFeatureChain + { ownedRelatedElement += invertingFeature } + +// Clause 8.2.4.3.7 Type Featuring + +TypeFeaturing = + 'featuring' ( Identification 'of' )? + featureOfType = [QualifiedName] + 'by' featuringType = [QualifiedName] + RelationshipBody + +OwnedTypeFeaturing : TypeFeaturing = + featuringType = [QualifiedName] + +// Clause 8.2.5 Kernel Concrete Syntax + +// Clause 8.2.5.1 Data Types Concrete Syntax + +DataType = + TypePrefix 'datatype' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.2 Classes Concrete Syntax + +Class = + TypePrefix 'class' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.3 Structures Concrete Syntax + +Structure = + TypePrefix 'struct' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.4 Associations Concrete Syntax + +Association = + TypePrefix 'assoc' + ClassifierDeclaration TypeBody + +AssociationStructure = + TypePrefix 'assoc' 'struct' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.5 Connectors Concrete Syntax + +// Clause 8.2.5.5.1 Connectors + +Connector = + FeaturePrefix 'connector' + ( FeatureDeclaration? ValuePart? + | ConnectorDeclaration + ) + TypeBody + +ConnectorDeclaration : Connector = + BinaryConnectorDeclaration | NaryConnectorDeclaration + +BinaryConnectorDeclaration : Connector = + ( FeatureDeclaration? 'from' | isSufficient ?= 'all' 'from'? )? + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember + +NaryConnectorDeclaration : Connector = + FeatureDeclaration? + '(' ownedRelationship += ConnectorEndMember ',' + ownedRelationship += ConnectorEndMember + ( ',' ownedRelationship += ConnectorEndMember )* + ')' + +ConnectorEndMember : EndFeatureMembership = + ownedRelatedElement += ConnectorEnd + +ConnectorEnd : Feature = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity + +OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity + +// Clause 8.2.5.5.2 Binding Connectors + +BindingConnector = + FeaturePrefix 'binding' + BindingConnectorDeclaration TypeBody + +BindingConnectorDeclaration : BindingConnector = + FeatureDeclaration + ( 'of' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? + | ( isSufficient ?= 'all' )? + ( 'of'? ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember )? + +// Clause 8.2.5.5.3 Successions + +Succession = + FeaturePrefix 'succession' + SuccessionDeclaration TypeBody + +SuccessionDeclaration : Succession = + FeatureDeclaration + ( 'first' ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? + | ( s.isSufficient ?= 'all' )? + ( 'first'? ownedRelationship += ConnectorEndMember + 'then' ownedRelationship += ConnectorEndMember )? + +// Clause 8.2.5.6 Behaviors Concrete Syntax + +// Clause 8.2.5.6.1 Behaviors + +Behavior = + TypePrefix 'behavior' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.6.2 Steps + +Step = + FeaturePrefix + 'step' FeatureDeclaration ValuePart? + TypeBody + +// Clause 8.2.5.7 Functions Concrete Syntax + +// Clause 8.2.5.7.1 Functions + +Function = + TypePrefix 'function' + ClassifierDeclaration FunctionBody + +FunctionBody : Type = + ';' | '{' FunctionBodyPart '}' + +FunctionBodyPart : Type = + ( TypeBodyElement + | ownedRelationship += ReturnFeatureMember + )* + ( ownedRelationship += ResultExpressionMember )? + +ReturnFeatureMember : ReturnParameterMembership = + MemberPrefix 'return' + ownedRelatedElement += FeatureElement + +ResultExpressionMember : ResultExpressionMembership = + MemberPrefix + ownedRelatedElement += OwnedExpression + +// Clause 8.2.5.7.2 Expressions + +Expression = + FeaturePrefix + 'expr' FeatureDeclaration ValuePart? + FunctionBody + +// Clause 8.2.5.7.3 Predicates + +Predicate = + TypePrefix 'predicate' + ClassifierDeclaration FunctionBody + +// Clause 8.2.5.7.4 Boolean Expressions and Invariants + +BooleanExpression = + FeaturePrefix + 'bool' FeatureDeclaration ValuePart? + FunctionBody + +Invariant = + FeaturePrefix + 'inv' ( 'true' | isNegated ?= 'false' )? + FeatureDeclaration ValuePart? + FunctionBody + +// Clause 8.2.5.8 Expressions Concrete Syntax + +// Clause 8.2.5.8.1 Operator Expressions + +OwnedExpressionReferenceMember : FeatureMembership = + ownedRelationship += OwnedExpressionReference + +OwnedExpressionReference : FeatureReferenceExpression = + ownedRelationship += OwnedExpressionMember + +OwnedExpressionMember : FeatureMembership = + ownedFeatureMember = OwnedExpression + +OwnedExpression : Expression = + ConditionalExpression + | ConditionalBinaryOperatorExpression + | BinaryOperatorExpression + | UnaryOperatorExpression + | ClassificationExpression + | MetaclassificationExpression + | ExtentExpression + | PrimaryExpression + +ConditionalExpression : OperatorExpression = + operator = 'if' + ownedRelationship += ArgumentMember '?' + ownedRelationship += ArgumentExpressionMember 'else' + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember + +ConditionalBinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = ConditionalBinaryOperator + ownedRelationship += ArgumentExpressionMember + ownedRelationship += EmptyResultMember + +ConditionalBinaryOperator = + '??' | 'or' | 'and' | 'implies' + +BinaryOperatorExpression : OperatorExpression = + ownedRelationship += ArgumentMember + operator = BinaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember + +BinaryOperator = + '|' | '&' | 'xor' | '..' + | '==' | '!=' | '===' | '!==' + | '<' | '>' | '<=' | '>=' + | '+' | '-' | '*' | '/' + | '%' | '^' | '**' + +UnaryOperatorExpression : OperatorExpression = + operator = UnaryOperator + ownedRelationship += ArgumentMember + ownedRelationship += EmptyResultMember + +UnaryOperator = + '+' | '-' | '~' | 'not' + +ClassificationExpression : OperatorExpression = + ( ownedRelationship += ArgumentMember )? + ( operator = ClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = CastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember + +ClassificationTestOperator = + 'istype' | 'hastype' | '@' + +CastOperator = + 'as' + +MetaclassificationExpression : OperatorExpression = + ownedRelationship += MetadataArgumentMember + ( operator = ClassificationTestOperator + ownedRelationship += TypeReferenceMember + | operator = MetaCastOperator + ownedRelationship += TypeResultMember + ) + ownedRelationship += EmptyResultMember + +ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument + +Argument : Feature = + ownedRelationship += ArgumentValue + +ArgumentValue : FeatureValue = + value = OwnedExpression + +ArgumentExpressionMember : FeatureMembership = + ownedRelatedElement += ArgumentExpression + +ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue + +ArgumentExpressionValue : FeatureValue = + value = OwnedExpressionReference + +MetadataArgumentMember : ParameterMembership = + ownedRelatedElement += MetadataArgument + +MetadataArgument : Feature = + ownedRelationship += MetadataValue + +MetadataValue : FeatureValue = + value = MetadataReference + +MetadataReference : MetadataAccessExpression = + ownedRelationship += ElementReferenceMember + +MetaclassificationTestOperator = + '@@' + +MetaCastOperator = + 'meta' + +ExtentExpression : OperatorExpression = + operator = 'all' + ownedRelationship += TypeReferenceMember + +TypeReferenceMember : ParameterMembership = + ownedMemberFeature = TypeReference + +TypeResultMember : ResultParameterMembership = + ownedMemberFeature = TypeReference + +TypeReference : Feature = + ownedRelationship += ReferenceTyping + +ReferenceTyping : FeatureTyping = + type = [QualifiedName] + +EmptyResultMember : ReturnParameterMembership = + ownedRelatedElement += EmptyFeature + +EmptyFeature : Feature = + { } + +// Notes: +// 1. OperatorExpressions provide a shorthand notation for InvocationExpressions that invoke a library Function represented as an operator symbol. Table 5 shows the mapping from operator symbols to the Functions they represent from the Kernel Model Library (see Clause 9). An OperatorExpression contains subexpressions called its operands that generally correspond to the argument Expressions of the OperatorExpression, except in the case of operators representing control Functions, in which case the evaluation of certain operands is as determined by the Function (see 8.4.4.9 for details). +// 2. Though not directly expressed in the syntactic productions given above, in any OperatorExpression containing nested OperatorExpressions, the nested OperatorExpressions shall be implicitly grouped according to the precedence of the operators involved, as given in Table 6. OperatorExpressions with higher precedence operators shall be grouped more tightly than those with lower precedence operators. Further, all BinaryOperators other than exponentiation are left-associative (i.e, they group to the left), while the exponentiation operators (^ and **) are right-associative (i.e., they group to the right). +// 3. The unary operator symbol ~ maps to the library Function DataFunctions::'~', as shown in Table 5. This abstract Function may be given a concrete definition in a domain-specific Function library, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used. + +// Clause 8.2.5.8.2 Primary Expressions + +PrimaryExpression : Expression = + FeatureChainExpression + | NonFeatureChainPrimaryExpression + +PrimaryArgumentValue : FeatureValue = + value = PrimaryExpression + +PrimaryArgument : Feature = + ownedRelationship += PrimaryArgumentValue + +PrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument + +NonFeatureChainPrimaryExpression : Expression = + BracketExpression + | IndexExpression + | SequenceExpression + | SelectExpression + | CollectExpression + | FunctionOperationExpression + | BaseExpression + +NonFeatureChainPrimaryArgumentValue : FeatureValue = + value = NonFeatureChainPrimaryExpression + +NonFeatureChainPrimaryArgument : Feature = + ownedRelationship += NonFeatureChainPrimaryArgumentValue + +NonFeatureChainPrimaryArgumentMember : ParameterMembership = + ownedMemberParameter = PrimaryArgument + +BracketExpression : OperatorExpression = + ownedRelationship += PrimaryArgumentMember + operator = '[' + ownedRelationship += SequenceExpressionListMember ']' + +IndexExpression = + ownedRelationship += PrimaryArgumentMember '#' + '(' ownedRelationship += SequenceExpressionListMember ')' + +SequenceExpression : Expression = + '(' SequenceExpressionList ')' + +SequenceExpressionList : Expression = + OwnedExpression ','? | SequenceOperatorExpression + +SequenceOperatorExpression : OperatorExpression = + ownedRelationship += OwnedExpressionMember + operator = ',' + ownedRelationship += SequenceExpressionListMember + +SequenceExpressionListMember : FeatureMembership = + ownedMemberFeature = SequenceExpressionList + +FeatureChainExpression = + ownedRelationship += NonFeatureChainPrimaryArgumentMember '.' + ownedRelationship += FeatureChainMember + +CollectExpression = + ownedRelationship += PrimaryArgumentMember '.' + ownedRelationship += BodyArgumentMember + +SelectExpression = + ownedRelationship += PrimaryArgumentMember '.?' + ownedRelationship += BodyArgumentMember + +FunctionOperationExpression : InvocationExpression = + ownedRelationship += PrimaryArgumentMember '->' + ownedRelationship += InvocationTypeMember + ( ownedRelationship += BodyArgumentMember + | ownedRelationship += FunctionReferenceArgumentMember + | ArgumentList ) + ownedRelationship += EmptyResultMember + +BodyArgumentMember : ParameterMembership = + ownedMemberParameter = BodyArgument + +BodyArgument : Feature = + ownedRelationship += BodyArgumentValue + +BodyArgumentValue : FeatureValue = + value = BodyExpression + +FunctionReferenceArgumentMember : ParameterMembership = + ownedMemberParameter = FunctionReferenceArgument + +FunctionReferenceArgument : Feature = + ownedRelationship += FunctionReferenceArgumentValue + +FunctionReferenceArgumentValue : FeatureValue = + value = FunctionReferenceExpression + +FunctionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FunctionReferenceMember + +FunctionReferenceMember : FeatureMembership = + ownedMemberFeature = FunctionReference + +FunctionReference : Expression = + ownedRelationship += ReferenceTyping + +FeatureChainMember : Membership = + FeatureReferenceMember + | OwnedFeatureChainMember + +OwnedFeatureChainMember : OwningMembership = + ownedMemberElement = FeatureChain + +// Notes: +// 1. Primary expressions provide additional shorthand notations for certain kinds of InvocationExpressions. For those cases in which the InvocationExpression is an OperatorExpression, its operator shall be resolved to the appropriate library function as given in Table 7. Note also that, for a CollectionExpression or SelectExpression, the abstract syntax constrains the operator to be collect and select, respectively, separately from the . and .? symbols used in their concrete syntax notation (see 8.3.4.8.2 and 8.3.4.8.18). +// 2. The grammar allows a bracket syntax [...]that parses to an invocation of the library Function BaseFunctions::'[', as shown in Table 7. This notation is available for use with domain-specific library models that given a concrete definition to the abstract base '[' Function, but no default definition is provided in the Kernel Functions Library. If no domain-specific definition is available, a tool should give a warning if this operator is used. + +// Clause 8.2.5.8.3 Base Expressions + +BaseExpression : Expression = + NullExpression + | LiteralExpression + | FeatureReferenceExpression + | MetadataAccessExpression + | InvocationExpression + | ConstructorExpression + | BodyExpression + +NullExpression : NullExpression = + 'null' | '(' ')' + +FeatureReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureReferenceMember + ownedRelationship += EmptyResultMember + +FeatureReferenceMember : Membership = + memberElement = FeatureReference + +FeatureReference : Feature = + [QualifiedName] + +MetadataAccessExpression = + ownedRelationship += ElementReferenceMember '.' 'metadata' + +ElementReferenceMember : Membership = + memberElement = [QualifiedName] + +InvocationExpression : InvocationExpression = + ownedRelationship += InstantiatedTypeMember + ArgumentList + ownedRelationship += EmptyResultMember + +ConstructorExpression = + 'new' ownedRelationship += InstantiatedTypeMember + ownedRelationship += ConstructorResultMember + +ConstructorResultMember : ReturnParameterMembership = + ownedRelatedElement += ConstructorResult + +ConstructorResult : Feature = + ArgumentList + +InstantiatedTypeMember : Membership = + memberElement = InstantiatedTypeReference + | OwnedFeatureChainMember + +InstantiatedTypeReference : Type = + [QualifiedName] + +ArgumentList : Feature = + '(' ( PositionalArgumentList | NamedArgumentList )? ')' + +PositionalArgumentList : Feature = + e.ownedRelationship += ArgumentMember + ( ',' e.ownedRelationship += ArgumentMember )* + +NamedArgumentList : Feature = + ownedRelationship += NamedArgumentMember + ( ',' ownedRelationship += NamedArgumentMember )* + +NamedArgumentMember : FeatureMembership = + ownedMemberFeature = NamedArgument + +NamedArgument : Feature = + ownedRelationship += ParameterRedefinition '=' + ownedRelationship += ArgumentValue + +ParameterRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + +BodyExpression : FeatureReferenceExpression = + ownedRelationship += ExpressionBodyMember + +ExpressionBodyMember : FeatureMembership = + ownedMemberFeature = ExpressionBody + +ExpressionBody : Expression = + '{' FunctionBodyPart '}' + +// Clause 8.2.5.8.4 Literal Expressions + +LiteralExpression = + LiteralBoolean + | LiteralString + | LiteralInteger + | LiteralReal + | LiteralInfinity + +LiteralBoolean = + value = BooleanValue + +BooleanValue : Boolean = + 'true' | 'false' + +LiteralString = + value = STRING_VALUE + +LiteralInteger = + value = DECIMAL_VALUE + +LiteralReal = + value = RealValue + +RealValue : Real = + DECIMAL_VALUE? '.' ( DECIMAL_VALUE | EXPONENTIAL_VALUE ) + | EXPONENTIAL_VALUE + +LiteralInfinity = + '*' + +// Clause 8.2.5.9 Interactions Concrete Syntax + +// Clause 8.2.5.9.1 Interactions + +Interaction = + TypePrefix 'interaction' + ClassifierDeclaration TypeBody + +// Clause 8.2.5.9.2 Flows + +Flow = + FeaturePrefix 'flow' + FlowDeclaration TypeBody + +SuccessionFlow = + FeaturePrefix 'succession' 'flow' + FlowDeclaration TypeBody + +FlowDeclaration : Flow = + FeatureDeclaration ValuePart? + ( 'of' ownedRelationship += PayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ( isSufficient ?= 'all' )? + ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember + +PayloadFeatureMember : FeatureMembership = + ownedRelatedElement = PayloadFeature + +PayloadFeature = + Identification PayloadFeatureSpecializationPart ValuePart? + | Identification ValuePart + | ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ( ownedRelationship += OwnedFeatureTyping )? + +PayloadFeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ + +FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd + +FlowEnd = + ( ownedRelationship += OwnedReferenceSubsetting '.' )? + ownedRelationship += FlowFeatureMember + +FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature + +FlowFeature : Feature = + ownedRelationship += FlowFeatureRedefinition + +// (See Note 1) + +FlowFeatureRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + +// Notes: +// 1. To ensure that an FlowFeature passes the validateRedefinitionDirectionConformance constraint (see 8.3.3.3.8), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature) + +// Clause 8.2.5.10 Feature Values Concrete Syntax + +ValuePart : Feature = + ownedRelationship += FeatureValue + +FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression + +// Clause 8.2.5.11 Multiplicities Concrete Syntax + +Multiplicity = + MultiplicitySubset | MultiplicityRange + +MultiplicitySubset : Multiplicity = + 'multiplicity' Identification Subsets + TypeBody + +MultiplicityRange = + 'multiplicity' Identification MultiplicityBounds + TypeBody + +OwnedMultiplicity : OwningMembership = + ownedRelatedElement += OwnedMultiplicityRange + +OwnedMultiplicityRange : MultiplicityRange = + MultiplicityBounds + +MultiplicityBounds : MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' + +MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) + +// Clause 8.2.5.12 Metadata Concrete Syntax + +Metaclass = + TypePrefix 'metaclass' + ClassifierDeclaration TypeBody + +PrefixMetadataAnnotation : Annotation = + '#' ownedRelatedElement += PrefixMetadataFeature + +PrefixMetadataMember : OwningMembership = + '#' ownedRelatedElement += PrefixMetadataFeature + +PrefixMetadataFeature : MetadataFeature = + ownedRelationship += OwnedFeatureTyping + +MetadataFeature = + ( ownedRelationship += PrefixMetadataMember )* + ( '@' | 'metadata' ) + MetadataFeatureDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody + +MetadataFeatureDeclaration : MetadataFeature = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping + +MetadataBody : Feature = + ';' | '{' ( ownedRelationship += MetadataBodyElement )* '}' + +MetadataBodyElement : Membership = + NonFeatureMember + | MetadataBodyFeatureMember + | AliasMember + | Import + +MetadataBodyFeatureMember : FeatureMembership = + ownedMemberFeature = MetadataBodyFeature + +MetadataBodyFeature : Feature = + 'feature'? ( ':>>' | 'redefines')? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody + +// Clause 8.2.5.13 Packages Concrete Syntax + +Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +PackageDeclaration : Package = + 'package' Identification + +PackageBody : Package = + ';' + | '{' ( NamespaceBodyElement + | ownedRelationship += ElementFilterMember + )* + '}' + +ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' condition = OwnedExpression ';' + +// End of BNF + + diff --git a/Resources/SysML-textual-bnf.kebnf b/Resources/SysML-textual-bnf.kebnf new file mode 100644 index 00000000..e5c771e9 --- /dev/null +++ b/Resources/SysML-textual-bnf.kebnf @@ -0,0 +1,1705 @@ +// Manual corrections by HP de Koning + +// Part 2 - Systems Modeling Language (SysML) + +// Clause 8.2.2 Textual Notation + +// Clause 8.2.2.1 Textual Notation Overview + +// Clause 8.2.2.1.1 EBNF Conventions + +// Clause 8.2.2.1.2 Lexical Structure + +RESERVED_KEYWORD = + 'about' | 'abstract' | 'accept' | 'action' | 'actor' | 'after' | 'alias' | 'all' | 'allocate' | 'allocation' + | 'analysis' | 'and' | 'as' | 'assert' | 'assign' | 'assume' | 'at' | 'attribute' | 'bind' | 'binding' | 'by' | 'calc' + | 'case' | 'comment' | 'concern' | 'connect' | 'connection' | 'constant' | 'constraint' | 'crosses' | 'decide' + | 'def' | 'default' | 'defined' | 'dependency' | 'derived' | 'do' | 'doc' | 'else' | 'end' | 'entry' | 'enum' + | 'event' | 'exhibit' | 'exit' | 'expose' | 'false' | 'filter' | 'first' | 'flow' | 'for' | 'fork' | 'frame' | 'from' + | 'hastype' | 'if' | 'implies' | 'import' | 'in' | 'include' | 'individual' | 'inout' | 'interface' | 'istype' + | 'item' | 'join' | 'language' | 'library' | 'locale' | 'loop' | 'merge' | 'message' | 'meta' | 'metadata' + | 'nonunique' | 'not' | 'null' | 'objective' | 'occurrence' | 'of' | 'or' | 'ordered' | 'out' | 'package' | 'parallel' + | 'part' | 'perform' | 'port' | 'private' | 'protected' | 'public' | 'redefines' | 'ref' | 'references' | 'render' + | 'rendering' | 'rep' | 'require' | 'requirement' | 'return' | 'satisfy' | 'send' | 'snapshot' | 'specializes' + | 'stakeholder' | 'standard' | 'state' | 'subject' | 'subsets' | 'succession' | 'terminate' | 'then' | 'timeslice' + | 'to' | 'transition' | 'true' | 'until' | 'use' | 'variant' | 'variation' | 'verification' | 'verify' | 'via' + | 'view' | 'viewpoint' | 'when' | 'while' | 'xor' + +DEFINED_BY = ':' | 'defined' 'by' + +SPECIALIZES = ':>' | 'specializes' + +SUBSETS = ':>' | 'subsets' + +REFERENCES = '::>' | 'references' + +CROSSES = '=>' | 'crosses' + +REDEFINES = ':>>' | 'redefines' + +// Clause 8.2.2.2 Elements and Relationships Textual Notation + +Identification : Element = + ( '<' declaredShortName = NAME '>' )? + ( declaredName = NAME )? + +RelationshipBody : Relationship = + ';' | '{' ( ownedRelationship += OwnedAnnotation )* '}' + +// Clause 8.2.2.3 Dependencies Textual Notation + +Dependency = + ( ownedRelationship += PrefixMetadataAnnotation )* + 'dependency' DependencyDeclaration + RelationshipBody + +DependencyDeclaration = + ( Identification 'from' )? + client += [QualifiedName] ( ',' client += [QualifiedName] )* 'to' + supplier += [QualifiedName] ( ',' supplier += [QualifiedName] )* + +// Clause 8.2.2.4 Annotations Textual Notation + +// Clause 8.2.2.4.1 Annotations + +Annotation = + annotatedElement = [QualifiedName] + +OwnedAnnotation : Annotation = + ownedRelatedElement += AnnotatingElement + +AnnotatingMember : OwningMembership = + ownedRelatedElement += AnnotatingElement + +AnnotatingElement = + Comment + | Documentation + | TextualRepresentation + | MetadataFeature + +// Clause 8.2.2.4.2 Comments and Documentation + +Comment = + ( 'comment' Identification + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + )? + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +Documentation = + 'doc' Identification + ( 'locale' locale = STRING_VALUE )? + body = REGULAR_COMMENT + +// Clause 8.2.2.4.3 Textual Representation + +TextualRepresentation = + ( 'rep' Identification )? + 'language' language = STRING_VALUE body = REGULAR_COMMENT + +// Clause 8.2.2.5 Namespaces and Packages Textual Notation + +// Clause 8.2.2.5.1 Packages + +RootNamespace : Namespace = + PackageBodyElement* + +Package = + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +LibraryPackage = + ( isStandard ?= 'standard' ) 'library' + ( ownedRelationship += PrefixMetadataMember )* + PackageDeclaration PackageBody + +PackageDeclaration : Package = + 'package' Identification + +PackageBody : Package = + ';' | '{' PackageBodyElement* '}' + +PackageBodyElement : Package = + ownedRelationship += PackageMember + | ownedRelationship += ElementFilterMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +MemberPrefix : Membership = + ( visibility = VisibilityIndicator )? + +PackageMember : OwningMembership = + MemberPrefix + ( ownedRelatedElement += DefinitionElement + | ownedRelatedElement = UsageElement ) + +ElementFilterMember : ElementFilterMembership = + MemberPrefix + 'filter' ownedRelatedElement += OwnedExpression ';' + +AliasMember : Membership = + MemberPrefix + 'alias' ( '<' memberShortName = NAME '>' )? + ( memberName = NAME )? + 'for' memberElement = [QualifiedName] + RelationshipBody + +Import = + visibility = VisibilityIndicator + 'import' ( isImportAll ?= 'all' )? + ImportDeclaration + RelationshipBody + +ImportDeclaration : Import = + MembershipImport | NamespaceImport + +MembershipImport = + importedMembership = [QualifiedName] + ( '::' isRecursive ?= '**' )? + +NamespaceImport = + importedNamespace = [QualifiedName] '::' '*' + ( '::' isRecursive ?= '**' )? + | importedNamespace = FilterPackage + { ownedRelatedElement += importedNamespace } + +FilterPackage : Package = + ownedRelationship += FilterPackageImport + ( ownedRelationship += FilterPackageMember )+ + +FilterPackageMember : ElementFilterMembership = + '[' ownedRelatedElement += OwnedExpression ']' + +VisibilityIndicator : VisibilityKind = + 'public' | 'private' | 'protected' + +// Clause 8.2.2.5.2 Package Elements + +DefinitionElement : Element = + Package + | LibraryPackage + | AnnotatingElement + | Dependency + | AttributeDefinition + | EnumerationDefinition + | OccurrenceDefinition + | IndividualDefinition + | ItemDefinition + | PartDefinition + | ConnectionDefinition + | FlowDefinition + | InterfaceDefinition + | PortDefinition + | ActionDefinition + | CalculationDefinition + | StateDefinition + | ConstraintDefinition + | RequirementDefinition + | ConcernDefinition + | CaseDefinition + | AnalysisCaseDefinition + | VerificationCaseDefinition + | UseCaseDefinition + | ViewDefinition + | ViewpointDefinition + | RenderingDefinition + | MetadataDefinition + | ExtendedDefinition + +UsageElement : Usage = + NonOccurrenceUsageElement + | OccurrenceUsageElement + +// Clause 8.2.2.6 Definition and Usage Textual Notation + +// Clause 8.2.2.6.1 Definitions + +BasicDefinitionPrefix = + isAbstract ?= 'abstract' | isVariation ?= 'variation' + +DefinitionExtensionKeyword : Definition = + ownedRelationship += PrefixMetadataMember + +DefinitionPrefix : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword* + +Definition = + DefinitionDeclaration DefinitionBody + +DefinitionDeclaration : Definition = + Identification SubclassificationPart? + +DefinitionBody : Type = + ';' | '{' DefinitionBodyItem* '}' + +DefinitionBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += OccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +DefinitionMember : OwningMembership = + MemberPrefix + ownedRelatedElement += DefinitionElement + +VariantUsageMember : VariantMembership = + MemberPrefix 'variant' + ownedVariantUsage = VariantUsageElement + +NonOccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += NonOccurrenceUsageElement + +OccurrenceUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += OccurrenceUsageElement + +StructureUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += StructureUsageElement + +BehaviorUsageMember : FeatureMembership = + MemberPrefix + ownedRelatedElement += BehaviorUsageElement + +// Clause 8.2.2.6.2 Usages + +FeatureDirection : FeatureDirectionKind = + 'in' | 'out' | 'inout' + +RefPrefix : Usage = + ( direction = FeatureDirection )? + ( isDerived ?= 'derived' )? + ( isAbstract ?= 'abstract' | isVariation ?= 'variation' )? + ( isConstant ?= 'constant' )? + +BasicUsagePrefix : Usage = + RefPrefix + ( isReference ?= 'ref' )? + +EndUsagePrefix : Usage = + isEnd ?= 'end' ( ownedRelationship += OwnedCrossFeatureMember )? + +// (See Note 1) + +OwnedCrossFeatureMember : OwningMembership = + ownedRelatedElement += OwnedCrossFeature + +OwnedCrossFeature : ReferenceUsage = + BasicUsagePrefix UsageDeclaration + +UsageExtensionKeyword : Usage = + ownedRelationship += PrefixMetadataMember + +UnextendedUsagePrefix : Usage = + EndUsagePrefix | BasicUsagePrefix + +UsagePrefix : Usage = + UnextendedUsagePrefix UsageExtensionKeyword* + +Usage = + UsageDeclaration UsageCompletion + +UsageDeclaration : Usage = + Identification FeatureSpecializationPart? + +UsageCompletion : Usage = + ValuePart? UsageBody + +UsageBody : Usage = + DefinitionBody + +ValuePart : Feature = + ownedRelationship += FeatureValue + +FeatureValue = + ( '=' + | isInitial ?= ':=' + | isDefault ?= 'default' ( '=' | isInitial ?= ':=' )? + ) + ownedRelatedElement += OwnedExpression + +// Notes: +// 1. A Usage parsed with isEnd = true for which mayTimeVary = true must also have isConstant set to true, even though this is not explicitly notated in the textual notation, in order to satisfy the KerML constraint checkFeatureEndIsConstant. + +// Clause 8.2.2.6.3 Reference Usages + +DefaultReferenceUsage : ReferenceUsage = + RefPrefix Usage + +ReferenceUsage = + ( EndUsagePrefix | RefPrefix ) + 'ref' Usage + +VariantReference : ReferenceUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* UsageBody + +// Clause 8.2.2.6.4 Body Elements + +NonOccurrenceUsageElement : Usage = + DefaultReferenceUsage + | ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | ExtendedUsage + +OccurrenceUsageElement : Usage = + StructureUsageElement | BehaviorUsageElement + +StructureUsageElement : Usage = + OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage + +BehaviorUsageElement : Usage = + ActionUsage + | CalculationUsage + | StateUsage + | ConstraintUsage + | RequirementUsage + | ConcernUsage + | CaseUsage + | AnalysisCaseUsage + | VerificationCaseUsage + | UseCaseUsage + | ViewpointUsage + | PerformActionUsage + | ExhibitStateUsage + | IncludeUseCaseUsage + | AssertConstraintUsage + | SatisfyRequirementUsage + +VariantUsageElement : Usage = + VariantReference + | ReferenceUsage + | AttributeUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + | OccurrenceUsage + | IndividualUsage + | PortionUsage + | EventOccurrenceUsage + | ItemUsage + | PartUsage + | ViewUsage + | RenderingUsage + | PortUsage + | ConnectionUsage + | InterfaceUsage + | AllocationUsage + | Message + | FlowUsage + | SuccessionFlowUsage + | BehaviorUsageElement + +// Clause 8.2.2.6.5 Specialization + +SubclassificationPart : Classifier = + SPECIALIZES ownedRelationship += OwnedSubclassification + ( ',' ownedRelationship += OwnedSubclassification )* + +OwnedSubclassification : Subclassification = + superClassifier = [QualifiedName] + +FeatureSpecializationPart : Feature = + FeatureSpecialization+ MultiplicityPart? FeatureSpecialization* + | MultiplicityPart FeatureSpecialization* + +FeatureSpecialization : Feature = + Typings | Subsettings | References | Crosses | Redefinitions + +Typings : Feature = + TypedBy ( ',' ownedRelationship += FeatureTyping )* + +TypedBy : Feature = + DEFINED_BY ownedRelationship += FeatureTyping + +FeatureTyping = + OwnedFeatureTyping | ConjugatedPortTyping + +OwnedFeatureTyping : FeatureTyping = + type = [QualifiedName] + | type = OwnedFeatureChain + { ownedRelatedElement += type } + +Subsettings : Feature = + Subsets ( ',' ownedRelationship += OwnedSubsetting )* + +Subsets : Feature = + SUBSETS ownedRelationship += OwnedSubsetting + +OwnedSubsetting : Subsetting = + subsettedFeature = [QualifiedName] + | subsettedFeature = OwnedFeatureChain + { ownedRelatedElement += subsettedFeature } + +References : Feature = + REFERENCES ownedRelationship += OwnedReferenceSubsetting + +OwnedReferenceSubsetting : ReferenceSubsetting = + referencedFeature = [QualifiedName] + | referencedFeature = OwnedFeatureChain + { ownedRelatedElement += referenceFeature } + +Crosses : Feature = + CROSSES ownedRelationship += OwnedCrossSubsetting + +OwnedCrossSubsetting : CrossSubsetting = + crossedFeature = [QualifiedName] + | crossedFeature = OwnedFeatureChain + { ownedRelatedElement += crossedFeature } + +Redefinitions : Feature = + Redefines ( ',' ownedRelationship += OwnedRedefinition )* + +Redefines : Feature = + REDEFINES ownedRelationship += OwnedRedefinition + +OwnedRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + | redefinedFeature = OwnedFeatureChain + { ownedRelatedElement += redefinedFeature } + +OwnedFeatureChain : Feature = + ownedRelationship += OwnedFeatureChaining + ( '.' ownedRelationship += OwnedFeatureChaining )+ + +OwnedFeatureChaining : FeatureChaining = + chainingFeature = [QualifiedName] + +// Clause 8.2.2.6.6 Multiplicity + +MultiplicityPart : Feature = + ownedRelationship += OwnedMultiplicity + | ( ownedRelationship += OwnedMultiplicity )? + ( isOrdered ?= 'ordered' ( { isUnique = false } 'nonunique' )? + | { isUnique = false } 'nonunique' ( isOrdered ?= 'ordered' )? ) + +OwnedMultiplicity : OwningMembership = + ownedRelatedElement += MultiplicityRange + +MultiplicityRange = + '[' ( ownedRelationship += MultiplicityExpressionMember '..' )? + ownedRelationship += MultiplicityExpressionMember ']' + +MultiplicityExpressionMember : OwningMembership = + ownedRelatedElement += ( LiteralExpression | FeatureReferenceExpression ) + +// Clause 8.2.2.7 Attributes Textual Notation + +AttributeDefinition : AttributeDefinition = + DefinitionPrefix 'attribute' 'def' Definition + +AttributeUsage : AttributeUsage = + UsagePrefix 'attribute' Usage + +// Clause 8.2.2.8 Enumerations Textual Notation + +EnumerationDefinition = + DefinitionExtensionKeyword* + 'enum' 'def' DefinitionDeclaration EnumerationBody + +EnumerationBody : EnumerationDefinition = + ';' + | '{' ( ownedRelationship += AnnotatingMember + | ownedRelationship += EnumerationUsageMember )* + '}' + +EnumerationUsageMember : VariantMembership = + MemberPrefix ownedRelatedElement += EnumeratedValue + +EnumeratedValue : EnumerationUsage = + 'enum'? Usage + +EnumerationUsage : EnumerationUsage = + UsagePrefix 'enum' Usage + +// Clause 8.2.2.9 Occurrences Textual Notation + +// Clause 8.2.2.9.1 Occurrence Definitions + +OccurrenceDefinitionPrefix : OccurrenceDefinition = + BasicDefinitionPrefix? + ( isIndividual ?= 'individual' + ownedRelationship += EmptyMultiplicityMember + )? + DefinitionExtensionKeyword* + +OccurrenceDefinition = + OccurrenceDefinitionPrefix 'occurrence' 'def' Definition + +IndividualDefinition : OccurrenceDefinition = + BasicDefinitionPrefix? isIndividual ?= 'individual' + DefinitionExtensionKeyword* 'def' Definition + ownedRelationship += EmptyMultiplicityMember + +EmptyMultiplicityMember : OwningMembership = + ownedRelatedElement += EmptyMultiplicity + +EmptyMultiplicity : Multiplicity = + { } + +// Clause 8.2.2.9.2 Occurrence Usages + +OccurrenceUsagePrefix : OccurrenceUsage = + BasicUsagePrefix + ( isIndividual ?= 'individual' )? + ( portionKind = PortionKind + { isPortion = true } + )? + UsageExtensionKeyword* + +OccurrenceUsage = + OccurrenceUsagePrefix 'occurrence' Usage + +IndividualUsage : OccurrenceUsage = + BasicUsagePrefix isIndividual ?= 'individual' + UsageExtensionKeyword* Usage + +PortionUsage : OccurrenceUsage = + BasicUsagePrefix ( isIndividual ?= 'individual' )? + portionKind = PortionKind + UsageExtensionKeyword* Usage + { isPortion = true } + +PortionKind = + 'snapshot' | 'timeslice' + +EventOccurrenceUsage = + OccurrenceUsagePrefix 'event' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'occurrence' UsageDeclaration? ) + UsageCompletion + +// Clause 8.2.2.9.3 Occurrence Successions + +SourceSuccessionMember : FeatureMembership = + 'then' ownedRelatedElement += SourceSuccession + +SourceSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember + +SourceEndMember : EndFeatureMembership = + ownedRelatedElement += SourceEnd + +SourceEnd : ReferenceUsage = + ( ownedRelationship += OwnedMultiplicity )? + +// Clause 8.2.2.10 Items Textual Notation + +ItemDefinition = + OccurrenceDefinitionPrefix + 'item' 'def' Definition + +ItemUsage = + OccurrenceUsagePrefix 'item' Usage + +// Clause 8.2.2.11 Parts Textual Notation + +PartDefinition = + OccurrenceDefinitionPrefix 'part' 'def' Definition + +PartUsage = + OccurrenceUsagePrefix 'part' Usage + +// Clause 8.2.2.12 Ports Textual Notation + +PortDefinition = + DefinitionPrefix 'port' 'def' Definition + ownedRelationship += ConjugatedPortDefinitionMember + { conjugatedPortDefinition.ownedPortConjugator. + originalPortDefinition = this } + +// (See Note 1) + +ConjugatedPortDefinitionMember : OwningMembership = + ownedRelatedElement += ConjugatedPortDefinition + +ConjugatedPortDefinition = + ownedRelationship += PortConjugation + +PortConjugation = + {} + +PortUsage = + OccurrenceUsagePrefix 'port' Usage + +ConjugatedPortTyping : ConjugatedPortTyping = + '~' originalPortDefinition = ~[QualifiedName] + +// (See Note 2) + +// Notes: +// 1. Even though it is not explicitly represented in the text, a PortDefinition is always parsed as containing a nested ConjugatedPortDefinition with a PortDefinition Relationship pointing back to the containing PortDefinition. The abstract syntax for ConjugatedPortDefinition sets its effectiveName to the name of its originalPortDefinition with the symbol ~ prepended to it (see 8.3.12.2). (See also 8.4.8.1.) +// 2. The notation ~[QualifiedName] indicates that a QualifiedName shall be parsed from the input text, but that it shall be resolved as if it was the qualified name constructed as follows: +// • Extract the last segment name of the given QualifiedName and prepend the symbol ~ to it. +// • Append the name so constructed to the end of the entire original QualifiedName. +// For example, if the ConjugatedPortTyping is ~A::B::C, then the given QualifiedName is A::B::C, and ~[QualifiedName] is resolved as A::B::C::'~C'. Alternatively, a conforming tool may first resolve the given QualifiedName as usual to a PortDefinition and then use the conjugatedPortDefinition of this PortDefinition as the resolution of ~[QualifiedName]. + +// Clause 8.2.2.13 Connections Textual Notation + +// Clause 8.2.2.13.1 Connection Definition and Usage + +ConnectionDefinition = + OccurrenceDefinitionPrefix 'connection' 'def' Definition + +ConnectionUsage = + OccurrenceUsagePrefix + ( 'connection' UsageDeclaration ValuePart? + ( 'connect' ConnectorPart )? + | 'connect' ConnectorPart ) + UsageBody + +ConnectorPart : ConnectionUsage = + BinaryConnectorPart | NaryConnectorPart + +BinaryConnectorPart : ConnectionUsage = + ownedRelationship += ConnectorEndMember 'to' + ownedRelationship += ConnectorEndMember + +NaryConnectorPart : ConnectionUsage = + '(' ownedRelationship += ConnectorEndMember ',' + ownedRelationship += ConnectorEndMember + ( ',' ownedRelationship += ConnectorEndMember )* ')' + +ConnectorEndMember : EndFeatureMembership = + ownedRelatedElement += ConnectorEnd + +ConnectorEnd : ReferenceUsage = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +OwnedCrossMultiplicityMember : OwningMembership = + ownedRelatedElement += OwnedCrossMultiplicity + +OwnedCrossMultiplicity : Feature = + ownedRelationship += OwnedMultiplicity + +// Clause 8.2.2.13.2 Binding Connectors + +BindingConnectorAsUsage = + UsagePrefix ( 'binding' UsageDeclaration )? + 'bind' ownedRelationship += ConnectorEndMember + '=' ownedRelationship += ConnectorEndMember + UsageBody + +// Clause 8.2.2.13.3 Successions + +SuccessionAsUsage = + UsagePrefix ( 'succession' UsageDeclaration )? + 'first' s.ownedRelationship += ConnectorEndMember + 'then' s.ownedRelationship += ConnectorEndMember + UsageBody + +// Clause 8.2.2.14 Interfaces Textual Notation + +// Clause 8.2.2.14.1 Interface Definitions + +InterfaceDefinition = + OccurrenceDefinitionPrefix 'interface' 'def' + DefinitionDeclaration InterfaceBody + +InterfaceBody : Type = + ';' | '{' InterfaceBodyItem* '}' + +InterfaceBodyItem : Type = + ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += InterfaceNonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += InterfaceOccurrenceUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + +InterfaceNonOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceNonOccurrenceUsageElement + +InterfaceNonOccurrenceUsageElement : Usage = + ReferenceUsage + | AttributeUsage + | EnumerationUsage + | BindingConnectorAsUsage + | SuccessionAsUsage + +InterfaceOccurrenceUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += InterfaceOccurrenceUsageElement + +InterfaceOccurrenceUsageElement : Usage = + DefaultInterfaceEnd | StructureUsageElement | BehaviorUsageElement + +DefaultInterfaceEnd : PortUsage = + isEnd ?= 'end' Usage + +// Clause 8.2.2.14.2 Interface Usages + +InterfaceUsage = + OccurrenceUsagePrefix 'interface' + InterfaceUsageDeclaration InterfaceBody + +InterfaceUsageDeclaration : InterfaceUsage = + UsageDeclaration ValuePart? + ( 'connect' InterfacePart )? + | InterfacePart + +InterfacePart : InterfaceUsage = + BinaryInterfacePart | NaryInterfacePart + +BinaryInterfacePart : InterfaceUsage = + ownedRelationship += InterfaceEndMember 'to' + ownedRelationship += InterfaceEndMember + +NaryInterfacePart : InterfaceUsage = + '(' ownedRelationship += InterfaceEndMember ',' + ownedRelationship += InterfaceEndMember + ( ',' ownedRelationship += InterfaceEndMember )* ')' + +InterfaceEndMember : EndFeatureMembership = + ownedRelatedElement += InterfaceEnd + +InterfaceEnd : PortUsage = + ( ownedRelationship += OwnedCrossMultiplicityMember )? + ( declaredName = NAME REFERENCES )? + ownedRelationship += OwnedReferenceSubsetting + +// Clause 8.2.2.15 Allocations Textual Notation + +AllocationDefinition = + OccurrenceDefinitionPrefix 'allocation' 'def' Definition + +AllocationUsage = + OccurrenceUsagePrefix + AllocationUsageDeclaration UsageBody + +AllocationUsageDeclaration : AllocationUsage = + 'allocation' UsageDeclaration + ( 'allocate' ConnectorPart )? + | 'allocate' ConnectorPart + +// Clause 8.2.2.16 Flows Textual Notation + +FlowDefinition = + OccurrenceDefinitionPrefix 'flow' 'def' Definition + +Message : FlowUsage = + OccurrenceUsagePrefix 'message' + MessageDeclaration DefinitionBody + { isAbstract = true } + +MessageDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += MessageEventMember + 'to' ownedRelationship += MessageEventMember + )? + | ownedRelationship += MessageEventMember 'to' + ownedRelationship += MessageEventMember + +MessageEventMember : ParameterMembership = + ownedRelatedElement += MessageEvent + +MessageEvent : EventOccurrenceUsage = + ownedRelationship += OwnedReferenceSubsetting + +FlowUsage = + OccurrenceUsagePrefix 'flow' + FlowDeclaration DefinitionBody + +SuccessionFlowUsage = + OccurrenceUsagePrefix 'succession' 'flow' + FlowDeclaration DefinitionBody + +FlowDeclaration : FlowUsage = + UsageDeclaration ValuePart? + ( 'of' ownedRelationship += FlowPayloadFeatureMember )? + ( 'from' ownedRelationship += FlowEndMember + 'to' ownedRelationship += FlowEndMember )? + | ownedRelationship += FlowEndMember 'to' + ownedRelationship += FlowEndMember + +FlowPayloadFeatureMember : FeatureMembership = + ownedRelatedElement += FlowPayloadFeature + +FlowPayloadFeature : PayloadFeature = + PayloadFeature + +PayloadFeature : Feature = + Identification? PayloadFeatureSpecializationPart + ValuePart? + | ownedRelationship += OwnedFeatureTyping + ( ownedRelationship += OwnedMultiplicity )? + | ownedRelationship += OwnedMultiplicity + ownedRelationship += OwnedFeatureTyping + +PayloadFeatureSpecializationPart : Feature = + ( FeatureSpecialization )+ MultiplicityPart? + FeatureSpecialization* + | MultiplicityPart FeatureSpecialization+ + +FlowEndMember : EndFeatureMembership = + ownedRelatedElement += FlowEnd + +FlowEnd = + ( ownedRelationship += FlowEndSubsetting )? + ownedRelationship += FlowFeatureMember + +FlowEndSubsetting : ReferenceSubsetting = + referencedFeature = [QualifiedName] + | referencedFeature = FeatureChainPrefix + { ownedRelatedElement += referencedFeature } + +FeatureChainPrefix : Feature = + ( ownedRelationship += OwnedFeatureChaining '.' )+ + ownedRelationship += OwnedFeatureChaining '.' + +FlowFeatureMember : FeatureMembership = + ownedRelatedElement += FlowFeature + +FlowFeature : ReferenceUsage = + ownedRelationship += FlowFeatureRedefinition + +// (See Note 1) + +FlowFeatureRedefinition : Redefinition = + redefinedFeature = [QualifiedName] + +// Notes: +// 1. To ensure that a FlowFeature passes the validateRedefinitionDirectionConformance constraint (see [KerML, 8.3.3.3.8]), its direction must be set to the direction of its redefinedFeature, relative to its owning FlowEnd, that is, the result of the following OCL expression: owningType.directionOf(ownedRedefinition->at(1).redefinedFeature) + +// Clause 8.2.2.17 Actions Textual Notation + +// Clause 8.2.2.17.1 Action Definitions + +ActionDefinition = + OccurrenceDefinitionPrefix 'action' 'def' + DefinitionDeclaration ActionBody + +ActionBody : Type = + ';' | '{' ActionBodyItem* '}' + +ActionBodyItem : Type = + NonBehaviorBodyItem + | ownedRelationship += InitialNodeMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += ActionBehaviorMember + ( ownedRelationship += ActionTargetSuccessionMember )* + | ownedRelationship += GuardedSuccessionMember + +NonBehaviorBodyItem = + ownedRelationship += Import + | ownedRelationship += AliasMember + | ownedRelationship += DefinitionMember + | ownedRelationship += VariantUsageMember + | ownedRelationship += NonOccurrenceUsageMember + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += StructureUsageMember + +ActionBehaviorMember : FeatureMembership = + BehaviorUsageMember | ActionNodeMember + +InitialNodeMember : FeatureMembership = + MemberPrefix 'first' memberFeature = [QualifiedName] + RelationshipBody + +ActionNodeMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionNode + +ActionTargetSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += ActionTargetSuccession + +GuardedSuccessionMember : FeatureMembership = + MemberPrefix ownedRelatedElement += GuardedSuccession + +// Clause 8.2.2.17.2 Action Usages + +ActionUsage = + OccurrenceUsagePrefix 'action' + ActionUsageDeclaration ActionBody + +ActionUsageDeclaration : ActionUsage = + UsageDeclaration ValuePart? + +PerformActionUsage = + OccurrenceUsagePrefix 'perform' + PerformActionUsageDeclaration ActionBody + +PerformActionUsageDeclaration : PerformActionUsage = + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'action' UsageDeclaration ) + ValuePart? + +ActionNode : ActionUsage = + ControlNode + | SendNode | AcceptNode + | AssignmentNode + | TerminateNode + | IfNode | WhileLoopNode | ForLoopNode + +ActionNodeUsageDeclaration : ActionUsage = + 'action' UsageDeclaration? + +ActionNodePrefix : ActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? + +// Clause 8.2.2.17.3 Control Nodes + +ControlNode = + MergeNode | DecisionNode | JoinNode| ForkNode + +ControlNodePrefix : OccurrenceUsage = + RefPrefix + ( isIndividual ?= 'individual' )? + ( portionKind = PortionKind + { isPortion = true } + )? + UsageExtensionKeyword* + +MergeNode = + ControlNodePrefix + isComposite ?= 'merge' UsageDeclaration + ActionBody + +DecisionNode = + ControlNodePrefix + isComposite ?= 'decide' UsageDeclaration + ActionBody + +JoinNode = + ControlNodePrefix + isComposite ?= 'join' UsageDeclaration + ActionBody + +ForkNode = + ControlNodePrefix + isComposite ?= 'fork' UsageDeclaration + ActionBody + +// Clause 8.2.2.17.4 Send and Accept Action Usages + +AcceptNode : AcceptActionUsage = + OccurrenceUsagePrefix + AcceptNodeDeclaration ActionBody + +AcceptNodeDeclaration : AcceptActionUsage = + ActionNodeUsageDeclaration? + 'accept' AcceptParameterPart + +AcceptParameterPart : AcceptActionUsage = + ownedRelationship += PayloadParameterMember + ( 'via' ownedRelationship += NodeParameterMember )? + +PayloadParameterMember : ParameterMembership = + ownedRelatedElement += PayloadParameter + +PayloadParameter : ReferenceUsage = + PayloadFeature + | Identification PayloadFeatureSpecializationPart? + TriggerValuePart + +TriggerValuePart : Feature = + ownedRelationship += TriggerFeatureValue + +TriggerFeatureValue : FeatureValue = + ownedRelatedElement += TriggerExpression + +TriggerExpression : TriggerInvocationExpression = + kind = ( 'at' | 'after' ) + ownedRelationship += ArgumentMember + | kind = 'when' + ownedRelationship += ArgumentExpressionMember + +ArgumentMember : ParameterMembership = + ownedMemberParameter = Argument + +Argument : Feature = + ownedRelationship += ArgumentValue + +ArgumentValue : FeatureValue = + value = OwnedExpression + +ArgumentExpressionMember : ParameterMembership = + ownedRelatedElement += ArgumentExpression + +ArgumentExpression : Feature = + ownedRelationship += ArgumentExpressionValue + +ArgumentExpressionValue : FeatureValue = + ownedRelatedElement += OwnedExpressionReference + +SendNode : SendActionUsage = + OccurrenceUsagePrefix ActionUsageDeclaration? 'send' + ( ownedRelationship += NodeParameterMember SenderReceiverPart? + | ownedRelationship += EmptyParameterMember SenderReceiverPart )? + ActionBody + +SendNodeDeclaration : SendActionUsage = + ActionNodeUsageDeclaration? 'send' + ownedRelationship += NodeParameterMember SenderReceiverPart? + +SenderReceiverPart : SendActionUsage = + 'via' ownedRelationship += NodeParameterMember + ( 'to' ownedRelationship += NodeParameterMember )? + | ownedRelationship += EmptyParameterMember + 'to' ownedRelationship += NodeParameterMember + +NodeParameterMember : ParameterMembership = + ownedRelatedElement += NodeParameter + +NodeParameter : ReferenceUsage = + ownedRelationship += FeatureBinding + +FeatureBinding : FeatureValue = + ownedRelatedElement += OwnedExpression + +EmptyParameterMember : ParameterMembership = + ownedRelatedElement += EmptyUsage + +EmptyUsage : ReferenceUsage = + {} + +// Notes: +// 1. The productions for ArgumentMember, Argument, ArgumentValue, ArgumentExpressionMember, ArgumentExpression and ArgumentExpressionValue are the same as given in [KerML, 8.2.5.8.1]. + +// Clause 8.2.2.17.5 Assignment Action Usages + +AssignmentNode : AssignmentActionUsage = + OccurrenceUsagePrefix + AssignmentNodeDeclaration ActionBody + +AssignmentNodeDeclaration: ActionUsage = + ( ActionNodeUsageDeclaration )? 'assign' + ownedRelationship += AssignmentTargetMember + ownedRelationship += FeatureChainMember ':=' + ownedRelationship += NodeParameterMember + +AssignmentTargetMember : ParameterMembership = + ownedRelatedElement += AssignmentTargetParameter + +AssignmentTargetParameter : ReferenceUsage = + ( ownedRelationship += AssignmentTargetBinding '.' )? + +AssignmentTargetBinding : FeatureValue = + ownedRelatedElement += NonFeatureChainPrimaryExpression + +FeatureChainMember : Membership = + memberElement = [QualifiedName] + | OwnedFeatureChainMember + +OwnedFeatureChainMember : OwningMembership = + ownedRelatedElement += OwnedFeatureChain + +// Clause 8.2.2.17.6 Terminate Action Usages + +TerminateNode : TerminateActionUsage = + OccurrenceUsagePrefix ActionNodeUsageDeclaration? + 'terminate' ( ownedRelationship += NodeParameterMember )? + ActionBody + +// Clause 8.2.2.17.7 Structured Control Action Usages + +IfNode : IfActionUsage = + ActionNodePrefix + 'if' ownedRelationship += ExpressionParameterMember + ownedRelationship += ActionBodyParameterMember + ( 'else' ownedRelationship += + ( ActionBodyParameterMember | IfNodeParameterMember ) )? + +ExpressionParameterMember : ParameterMembership = + ownedRelatedElement += OwnedExpression + +ActionBodyParameterMember : ParameterMembership = + ownedRelatedElement += ActionBodyParameter + +ActionBodyParameter : ActionUsage = + ( 'action' UsageDeclaration? )? + '{' ActionBodyItem* '}' + +IfNodeParameterMember : ParameterMembership = + ownedRelatedElement += IfNode + +WhileLoopNode : WhileLoopActionUsage = + ActionNodePrefix + ( 'while' ownedRelationship += ExpressionParameterMember + | 'loop' ownedRelationship += EmptyParameterMember + ) + ownedRelationship += ActionBodyParameterMember + ( 'until' ownedRelationship += ExpressionParameterMember ';' )? + +ForLoopNode : ForLoopActionUsage = + ActionNodePrefix + 'for' ownedRelationship += ForVariableDeclarationMember + 'in' ownedRelationship += NodeParameterMember + ownedRelationship += ActionBodyParameterMember + +ForVariableDeclarationMember : FeatureMembership = + ownedRelatedElement += UsageDeclaration + +ForVariableDeclaration : ReferenceUsage = + UsageDeclaration + +// Clause 8.2.2.17.8 Action Successions + +ActionTargetSuccession : Usage = + ( TargetSuccession | GuardedTargetSuccession | DefaultTargetSuccession ) + UsageBody + +TargetSuccession : SuccessionAsUsage = + ownedRelationship += SourceEndMember + 'then' ownedRelationship += ConnectorEndMember + +GuardedTargetSuccession : TransitionUsage = + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember + +DefaultTargetSuccession : TransitionUsage = + 'else' ownedRelationship += TransitionSuccessionMember + +GuardedSuccession : TransitionUsage = + ( 'succession' UsageDeclaration )? + 'first' ownedRelationship += FeatureChainMember + ownedRelationship += GuardExpressionMember + 'then' ownedRelationship += TransitionSuccessionMember + UsageBody + +// Clause 8.2.2.18 States Textual Notation + +// Clause 8.2.2.18.1 State Definitions + +StateDefinition = + OccurrenceDefinitionPrefix 'state' 'def' + DefinitionDeclaration StateDefBody + +StateDefBody : StateDefinition = + ';' + | ( isParallel ?= 'parallel' )? + '{' StateBodyItem* '}' + +StateBodyItem : Type = + NonBehaviorBodyItem + | ( ownedRelationship += SourceSuccessionMember )? + ownedRelationship += BehaviorUsageMember + ( ownedRelationship += TargetTransitionUsageMember )* + | ownedRelationship += TransitionUsageMember + | ownedRelationship += EntryActionMember + ( ownedRelationship += EntryTransitionMember )* + | ownedRelationship += DoActionMember + | ownedRelationship += ExitActionMember + +EntryActionMember : StateSubactionMembership = + MemberPrefix kind = 'entry' + ownedRelatedElement += StateActionUsage + +DoActionMember : StateSubactionMembership = + MemberPrefix kind = 'do' + ownedRelatedElement += StateActionUsage + +ExitActionMember : StateSubactionMembership = + MemberPrefix kind = 'exit' + ownedRelatedElement += StateActionUsage + +EntryTransitionMember : FeatureMembership = + MemberPrefix + ( ownedRelatedElement += GuardedTargetSuccession + | 'then' ownedRelatedElement += TargetSuccession + ) ';' + +StateActionUsage : ActionUsage = + EmptyActionUsage ';' + | StatePerformActionUsage + | StateAcceptActionUsage + | StateSendActionUsage + | StateAssignmentActionUsage + +EmptyActionUsage : ActionUsage = + {} + +StatePerformActionUsage : PerformActionUsage = + PerformActionUsageDeclaration ActionBody + +StateAcceptActionUsage : AcceptActionUsage = + AcceptNodeDeclaration ActionBody + +StateSendActionUsage : SendActionUsage = + SendNodeDeclaration ActionBody + +StateAssignmentActionUsage : AssignmentActionUsage = + AssignmentNodeDeclaration ActionBody + +TransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TransitionUsage + +TargetTransitionUsageMember : FeatureMembership = + MemberPrefix ownedRelatedElement += TargetTransitionUsage + +// Clause 8.2.2.18.2 State Usages + +StateUsage = + OccurrenceUsagePrefix 'state' + ActionUsageDeclaration StateUsageBody + +StateUsageBody : StateUsage = + ';' + | ( isParallel ?= 'parallel' )? + '{' StateBodyItem* '}' + +ExhibitStateUsage = + OccurrenceUsagePrefix 'exhibit' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'state' UsageDeclaration ) + ValuePart? StateUsageBody + +// Clause 8.2.2.18.3 Transition Usages + +TransitionUsage = + 'transition' ( UsageDeclaration 'first' )? + ownedRelationship += FeatureChainMember + ownedRelationship += EmptyParameterMember + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody + +TargetTransitionUsage : TransitionUsage = + ownedRelationship += EmptyParameterMember + ( 'transition' + ( ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember )? + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += EmptyParameterMember + ownedRelationship += TriggerActionMember + ( ownedRelationship += GuardExpressionMember )? + ( ownedRelationship += EffectBehaviorMember )? + | ownedRelationship += GuardExpressionMember + ( ownedRelationship += EffectBehaviorMember )? + )? + 'then' ownedRelationship += TransitionSuccessionMember + ActionBody + +TriggerActionMember : TransitionFeatureMembership = + 'accept' { kind = 'trigger' } ownedRelatedElement += TriggerAction + +TriggerAction : AcceptActionUsage = + AcceptParameterPart + +GuardExpressionMember : TransitionFeatureMembership = + 'if' { kind = 'guard' } ownedRelatedElement += OwnedExpression + +EffectBehaviorMember : TransitionFeatureMembership = + 'do' { kind = 'effect' } ownedRelatedElement += EffectBehaviorUsage + +EffectBehaviorUsage : ActionUsage = + EmptyActionUsage + | TransitionPerformActionUsage + | TransitionAcceptActionUsage + | TransitionSendActionUsage + | TransitionAssignmentActionUsage + +TransitionPerformActionUsage : PerformActionUsage = + PerformActionUsageDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionAcceptActionUsage : AcceptActionUsage = + AcceptNodeDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionSendActionUsage : SendActionUsage = + SendNodeDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionAssignmentActionUsage : AssignmentActionUsage = + AssignmentNodeDeclaration ( '{' ActionBodyItem* '}' )? + +TransitionSuccessionMember : OwningMembership = + ownedRelatedElement += TransitionSuccession + +TransitionSuccession : Succession = + ownedRelationship += EmptyEndMember + ownedRelationship += ConnectorEndMember + +EmptyEndMember : EndFeatureMembership = + ownedRelatedElement += EmptyFeature + +EmptyFeature : ReferenceUsage = + {} + +// Clause 8.2.2.19 Calculations Textual Notation + +CalculationDefinition = + OccurrenceDefinitionPrefix 'calc' 'def' + DefinitionDeclaration CalculationBody + +CalculationUsage : CalculationUsage = + OccurrenceUsagePrefix 'calc' + ActionUsageDeclaration CalculationBody + +CalculationBody : Type = + ';' | '{' CalculationBodyPart '}' + +CalculationBodyPart : Type = + CalculationBodyItem* + ( ownedRelationship += ResultExpressionMember )? + +CalculationBodyItem : Type = + ActionBodyItem + | ownedRelationship += ReturnParameterMember + +ReturnParameterMember : ReturnParameterMembership = + MemberPrefix? 'return' ownedRelatedElement += UsageElement + +ResultExpressionMember : ResultExpressionMembership = + MemberPrefix? ownedRelatedElement += OwnedExpression + +// Clause 8.2.2.20 Constraints Textual Notation + +ConstraintDefinition = + OccurrenceDefinitionPrefix 'constraint' 'def' + DefinitionDeclaration CalculationBody + +ConstraintUsage = + OccurrenceUsagePrefix 'constraint' + ConstraintUsageDeclaration CalculationBody + +AssertConstraintUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' )? + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'constraint' ConstraintUsageDeclaration ) + CalculationBody + +ConstraintUsageDeclaration : ConstraintUsage = + UsageDeclaration ValuePart? + +// Clause 8.2.2.21 Requirements Textual Notation + +// Clause 8.2.2.21.1 Requirement Definitions + +RequirementDefinition = + OccurrenceDefinitionPrefix 'requirement' 'def' + DefinitionDeclaration RequirementBody + +RequirementBody : Type = + ';' | '{' RequirementBodyItem* '}' + +RequirementBodyItem : Type = + DefinitionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += RequirementConstraintMember + | ownedRelationship += FramedConcernMember + | ownedRelationship += RequirementVerificationMember + | ownedRelationship += ActorMember + | ownedRelationship += StakeholderMember + +SubjectMember : SubjectMembership = + MemberPrefix ownedRelatedElement += SubjectUsage + +SubjectUsage : ReferenceUsage = + 'subject' UsageExtensionKeyword* Usage + +RequirementConstraintMember : RequirementConstraintMembership = + MemberPrefix? RequirementKind + ownedRelatedElement += RequirementConstraintUsage + +RequirementKind : RequirementConstraintMembership = + 'assume' { kind = 'assumption' } + | 'require' { kind = 'requirement' } + +RequirementConstraintUsage : ConstraintUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? RequirementBody + | ( UsageExtensionKeyword* 'constraint' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration CalculationBody + +FramedConcernMember : FramedConcernMembership = + MemberPrefix? 'frame' + ownedRelatedElement += FramedConcernUsage + +FramedConcernUsage : ConcernUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? CalculationBody + | ( UsageExtensionKeyword* 'concern' + | UsageExtensionKeyword+ ) + CalculationUsageDeclaration CalculationBody + +ActorMember : ActorMembership = + MemberPrefix ownedRelatedElement += ActorUsage + +ActorUsage : PartUsage = + 'actor' UsageExtensionKeyword* Usage + +StakeholderMember : StakeholderMembership = + MemberPrefix ownedRelatedElement += StakeholderUsage + +StakeholderUsage : PartUsage = + 'stakeholder' UsageExtensionKeyword* Usage + +// Clause 8.2.2.21.2 Requirement Usages + +RequirementUsage = + OccurrenceUsagePrefix 'requirement' + ConstraintUsageDeclaration RequirementBody + +SatisfyRequirementUsage = + OccurrenceUsagePrefix 'assert' ( isNegated ?= 'not' ) 'satisfy' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'requirement' UsageDeclaration ) + ValuePart? + ( 'by' ownedRelationship += SatisfactionSubjectMember )? + RequirementBody + +SatisfactionSubjectMember : SubjectMembership = + ownedRelatedElement += SatisfactionParameter + +SatisfactionParameter : ReferenceUsage = + ownedRelationship += SatisfactionFeatureValue + +SatisfactionFeatureValue : FeatureValue = + ownedRelatedElement += SatisfactionReferenceExpression + +SatisfactionReferenceExpression : FeatureReferenceExpression = + ownedRelationship += FeatureChainMember + +// Clause 8.2.2.21.3 Concerns + +ConcernDefinition = + OccurrenceDefinitionPrefix 'concern' 'def' + DefinitionDeclaration RequirementBody + +ConcernUsage = + OccurrenceUsagePrefix 'concern' + ConstraintUsageDeclaration RequirementBody + +// Clause 8.2.2.22 Cases Textual Notation + +CaseDefinition = + OccurrenceDefinitionPrefix 'case' 'def' + DefinitionDeclaration CaseBody + +CaseUsage = + OccurrenceUsagePrefix 'case' + ConstraintUsageDeclaration CaseBody + +CaseBody : Type = + ';' + | '{' CaseBodyItem* + ( ownedRelationship += ResultExpressionMember )? + '}' + +CaseBodyItem : Type = + ActionBodyItem + | ownedRelationship += SubjectMember + | ownedRelationship += ActorMember + | ownedRelationship += ObjectiveMember + +ObjectiveMember : ObjectiveMembership = + MemberPrefix 'objective' + ownedRelatedElement += ObjectiveRequirementUsage + +ObjectiveRequirementUsage : RequirementUsage = + UsageExtensionKeyword* ConstraintUsageDeclaration + RequirementBody + +// Clause 8.2.2.23 Analysis Cases Textual Notation + +AnalysisCaseDefinition = + OccurrenceDefinitionPrefix 'analysis' 'def' + DefinitionDeclaration CaseBody + +AnalysisCaseUsage = + OccurrenceUsagePrefix 'analysis' + ConstraintUsageDeclaration CaseBody + +// Clause 8.2.2.24 Verification Cases Textual Notation + +VerificationCaseDefinition = + OccurrenceDefinitionPrefix 'verification' 'def' + DefinitionDeclaration CaseBody + +VerificationCaseUsage = + OccurrenceUsagePrefix 'verification' + ConstraintUsageDeclaration CaseBody + +RequirementVerificationMember : RequirementVerificationMembership = + MemberPrefix 'verify' { kind = 'requirement' } + ownedRelatedElement += RequirementVerificationUsage + +RequirementVerificationUsage : RequirementUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecialization* RequirementBody + | ( UsageExtensionKeyword* 'requirement' + | UsageExtensionKeyword+ ) + ConstraintUsageDeclaration RequirementBody + +// Clause 8.2.2.25 Use Cases Textual Notation + +UseCaseDefinition = + OccurrenceDefinitionPrefix 'use' 'case' 'def' + DefinitionDeclaration CaseBody + +UseCaseUsage = + OccurrenceUsagePrefix 'use' 'case' + ConstraintUsageDeclaration CaseBody + +IncludeUseCaseUsage = + OccurrenceUsagePrefix 'include' + ( ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + | 'use' 'case' UsageDeclaration ) + ValuePart? + CaseBody + +// Clause 8.2.2.26 Views and Viewpoints Textual Notation + +// Clause 8.2.2.26.1 View Definitions + +ViewDefinition = + OccurrenceDefinitionPrefix 'view' 'def' + DefinitionDeclaration ViewDefinitionBody + +ViewDefinitionBody : ViewDefinition = + ';' | '{' ViewDefinitionBodyItem* '}' + +ViewDefinitionBodyItem : ViewDefinition = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember + +ViewRenderingMember : ViewRenderingMembership = + MemberPrefix 'render' + ownedRelatedElement += ViewRenderingUsage + +ViewRenderingUsage : RenderingUsage = + ownedRelationship += OwnedReferenceSubsetting + FeatureSpecializationPart? + UsageBody + | ( UsageExtensionKeyword* 'rendering' + | UsageExtensionKeyword+ ) + Usage + +// Clause 8.2.2.26.2 View Usages + +ViewUsage = + OccurrenceUsagePrefix 'view' + UsageDeclaration? ValuePart? + ViewBody + +ViewBody : ViewUsage = + ';' | '{' ViewBodyItem* '}' + +ViewBodyItem : ViewUsage = + DefinitionBodyItem + | ownedRelationship += ElementFilterMember + | ownedRelationship += ViewRenderingMember + | ownedRelationship += Expose + +Expose = + 'expose' ( MembershipExpose | NamespaceExpose ) + RelationshipBody + +MembershipExpose = + MembershipImport + +NamespaceExpose = + NamespaceImport + +// Clause 8.2.2.26.3 Viewpoints + +ViewpointDefinition = + OccurrenceDefinitionPrefix 'viewpoint' 'def' + DefinitionDeclaration RequirementBody + +ViewpointUsage = + OccurrenceUsagePrefix 'viewpoint' + ConstraintUsageDeclaration RequirementBody + +// Clause 8.2.2.26.4 Renderings + +RenderingDefinition = + OccurrenceDefinitionPrefix 'rendering' 'def' + Definition + +RenderingUsage = + OccurrenceUsagePrefix 'rendering' + Usage + +// Clause 8.2.2.27 Metadata Textual Notation + +MetadataDefinition = + ( isAbstract ?= 'abstract')? DefinitionExtensionKeyword* + 'metadata' 'def' Definition + +PrefixMetadataAnnotation : Annotation = + '#' annotatingElement = PrefixMetadataUsage + { ownedRelatedElement += annotatingElement } + +PrefixMetadataMember : OwningMembership = + '#' ownedRelatedElement = PrefixMetadataUsage + +PrefixMetadataUsage : MetadataUsage = + ownedRelationship += OwnedFeatureTyping + +MetadataUsage = + UsageExtensionKeyword* ( '@' | 'metadata' ) + MetadataUsageDeclaration + ( 'about' ownedRelationship += Annotation + ( ',' ownedRelationship += Annotation )* + )? + MetadataBody + +MetadataUsageDeclaration : MetadataUsage = + ( Identification ( ':' | 'typed' 'by' ) )? + ownedRelationship += OwnedFeatureTyping + +MetadataBody : Type = + ';' | + '{' ( ownedRelationship += DefinitionMember + | ownedRelationship += MetadataBodyUsageMember + | ownedRelationship += AliasMember + | ownedRelationship += Import + )* + '}' + +MetadataBodyUsageMember : FeatureMembership = + ownedMemberFeature = MetadataBodyUsage + +MetadataBodyUsage : ReferenceUsage = + 'ref'? ( ':>>' | 'redefines' )? ownedRelationship += OwnedRedefinition + FeatureSpecializationPart? ValuePart? + MetadataBody + +ExtendedDefinition : Definition = + BasicDefinitionPrefix? DefinitionExtensionKeyword+ + 'def' Definition + +ExtendedUsage : Usage = + UnextendedUsagePrefix UsageExtensionKeyword+ + Usage + +// End of BNF + + diff --git a/Resources/kebnf.g4 b/Resources/kebnf.g4 new file mode 100644 index 00000000..5be3842d --- /dev/null +++ b/Resources/kebnf.g4 @@ -0,0 +1,100 @@ +// Grammar + +grammar kebnf; + +specification : (NL)* rule_definition+ EOF ; + +rule_definition + : name=ID (params=parameter_list)? (COLON target_ast=ID)? ASSIGN rule_body=alternatives SEMICOLON? NL+ + ; + +parameter_list + : LPAREN param_name=ID COLON param_type=ID RPAREN + ; + +alternatives + : alternative (PIPE alternative)* + ; + +alternative + : element* + ; + +element + : assignment + | non_parsing_assignment + | non_parsing_empty + | cross_reference + | group + | terminal + | non_terminal + ; + +assignment + : property=dotted_id op=(ASSIGN | ADD_ASSIGN | BOOL_ASSIGN) content=element_core (suffix=suffix_op)? + ; + +non_parsing_assignment + : LBRACE property=dotted_id op=(ASSIGN | ADD_ASSIGN) val=value_literal RBRACE + ; + +non_parsing_empty + : LBRACE RBRACE + ; + +cross_reference + : TILDE? LBRACK ref=ID RBRACK + ; + +group + : LPAREN alternatives RPAREN (suffix=suffix_op)? + ; + +terminal + : val=value_literal (suffix=suffix_op)? + ; + +non_terminal + : name=ID (suffix=suffix_op)? + ; + +element_core + : cross_reference + | group + | terminal + | non_terminal + ; + +dotted_id + : ID (DOT ID)* + ; + +suffix_op : '*' | '+' | '?' ; + +value_literal : ID | 'true' | 'false' | 'this' | INT | STRING | '[QualifiedName]'; + +// Lexer +ASSIGN : '::=' | '=' ; +ADD_ASSIGN : '+=' ; +BOOL_ASSIGN : '?=' ; +PIPE : '|' ; +COLON : ':' ; +SEMICOLON : ';' ; +COMMA : ',' ; +LPAREN : '(' ; +RPAREN : ')' ; +LBRACK : '[' ; +RBRACK : ']' ; +LBRACE : '{' ; +RBRACE : '}' ; +DOT : '.' ; +TILDE : '~' ; + +ID : [a-zA-Z_][a-zA-Z0-9_]* ; +INT : [0-9]+ ; +STRING : '\'' ( ~['\\] | '\\' . )* '\'' ; + +COMMENT : '//' ~[\r\n]* -> skip ; +WS : [ \t]+ -> skip ; +CONTINUATION : '\r'? '\n' [ \t]+ -> skip ; +NL : '\r'? '\n' ; \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs new file mode 100644 index 00000000..6ea3d80b --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs @@ -0,0 +1,62 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Tests.Grammar +{ + using System; + using System.IO; + + using Antlr4.Runtime; + + using NUnit.Framework; + + using SysML2.NET.CodeGenerator.Grammar; + using SysML2.NET.CodeGenerator.Grammar.Model; + + [TestFixture] + public class TextualNotationSpecificationVisitorTestFixture + { + [Test] + [TestCase("KerML-textual-bnf.kebnf")] + [TestCase("SysML-textual-bnf.kebnf")] + public void VerifyCanParseGrammar(string modelName) + { + var filePath = Path.Combine(TestContext.CurrentContext.TestDirectory, "datamodel",modelName ); + + var stream = CharStreams.fromPath(filePath); + var lexer = new kebnfLexer(stream); + var tokens = new CommonTokenStream(lexer); + var parser = new kebnfParser(tokens); + + var tree = parser.specification(); + var explorer = new TextualNotationSpecificationVisitor(); + var result = (TextualNotationSpecification)explorer.Visit(tree); + var rules = result.Rules; + + using (Assert.EnterMultipleScope()) + { + Assert.That(rules, Is.Not.Null); + Assert.That(rules, Is.Not.Empty); + } + + Console.WriteLine($"Found {rules.Count} rules"); + } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp new file mode 100644 index 00000000..54fabec1 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp @@ -0,0 +1,86 @@ +token literal names: +null +'*' +'+' +'?' +'true' +'false' +'this' +'[QualifiedName]' +null +'+=' +'?=' +'|' +':' +';' +',' +'(' +')' +'[' +']' +'{' +'}' +'.' +'~' +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +ID +INT +STRING +COMMENT +WS +CONTINUATION +NL + +rule names: +specification +rule_definition +parameter_list +alternatives +alternative +element +assignment +non_parsing_assignment +non_parsing_empty +cross_reference +group +terminal +non_terminal +element_core +dotted_id +suffix_op +value_literal + + +atn: +[4, 1, 29, 149, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0, 5, 0, 36, 8, 0, 10, 0, 12, 0, 39, 9, 0, 1, 0, 4, 0, 42, 8, 0, 11, 0, 12, 0, 43, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 50, 8, 1, 1, 1, 1, 1, 3, 1, 54, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 59, 8, 1, 1, 1, 4, 1, 62, 8, 1, 11, 1, 12, 1, 63, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 75, 8, 3, 10, 3, 12, 3, 78, 9, 3, 1, 4, 5, 4, 81, 8, 4, 10, 4, 12, 4, 84, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 93, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 99, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 3, 9, 111, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 121, 8, 10, 1, 11, 1, 11, 3, 11, 125, 8, 11, 1, 12, 1, 12, 3, 12, 129, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 135, 8, 13, 1, 14, 1, 14, 1, 14, 5, 14, 140, 8, 14, 10, 14, 12, 14, 143, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 0, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 4, 1, 0, 8, 10, 1, 0, 8, 9, 1, 0, 1, 3, 2, 0, 4, 7, 23, 25, 154, 0, 37, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 65, 1, 0, 0, 0, 6, 71, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 92, 1, 0, 0, 0, 12, 94, 1, 0, 0, 0, 14, 100, 1, 0, 0, 0, 16, 106, 1, 0, 0, 0, 18, 110, 1, 0, 0, 0, 20, 116, 1, 0, 0, 0, 22, 122, 1, 0, 0, 0, 24, 126, 1, 0, 0, 0, 26, 134, 1, 0, 0, 0, 28, 136, 1, 0, 0, 0, 30, 144, 1, 0, 0, 0, 32, 146, 1, 0, 0, 0, 34, 36, 5, 29, 0, 0, 35, 34, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 41, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 42, 3, 2, 1, 0, 41, 40, 1, 0, 0, 0, 42, 43, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 43, 44, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 46, 5, 0, 0, 1, 46, 1, 1, 0, 0, 0, 47, 49, 5, 23, 0, 0, 48, 50, 3, 4, 2, 0, 49, 48, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 52, 5, 12, 0, 0, 52, 54, 5, 23, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 55, 1, 0, 0, 0, 55, 56, 5, 8, 0, 0, 56, 58, 3, 6, 3, 0, 57, 59, 5, 13, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 61, 1, 0, 0, 0, 60, 62, 5, 29, 0, 0, 61, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 3, 1, 0, 0, 0, 65, 66, 5, 15, 0, 0, 66, 67, 5, 23, 0, 0, 67, 68, 5, 12, 0, 0, 68, 69, 5, 23, 0, 0, 69, 70, 5, 16, 0, 0, 70, 5, 1, 0, 0, 0, 71, 76, 3, 8, 4, 0, 72, 73, 5, 11, 0, 0, 73, 75, 3, 8, 4, 0, 74, 72, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 7, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 81, 3, 10, 5, 0, 80, 79, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 93, 3, 12, 6, 0, 86, 93, 3, 14, 7, 0, 87, 93, 3, 16, 8, 0, 88, 93, 3, 18, 9, 0, 89, 93, 3, 20, 10, 0, 90, 93, 3, 22, 11, 0, 91, 93, 3, 24, 12, 0, 92, 85, 1, 0, 0, 0, 92, 86, 1, 0, 0, 0, 92, 87, 1, 0, 0, 0, 92, 88, 1, 0, 0, 0, 92, 89, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 92, 91, 1, 0, 0, 0, 93, 11, 1, 0, 0, 0, 94, 95, 3, 28, 14, 0, 95, 96, 7, 0, 0, 0, 96, 98, 3, 26, 13, 0, 97, 99, 3, 30, 15, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 13, 1, 0, 0, 0, 100, 101, 5, 19, 0, 0, 101, 102, 3, 28, 14, 0, 102, 103, 7, 1, 0, 0, 103, 104, 3, 32, 16, 0, 104, 105, 5, 20, 0, 0, 105, 15, 1, 0, 0, 0, 106, 107, 5, 19, 0, 0, 107, 108, 5, 20, 0, 0, 108, 17, 1, 0, 0, 0, 109, 111, 5, 22, 0, 0, 110, 109, 1, 0, 0, 0, 110, 111, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 113, 5, 17, 0, 0, 113, 114, 5, 23, 0, 0, 114, 115, 5, 18, 0, 0, 115, 19, 1, 0, 0, 0, 116, 117, 5, 15, 0, 0, 117, 118, 3, 6, 3, 0, 118, 120, 5, 16, 0, 0, 119, 121, 3, 30, 15, 0, 120, 119, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 21, 1, 0, 0, 0, 122, 124, 3, 32, 16, 0, 123, 125, 3, 30, 15, 0, 124, 123, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 23, 1, 0, 0, 0, 126, 128, 5, 23, 0, 0, 127, 129, 3, 30, 15, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 25, 1, 0, 0, 0, 130, 135, 3, 18, 9, 0, 131, 135, 3, 20, 10, 0, 132, 135, 3, 22, 11, 0, 133, 135, 3, 24, 12, 0, 134, 130, 1, 0, 0, 0, 134, 131, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 134, 133, 1, 0, 0, 0, 135, 27, 1, 0, 0, 0, 136, 141, 5, 23, 0, 0, 137, 138, 5, 21, 0, 0, 138, 140, 5, 23, 0, 0, 139, 137, 1, 0, 0, 0, 140, 143, 1, 0, 0, 0, 141, 139, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 29, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 144, 145, 7, 2, 0, 0, 145, 31, 1, 0, 0, 0, 146, 147, 7, 3, 0, 0, 147, 33, 1, 0, 0, 0, 16, 37, 43, 49, 53, 58, 63, 76, 82, 92, 98, 110, 120, 124, 128, 134, 141] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens new file mode 100644 index 00000000..a34fe965 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens @@ -0,0 +1,50 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +ASSIGN=8 +ADD_ASSIGN=9 +BOOL_ASSIGN=10 +PIPE=11 +COLON=12 +SEMICOLON=13 +COMMA=14 +LPAREN=15 +RPAREN=16 +LBRACK=17 +RBRACK=18 +LBRACE=19 +RBRACE=20 +DOT=21 +TILDE=22 +ID=23 +INT=24 +STRING=25 +COMMENT=26 +WS=27 +CONTINUATION=28 +NL=29 +'*'=1 +'+'=2 +'?'=3 +'true'=4 +'false'=5 +'this'=6 +'[QualifiedName]'=7 +'+='=9 +'?='=10 +'|'=11 +':'=12 +';'=13 +','=14 +'('=15 +')'=16 +'['=17 +']'=18 +'{'=19 +'}'=20 +'.'=21 +'~'=22 diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs new file mode 100644 index 00000000..1593400e --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs @@ -0,0 +1,257 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { + +using Antlr4.Runtime.Misc; +using IErrorNode = Antlr4.Runtime.Tree.IErrorNode; +using ITerminalNode = Antlr4.Runtime.Tree.ITerminalNode; +using IToken = Antlr4.Runtime.IToken; +using ParserRuleContext = Antlr4.Runtime.ParserRuleContext; + +/// +/// This class provides an empty implementation of , +/// which can be extended to create a listener which only needs to handle a subset +/// of the available methods. +/// +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.Diagnostics.DebuggerNonUserCode] +[System.CLSCompliant(false)] +public partial class kebnfBaseListener : IkebnfListener { + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSpecification([NotNull] kebnfParser.SpecificationContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSpecification([NotNull] kebnfParser.SpecificationContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterRule_definition([NotNull] kebnfParser.Rule_definitionContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitRule_definition([NotNull] kebnfParser.Rule_definitionContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterParameter_list([NotNull] kebnfParser.Parameter_listContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitParameter_list([NotNull] kebnfParser.Parameter_listContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAlternatives([NotNull] kebnfParser.AlternativesContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAlternatives([NotNull] kebnfParser.AlternativesContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAlternative([NotNull] kebnfParser.AlternativeContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAlternative([NotNull] kebnfParser.AlternativeContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterElement([NotNull] kebnfParser.ElementContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitElement([NotNull] kebnfParser.ElementContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterAssignment([NotNull] kebnfParser.AssignmentContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitAssignment([NotNull] kebnfParser.AssignmentContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterCross_reference([NotNull] kebnfParser.Cross_referenceContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitCross_reference([NotNull] kebnfParser.Cross_referenceContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterGroup([NotNull] kebnfParser.GroupContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitGroup([NotNull] kebnfParser.GroupContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterTerminal([NotNull] kebnfParser.TerminalContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitTerminal([NotNull] kebnfParser.TerminalContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterNon_terminal([NotNull] kebnfParser.Non_terminalContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitNon_terminal([NotNull] kebnfParser.Non_terminalContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterElement_core([NotNull] kebnfParser.Element_coreContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitElement_core([NotNull] kebnfParser.Element_coreContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterDotted_id([NotNull] kebnfParser.Dotted_idContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitDotted_id([NotNull] kebnfParser.Dotted_idContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterSuffix_op([NotNull] kebnfParser.Suffix_opContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitSuffix_op([NotNull] kebnfParser.Suffix_opContext context) { } + /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterValue_literal([NotNull] kebnfParser.Value_literalContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitValue_literal([NotNull] kebnfParser.Value_literalContext context) { } + + /// + /// The default implementation does nothing. + public virtual void EnterEveryRule([NotNull] ParserRuleContext context) { } + /// + /// The default implementation does nothing. + public virtual void ExitEveryRule([NotNull] ParserRuleContext context) { } + /// + /// The default implementation does nothing. + public virtual void VisitTerminal([NotNull] ITerminalNode node) { } + /// + /// The default implementation does nothing. + public virtual void VisitErrorNode([NotNull] IErrorNode node) { } +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs new file mode 100644 index 00000000..3a64587f --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs @@ -0,0 +1,209 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using IToken = Antlr4.Runtime.IToken; +using ParserRuleContext = Antlr4.Runtime.ParserRuleContext; + +/// +/// This class provides an empty implementation of , +/// which can be extended to create a visitor which only needs to handle a subset +/// of the available methods. +/// +/// The return type of the visit operation. +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.Diagnostics.DebuggerNonUserCode] +[System.CLSCompliant(false)] +public partial class kebnfBaseVisitor : AbstractParseTreeVisitor, IkebnfVisitor { + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSpecification([NotNull] kebnfParser.SpecificationContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitRule_definition([NotNull] kebnfParser.Rule_definitionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitParameter_list([NotNull] kebnfParser.Parameter_listContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAlternatives([NotNull] kebnfParser.AlternativesContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAlternative([NotNull] kebnfParser.AlternativeContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElement([NotNull] kebnfParser.ElementContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitAssignment([NotNull] kebnfParser.AssignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitCross_reference([NotNull] kebnfParser.Cross_referenceContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitGroup([NotNull] kebnfParser.GroupContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitTerminal([NotNull] kebnfParser.TerminalContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitNon_terminal([NotNull] kebnfParser.Non_terminalContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitElement_core([NotNull] kebnfParser.Element_coreContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitDotted_id([NotNull] kebnfParser.Dotted_idContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitSuffix_op([NotNull] kebnfParser.Suffix_opContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitValue_literal([NotNull] kebnfParser.Value_literalContext context) { return VisitChildren(context); } +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs new file mode 100644 index 00000000..9f980ce9 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs @@ -0,0 +1,174 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using System; +using System.IO; +using System.Text; +using Antlr4.Runtime; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using DFA = Antlr4.Runtime.Dfa.DFA; + +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.CLSCompliant(false)] +public partial class kebnfLexer : Lexer { + protected static DFA[] decisionToDFA; + protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); + public const int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, ASSIGN=8, ADD_ASSIGN=9, + BOOL_ASSIGN=10, PIPE=11, COLON=12, SEMICOLON=13, COMMA=14, LPAREN=15, + RPAREN=16, LBRACK=17, RBRACK=18, LBRACE=19, RBRACE=20, DOT=21, TILDE=22, + ID=23, INT=24, STRING=25, COMMENT=26, WS=27, CONTINUATION=28, NL=29; + public static string[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static string[] modeNames = { + "DEFAULT_MODE" + }; + + public static readonly string[] ruleNames = { + "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "ASSIGN", "ADD_ASSIGN", + "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "ID", "INT", "STRING", + "COMMENT", "WS", "CONTINUATION", "NL" + }; + + + public kebnfLexer(ICharStream input) + : this(input, Console.Out, Console.Error) { } + + public kebnfLexer(ICharStream input, TextWriter output, TextWriter errorOutput) + : base(input, output, errorOutput) + { + Interpreter = new LexerATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); + } + + private static readonly string[] _LiteralNames = { + null, "'*'", "'+'", "'?'", "'true'", "'false'", "'this'", "'[QualifiedName]'", + null, "'+='", "'?='", "'|'", "':'", "';'", "','", "'('", "')'", "'['", + "']'", "'{'", "'}'", "'.'", "'~'" + }; + private static readonly string[] _SymbolicNames = { + null, null, null, null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", + "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "ID", "INT", "STRING", + "COMMENT", "WS", "CONTINUATION", "NL" + }; + public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); + + [NotNull] + public override IVocabulary Vocabulary + { + get + { + return DefaultVocabulary; + } + } + + public override string GrammarFileName { get { return "kebnf.g4"; } } + + public override string[] RuleNames { get { return ruleNames; } } + + public override string[] ChannelNames { get { return channelNames; } } + + public override string[] ModeNames { get { return modeNames; } } + + public override int[] SerializedAtn { get { return _serializedATN; } } + + static kebnfLexer() { + decisionToDFA = new DFA[_ATN.NumberOfDecisions]; + for (int i = 0; i < _ATN.NumberOfDecisions; i++) { + decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); + } + } + private static int[] _serializedATN = { + 4,0,29,190,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, + 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, + 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28, + 7,28,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1, + 4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6, + 1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,3,7,102,8,7,1,8,1,8,1,8,1,9,1,9,1,9,1, + 10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1, + 17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,5,22,136,8,22, + 10,22,12,22,139,9,22,1,23,4,23,142,8,23,11,23,12,23,143,1,24,1,24,1,24, + 1,24,5,24,150,8,24,10,24,12,24,153,9,24,1,24,1,24,1,25,1,25,1,25,1,25, + 5,25,161,8,25,10,25,12,25,164,9,25,1,25,1,25,1,26,4,26,169,8,26,11,26, + 12,26,170,1,26,1,26,1,27,3,27,176,8,27,1,27,1,27,4,27,180,8,27,11,27,12, + 27,181,1,27,1,27,1,28,3,28,187,8,28,1,28,1,28,0,0,29,1,1,3,2,5,3,7,4,9, + 5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17, + 35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29, + 1,0,6,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,1,0,48,57,2, + 0,39,39,92,92,2,0,10,10,13,13,2,0,9,9,32,32,199,0,1,1,0,0,0,0,3,1,0,0, + 0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1, + 0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0, + 0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37, + 1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0, + 0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,1,59, + 1,0,0,0,3,61,1,0,0,0,5,63,1,0,0,0,7,65,1,0,0,0,9,70,1,0,0,0,11,76,1,0, + 0,0,13,81,1,0,0,0,15,101,1,0,0,0,17,103,1,0,0,0,19,106,1,0,0,0,21,109, + 1,0,0,0,23,111,1,0,0,0,25,113,1,0,0,0,27,115,1,0,0,0,29,117,1,0,0,0,31, + 119,1,0,0,0,33,121,1,0,0,0,35,123,1,0,0,0,37,125,1,0,0,0,39,127,1,0,0, + 0,41,129,1,0,0,0,43,131,1,0,0,0,45,133,1,0,0,0,47,141,1,0,0,0,49,145,1, + 0,0,0,51,156,1,0,0,0,53,168,1,0,0,0,55,175,1,0,0,0,57,186,1,0,0,0,59,60, + 5,42,0,0,60,2,1,0,0,0,61,62,5,43,0,0,62,4,1,0,0,0,63,64,5,63,0,0,64,6, + 1,0,0,0,65,66,5,116,0,0,66,67,5,114,0,0,67,68,5,117,0,0,68,69,5,101,0, + 0,69,8,1,0,0,0,70,71,5,102,0,0,71,72,5,97,0,0,72,73,5,108,0,0,73,74,5, + 115,0,0,74,75,5,101,0,0,75,10,1,0,0,0,76,77,5,116,0,0,77,78,5,104,0,0, + 78,79,5,105,0,0,79,80,5,115,0,0,80,12,1,0,0,0,81,82,5,91,0,0,82,83,5,81, + 0,0,83,84,5,117,0,0,84,85,5,97,0,0,85,86,5,108,0,0,86,87,5,105,0,0,87, + 88,5,102,0,0,88,89,5,105,0,0,89,90,5,101,0,0,90,91,5,100,0,0,91,92,5,78, + 0,0,92,93,5,97,0,0,93,94,5,109,0,0,94,95,5,101,0,0,95,96,5,93,0,0,96,14, + 1,0,0,0,97,98,5,58,0,0,98,99,5,58,0,0,99,102,5,61,0,0,100,102,5,61,0,0, + 101,97,1,0,0,0,101,100,1,0,0,0,102,16,1,0,0,0,103,104,5,43,0,0,104,105, + 5,61,0,0,105,18,1,0,0,0,106,107,5,63,0,0,107,108,5,61,0,0,108,20,1,0,0, + 0,109,110,5,124,0,0,110,22,1,0,0,0,111,112,5,58,0,0,112,24,1,0,0,0,113, + 114,5,59,0,0,114,26,1,0,0,0,115,116,5,44,0,0,116,28,1,0,0,0,117,118,5, + 40,0,0,118,30,1,0,0,0,119,120,5,41,0,0,120,32,1,0,0,0,121,122,5,91,0,0, + 122,34,1,0,0,0,123,124,5,93,0,0,124,36,1,0,0,0,125,126,5,123,0,0,126,38, + 1,0,0,0,127,128,5,125,0,0,128,40,1,0,0,0,129,130,5,46,0,0,130,42,1,0,0, + 0,131,132,5,126,0,0,132,44,1,0,0,0,133,137,7,0,0,0,134,136,7,1,0,0,135, + 134,1,0,0,0,136,139,1,0,0,0,137,135,1,0,0,0,137,138,1,0,0,0,138,46,1,0, + 0,0,139,137,1,0,0,0,140,142,7,2,0,0,141,140,1,0,0,0,142,143,1,0,0,0,143, + 141,1,0,0,0,143,144,1,0,0,0,144,48,1,0,0,0,145,151,5,39,0,0,146,150,8, + 3,0,0,147,148,5,92,0,0,148,150,9,0,0,0,149,146,1,0,0,0,149,147,1,0,0,0, + 150,153,1,0,0,0,151,149,1,0,0,0,151,152,1,0,0,0,152,154,1,0,0,0,153,151, + 1,0,0,0,154,155,5,39,0,0,155,50,1,0,0,0,156,157,5,47,0,0,157,158,5,47, + 0,0,158,162,1,0,0,0,159,161,8,4,0,0,160,159,1,0,0,0,161,164,1,0,0,0,162, + 160,1,0,0,0,162,163,1,0,0,0,163,165,1,0,0,0,164,162,1,0,0,0,165,166,6, + 25,0,0,166,52,1,0,0,0,167,169,7,5,0,0,168,167,1,0,0,0,169,170,1,0,0,0, + 170,168,1,0,0,0,170,171,1,0,0,0,171,172,1,0,0,0,172,173,6,26,0,0,173,54, + 1,0,0,0,174,176,5,13,0,0,175,174,1,0,0,0,175,176,1,0,0,0,176,177,1,0,0, + 0,177,179,5,10,0,0,178,180,7,5,0,0,179,178,1,0,0,0,180,181,1,0,0,0,181, + 179,1,0,0,0,181,182,1,0,0,0,182,183,1,0,0,0,183,184,6,27,0,0,184,56,1, + 0,0,0,185,187,5,13,0,0,186,185,1,0,0,0,186,187,1,0,0,0,187,188,1,0,0,0, + 188,189,5,10,0,0,189,58,1,0,0,0,11,0,101,137,143,149,151,162,170,175,181, + 186,1,6,0,0 + }; + + public static readonly ATN _ATN = + new ATNDeserializer().Deserialize(_serializedATN); + + +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp new file mode 100644 index 00000000..f5467a47 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp @@ -0,0 +1,104 @@ +token literal names: +null +'*' +'+' +'?' +'true' +'false' +'this' +'[QualifiedName]' +null +'+=' +'?=' +'|' +':' +';' +',' +'(' +')' +'[' +']' +'{' +'}' +'.' +'~' +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +ID +INT +STRING +COMMENT +WS +CONTINUATION +NL + +rule names: +T__0 +T__1 +T__2 +T__3 +T__4 +T__5 +T__6 +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +ID +INT +STRING +COMMENT +WS +CONTINUATION +NL + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 29, 190, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 102, 8, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 5, 22, 136, 8, 22, 10, 22, 12, 22, 139, 9, 22, 1, 23, 4, 23, 142, 8, 23, 11, 23, 12, 23, 143, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 150, 8, 24, 10, 24, 12, 24, 153, 9, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 161, 8, 25, 10, 25, 12, 25, 164, 9, 25, 1, 25, 1, 25, 1, 26, 4, 26, 169, 8, 26, 11, 26, 12, 26, 170, 1, 26, 1, 26, 1, 27, 3, 27, 176, 8, 27, 1, 27, 1, 27, 4, 27, 180, 8, 27, 11, 27, 12, 27, 181, 1, 27, 1, 27, 1, 28, 3, 28, 187, 8, 28, 1, 28, 1, 28, 0, 0, 29, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 1, 0, 6, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, 2, 0, 39, 39, 92, 92, 2, 0, 10, 10, 13, 13, 2, 0, 9, 9, 32, 32, 199, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 1, 59, 1, 0, 0, 0, 3, 61, 1, 0, 0, 0, 5, 63, 1, 0, 0, 0, 7, 65, 1, 0, 0, 0, 9, 70, 1, 0, 0, 0, 11, 76, 1, 0, 0, 0, 13, 81, 1, 0, 0, 0, 15, 101, 1, 0, 0, 0, 17, 103, 1, 0, 0, 0, 19, 106, 1, 0, 0, 0, 21, 109, 1, 0, 0, 0, 23, 111, 1, 0, 0, 0, 25, 113, 1, 0, 0, 0, 27, 115, 1, 0, 0, 0, 29, 117, 1, 0, 0, 0, 31, 119, 1, 0, 0, 0, 33, 121, 1, 0, 0, 0, 35, 123, 1, 0, 0, 0, 37, 125, 1, 0, 0, 0, 39, 127, 1, 0, 0, 0, 41, 129, 1, 0, 0, 0, 43, 131, 1, 0, 0, 0, 45, 133, 1, 0, 0, 0, 47, 141, 1, 0, 0, 0, 49, 145, 1, 0, 0, 0, 51, 156, 1, 0, 0, 0, 53, 168, 1, 0, 0, 0, 55, 175, 1, 0, 0, 0, 57, 186, 1, 0, 0, 0, 59, 60, 5, 42, 0, 0, 60, 2, 1, 0, 0, 0, 61, 62, 5, 43, 0, 0, 62, 4, 1, 0, 0, 0, 63, 64, 5, 63, 0, 0, 64, 6, 1, 0, 0, 0, 65, 66, 5, 116, 0, 0, 66, 67, 5, 114, 0, 0, 67, 68, 5, 117, 0, 0, 68, 69, 5, 101, 0, 0, 69, 8, 1, 0, 0, 0, 70, 71, 5, 102, 0, 0, 71, 72, 5, 97, 0, 0, 72, 73, 5, 108, 0, 0, 73, 74, 5, 115, 0, 0, 74, 75, 5, 101, 0, 0, 75, 10, 1, 0, 0, 0, 76, 77, 5, 116, 0, 0, 77, 78, 5, 104, 0, 0, 78, 79, 5, 105, 0, 0, 79, 80, 5, 115, 0, 0, 80, 12, 1, 0, 0, 0, 81, 82, 5, 91, 0, 0, 82, 83, 5, 81, 0, 0, 83, 84, 5, 117, 0, 0, 84, 85, 5, 97, 0, 0, 85, 86, 5, 108, 0, 0, 86, 87, 5, 105, 0, 0, 87, 88, 5, 102, 0, 0, 88, 89, 5, 105, 0, 0, 89, 90, 5, 101, 0, 0, 90, 91, 5, 100, 0, 0, 91, 92, 5, 78, 0, 0, 92, 93, 5, 97, 0, 0, 93, 94, 5, 109, 0, 0, 94, 95, 5, 101, 0, 0, 95, 96, 5, 93, 0, 0, 96, 14, 1, 0, 0, 0, 97, 98, 5, 58, 0, 0, 98, 99, 5, 58, 0, 0, 99, 102, 5, 61, 0, 0, 100, 102, 5, 61, 0, 0, 101, 97, 1, 0, 0, 0, 101, 100, 1, 0, 0, 0, 102, 16, 1, 0, 0, 0, 103, 104, 5, 43, 0, 0, 104, 105, 5, 61, 0, 0, 105, 18, 1, 0, 0, 0, 106, 107, 5, 63, 0, 0, 107, 108, 5, 61, 0, 0, 108, 20, 1, 0, 0, 0, 109, 110, 5, 124, 0, 0, 110, 22, 1, 0, 0, 0, 111, 112, 5, 58, 0, 0, 112, 24, 1, 0, 0, 0, 113, 114, 5, 59, 0, 0, 114, 26, 1, 0, 0, 0, 115, 116, 5, 44, 0, 0, 116, 28, 1, 0, 0, 0, 117, 118, 5, 40, 0, 0, 118, 30, 1, 0, 0, 0, 119, 120, 5, 41, 0, 0, 120, 32, 1, 0, 0, 0, 121, 122, 5, 91, 0, 0, 122, 34, 1, 0, 0, 0, 123, 124, 5, 93, 0, 0, 124, 36, 1, 0, 0, 0, 125, 126, 5, 123, 0, 0, 126, 38, 1, 0, 0, 0, 127, 128, 5, 125, 0, 0, 128, 40, 1, 0, 0, 0, 129, 130, 5, 46, 0, 0, 130, 42, 1, 0, 0, 0, 131, 132, 5, 126, 0, 0, 132, 44, 1, 0, 0, 0, 133, 137, 7, 0, 0, 0, 134, 136, 7, 1, 0, 0, 135, 134, 1, 0, 0, 0, 136, 139, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 46, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 140, 142, 7, 2, 0, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 48, 1, 0, 0, 0, 145, 151, 5, 39, 0, 0, 146, 150, 8, 3, 0, 0, 147, 148, 5, 92, 0, 0, 148, 150, 9, 0, 0, 0, 149, 146, 1, 0, 0, 0, 149, 147, 1, 0, 0, 0, 150, 153, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 154, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 154, 155, 5, 39, 0, 0, 155, 50, 1, 0, 0, 0, 156, 157, 5, 47, 0, 0, 157, 158, 5, 47, 0, 0, 158, 162, 1, 0, 0, 0, 159, 161, 8, 4, 0, 0, 160, 159, 1, 0, 0, 0, 161, 164, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 165, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 165, 166, 6, 25, 0, 0, 166, 52, 1, 0, 0, 0, 167, 169, 7, 5, 0, 0, 168, 167, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 173, 6, 26, 0, 0, 173, 54, 1, 0, 0, 0, 174, 176, 5, 13, 0, 0, 175, 174, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 179, 5, 10, 0, 0, 178, 180, 7, 5, 0, 0, 179, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 6, 27, 0, 0, 184, 56, 1, 0, 0, 0, 185, 187, 5, 13, 0, 0, 186, 185, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 189, 5, 10, 0, 0, 189, 58, 1, 0, 0, 0, 11, 0, 101, 137, 143, 149, 151, 162, 170, 175, 181, 186, 1, 6, 0, 0] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens new file mode 100644 index 00000000..a34fe965 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens @@ -0,0 +1,50 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +ASSIGN=8 +ADD_ASSIGN=9 +BOOL_ASSIGN=10 +PIPE=11 +COLON=12 +SEMICOLON=13 +COMMA=14 +LPAREN=15 +RPAREN=16 +LBRACK=17 +RBRACK=18 +LBRACE=19 +RBRACE=20 +DOT=21 +TILDE=22 +ID=23 +INT=24 +STRING=25 +COMMENT=26 +WS=27 +CONTINUATION=28 +NL=29 +'*'=1 +'+'=2 +'?'=3 +'true'=4 +'false'=5 +'this'=6 +'[QualifiedName]'=7 +'+='=9 +'?='=10 +'|'=11 +':'=12 +';'=13 +','=14 +'('=15 +')'=16 +'['=17 +']'=18 +'{'=19 +'}'=20 +'.'=21 +'~'=22 diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs new file mode 100644 index 00000000..15434522 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs @@ -0,0 +1,205 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using Antlr4.Runtime.Misc; +using IParseTreeListener = Antlr4.Runtime.Tree.IParseTreeListener; +using IToken = Antlr4.Runtime.IToken; + +/// +/// This interface defines a complete listener for a parse tree produced by +/// . +/// +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.CLSCompliant(false)] +public interface IkebnfListener : IParseTreeListener { + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSpecification([NotNull] kebnfParser.SpecificationContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSpecification([NotNull] kebnfParser.SpecificationContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterRule_definition([NotNull] kebnfParser.Rule_definitionContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitRule_definition([NotNull] kebnfParser.Rule_definitionContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterParameter_list([NotNull] kebnfParser.Parameter_listContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitParameter_list([NotNull] kebnfParser.Parameter_listContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAlternatives([NotNull] kebnfParser.AlternativesContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAlternatives([NotNull] kebnfParser.AlternativesContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAlternative([NotNull] kebnfParser.AlternativeContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAlternative([NotNull] kebnfParser.AlternativeContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterElement([NotNull] kebnfParser.ElementContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitElement([NotNull] kebnfParser.ElementContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterAssignment([NotNull] kebnfParser.AssignmentContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitAssignment([NotNull] kebnfParser.AssignmentContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterCross_reference([NotNull] kebnfParser.Cross_referenceContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitCross_reference([NotNull] kebnfParser.Cross_referenceContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterGroup([NotNull] kebnfParser.GroupContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitGroup([NotNull] kebnfParser.GroupContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterTerminal([NotNull] kebnfParser.TerminalContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitTerminal([NotNull] kebnfParser.TerminalContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterNon_terminal([NotNull] kebnfParser.Non_terminalContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitNon_terminal([NotNull] kebnfParser.Non_terminalContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterElement_core([NotNull] kebnfParser.Element_coreContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitElement_core([NotNull] kebnfParser.Element_coreContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterDotted_id([NotNull] kebnfParser.Dotted_idContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitDotted_id([NotNull] kebnfParser.Dotted_idContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterSuffix_op([NotNull] kebnfParser.Suffix_opContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitSuffix_op([NotNull] kebnfParser.Suffix_opContext context); + /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterValue_literal([NotNull] kebnfParser.Value_literalContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitValue_literal([NotNull] kebnfParser.Value_literalContext context); +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs new file mode 100644 index 00000000..14ce997c --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs @@ -0,0 +1,1413 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using System; +using System.IO; +using System.Text; +using System.Diagnostics; +using System.Collections.Generic; +using Antlr4.Runtime; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using DFA = Antlr4.Runtime.Dfa.DFA; + +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.CLSCompliant(false)] +public partial class kebnfParser : Parser { + protected static DFA[] decisionToDFA; + protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); + public const int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, ASSIGN=8, ADD_ASSIGN=9, + BOOL_ASSIGN=10, PIPE=11, COLON=12, SEMICOLON=13, COMMA=14, LPAREN=15, + RPAREN=16, LBRACK=17, RBRACK=18, LBRACE=19, RBRACE=20, DOT=21, TILDE=22, + ID=23, INT=24, STRING=25, COMMENT=26, WS=27, CONTINUATION=28, NL=29; + public const int + RULE_specification = 0, RULE_rule_definition = 1, RULE_parameter_list = 2, + RULE_alternatives = 3, RULE_alternative = 4, RULE_element = 5, RULE_assignment = 6, + RULE_non_parsing_assignment = 7, RULE_non_parsing_empty = 8, RULE_cross_reference = 9, + RULE_group = 10, RULE_terminal = 11, RULE_non_terminal = 12, RULE_element_core = 13, + RULE_dotted_id = 14, RULE_suffix_op = 15, RULE_value_literal = 16; + public static readonly string[] ruleNames = { + "specification", "rule_definition", "parameter_list", "alternatives", + "alternative", "element", "assignment", "non_parsing_assignment", "non_parsing_empty", + "cross_reference", "group", "terminal", "non_terminal", "element_core", + "dotted_id", "suffix_op", "value_literal" + }; + + private static readonly string[] _LiteralNames = { + null, "'*'", "'+'", "'?'", "'true'", "'false'", "'this'", "'[QualifiedName]'", + null, "'+='", "'?='", "'|'", "':'", "';'", "','", "'('", "')'", "'['", + "']'", "'{'", "'}'", "'.'", "'~'" + }; + private static readonly string[] _SymbolicNames = { + null, null, null, null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", + "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "ID", "INT", "STRING", + "COMMENT", "WS", "CONTINUATION", "NL" + }; + public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); + + [NotNull] + public override IVocabulary Vocabulary + { + get + { + return DefaultVocabulary; + } + } + + public override string GrammarFileName { get { return "kebnf.g4"; } } + + public override string[] RuleNames { get { return ruleNames; } } + + public override int[] SerializedAtn { get { return _serializedATN; } } + + static kebnfParser() { + decisionToDFA = new DFA[_ATN.NumberOfDecisions]; + for (int i = 0; i < _ATN.NumberOfDecisions; i++) { + decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); + } + } + + public kebnfParser(ITokenStream input) : this(input, Console.Out, Console.Error) { } + + public kebnfParser(ITokenStream input, TextWriter output, TextWriter errorOutput) + : base(input, output, errorOutput) + { + Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); + } + + public partial class SpecificationContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode Eof() { return GetToken(kebnfParser.Eof, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] NL() { return GetTokens(kebnfParser.NL); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NL(int i) { + return GetToken(kebnfParser.NL, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Rule_definitionContext[] rule_definition() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public Rule_definitionContext rule_definition(int i) { + return GetRuleContext(i); + } + public SpecificationContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_specification; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterSpecification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitSpecification(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitSpecification(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public SpecificationContext specification() { + SpecificationContext _localctx = new SpecificationContext(Context, State); + EnterRule(_localctx, 0, RULE_specification); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 37; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==NL) { + { + { + State = 34; + Match(NL); + } + } + State = 39; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + State = 41; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 40; + rule_definition(); + } + } + State = 43; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==ID ); + State = 45; + Match(Eof); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Rule_definitionContext : ParserRuleContext { + public IToken name; + public Parameter_listContext @params; + public IToken target_ast; + public AlternativesContext rule_body; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSIGN() { return GetToken(kebnfParser.ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ID() { return GetTokens(kebnfParser.ID); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID(int i) { + return GetToken(kebnfParser.ID, i); + } + [System.Diagnostics.DebuggerNonUserCode] public AlternativesContext alternatives() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(kebnfParser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SEMICOLON() { return GetToken(kebnfParser.SEMICOLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] NL() { return GetTokens(kebnfParser.NL); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode NL(int i) { + return GetToken(kebnfParser.NL, i); + } + [System.Diagnostics.DebuggerNonUserCode] public Parameter_listContext parameter_list() { + return GetRuleContext(0); + } + public Rule_definitionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_rule_definition; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterRule_definition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitRule_definition(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitRule_definition(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Rule_definitionContext rule_definition() { + Rule_definitionContext _localctx = new Rule_definitionContext(Context, State); + EnterRule(_localctx, 2, RULE_rule_definition); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 47; + _localctx.name = Match(ID); + State = 49; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==LPAREN) { + { + State = 48; + _localctx.@params = parameter_list(); + } + } + + State = 53; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==COLON) { + { + State = 51; + Match(COLON); + State = 52; + _localctx.target_ast = Match(ID); + } + } + + State = 55; + Match(ASSIGN); + State = 56; + _localctx.rule_body = alternatives(); + State = 58; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==SEMICOLON) { + { + State = 57; + Match(SEMICOLON); + } + } + + State = 61; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + do { + { + { + State = 60; + Match(NL); + } + } + State = 63; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } while ( _la==NL ); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Parameter_listContext : ParserRuleContext { + public IToken param_name; + public IToken param_type; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(kebnfParser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode COLON() { return GetToken(kebnfParser.COLON, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(kebnfParser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ID() { return GetTokens(kebnfParser.ID); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID(int i) { + return GetToken(kebnfParser.ID, i); + } + public Parameter_listContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_parameter_list; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterParameter_list(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitParameter_list(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitParameter_list(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Parameter_listContext parameter_list() { + Parameter_listContext _localctx = new Parameter_listContext(Context, State); + EnterRule(_localctx, 4, RULE_parameter_list); + try { + EnterOuterAlt(_localctx, 1); + { + State = 65; + Match(LPAREN); + State = 66; + _localctx.param_name = Match(ID); + State = 67; + Match(COLON); + State = 68; + _localctx.param_type = Match(ID); + State = 69; + Match(RPAREN); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AlternativesContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AlternativeContext[] alternative() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public AlternativeContext alternative(int i) { + return GetRuleContext(i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] PIPE() { return GetTokens(kebnfParser.PIPE); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode PIPE(int i) { + return GetToken(kebnfParser.PIPE, i); + } + public AlternativesContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_alternatives; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterAlternatives(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitAlternatives(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitAlternatives(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AlternativesContext alternatives() { + AlternativesContext _localctx = new AlternativesContext(Context, State); + EnterRule(_localctx, 6, RULE_alternatives); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 71; + alternative(); + State = 76; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==PIPE) { + { + { + State = 72; + Match(PIPE); + State = 73; + alternative(); + } + } + State = 78; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AlternativeContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ElementContext[] element() { + return GetRuleContexts(); + } + [System.Diagnostics.DebuggerNonUserCode] public ElementContext element(int i) { + return GetRuleContext(i); + } + public AlternativeContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_alternative; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterAlternative(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitAlternative(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitAlternative(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AlternativeContext alternative() { + AlternativeContext _localctx = new AlternativeContext(Context, State); + EnterRule(_localctx, 8, RULE_alternative); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 82; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 63602928L) != 0)) { + { + { + State = 79; + element(); + } + } + State = 84; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class ElementContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public AssignmentContext assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Non_parsing_assignmentContext non_parsing_assignment() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Non_parsing_emptyContext non_parsing_empty() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Cross_referenceContext cross_reference() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GroupContext group() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TerminalContext terminal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Non_terminalContext non_terminal() { + return GetRuleContext(0); + } + public ElementContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_element; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitElement(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitElement(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public ElementContext element() { + ElementContext _localctx = new ElementContext(Context, State); + EnterRule(_localctx, 10, RULE_element); + try { + State = 92; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,8,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 85; + assignment(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 86; + non_parsing_assignment(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 87; + non_parsing_empty(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 88; + cross_reference(); + } + break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 89; + group(); + } + break; + case 6: + EnterOuterAlt(_localctx, 6); + { + State = 90; + terminal(); + } + break; + case 7: + EnterOuterAlt(_localctx, 7); + { + State = 91; + non_terminal(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class AssignmentContext : ParserRuleContext { + public Dotted_idContext property; + public IToken op; + public Element_coreContext content; + public Suffix_opContext suffix; + [System.Diagnostics.DebuggerNonUserCode] public Dotted_idContext dotted_id() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Element_coreContext element_core() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSIGN() { return GetToken(kebnfParser.ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ADD_ASSIGN() { return GetToken(kebnfParser.ADD_ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BOOL_ASSIGN() { return GetToken(kebnfParser.BOOL_ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { + return GetRuleContext(0); + } + public AssignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterAssignment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitAssignment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitAssignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public AssignmentContext assignment() { + AssignmentContext _localctx = new AssignmentContext(Context, State); + EnterRule(_localctx, 12, RULE_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 94; + _localctx.property = dotted_id(); + State = 95; + _localctx.op = TokenStream.LT(1); + _la = TokenStream.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 1792L) != 0)) ) { + _localctx.op = ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 96; + _localctx.content = element_core(); + State = 98; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 14L) != 0)) { + { + State = 97; + _localctx.suffix = suffix_op(); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Non_parsing_assignmentContext : ParserRuleContext { + public Dotted_idContext property; + public IToken op; + public Value_literalContext val; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(kebnfParser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(kebnfParser.RBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Dotted_idContext dotted_id() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Value_literalContext value_literal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSIGN() { return GetToken(kebnfParser.ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ADD_ASSIGN() { return GetToken(kebnfParser.ADD_ASSIGN, 0); } + public Non_parsing_assignmentContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_non_parsing_assignment; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterNon_parsing_assignment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitNon_parsing_assignment(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitNon_parsing_assignment(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Non_parsing_assignmentContext non_parsing_assignment() { + Non_parsing_assignmentContext _localctx = new Non_parsing_assignmentContext(Context, State); + EnterRule(_localctx, 14, RULE_non_parsing_assignment); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 100; + Match(LBRACE); + State = 101; + _localctx.property = dotted_id(); + State = 102; + _localctx.op = TokenStream.LT(1); + _la = TokenStream.LA(1); + if ( !(_la==ASSIGN || _la==ADD_ASSIGN) ) { + _localctx.op = ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + State = 103; + _localctx.val = value_literal(); + State = 104; + Match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Non_parsing_emptyContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACE() { return GetToken(kebnfParser.LBRACE, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACE() { return GetToken(kebnfParser.RBRACE, 0); } + public Non_parsing_emptyContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_non_parsing_empty; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterNon_parsing_empty(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitNon_parsing_empty(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitNon_parsing_empty(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Non_parsing_emptyContext non_parsing_empty() { + Non_parsing_emptyContext _localctx = new Non_parsing_emptyContext(Context, State); + EnterRule(_localctx, 16, RULE_non_parsing_empty); + try { + EnterOuterAlt(_localctx, 1); + { + State = 106; + Match(LBRACE); + State = 107; + Match(RBRACE); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Cross_referenceContext : ParserRuleContext { + public IToken @ref; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LBRACK() { return GetToken(kebnfParser.LBRACK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RBRACK() { return GetToken(kebnfParser.RBRACK, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(kebnfParser.ID, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TILDE() { return GetToken(kebnfParser.TILDE, 0); } + public Cross_referenceContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_cross_reference; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterCross_reference(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitCross_reference(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitCross_reference(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Cross_referenceContext cross_reference() { + Cross_referenceContext _localctx = new Cross_referenceContext(Context, State); + EnterRule(_localctx, 18, RULE_cross_reference); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 110; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==TILDE) { + { + State = 109; + Match(TILDE); + } + } + + State = 112; + Match(LBRACK); + State = 113; + _localctx.@ref = Match(ID); + State = 114; + Match(RBRACK); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class GroupContext : ParserRuleContext { + public Suffix_opContext suffix; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode LPAREN() { return GetToken(kebnfParser.LPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public AlternativesContext alternatives() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode RPAREN() { return GetToken(kebnfParser.RPAREN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { + return GetRuleContext(0); + } + public GroupContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_group; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterGroup(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitGroup(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitGroup(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public GroupContext group() { + GroupContext _localctx = new GroupContext(Context, State); + EnterRule(_localctx, 20, RULE_group); + try { + EnterOuterAlt(_localctx, 1); + { + State = 116; + Match(LPAREN); + State = 117; + alternatives(); + State = 118; + Match(RPAREN); + State = 120; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,11,Context) ) { + case 1: + { + State = 119; + _localctx.suffix = suffix_op(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class TerminalContext : ParserRuleContext { + public Value_literalContext val; + public Suffix_opContext suffix; + [System.Diagnostics.DebuggerNonUserCode] public Value_literalContext value_literal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { + return GetRuleContext(0); + } + public TerminalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_terminal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterTerminal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitTerminal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitTerminal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public TerminalContext terminal() { + TerminalContext _localctx = new TerminalContext(Context, State); + EnterRule(_localctx, 22, RULE_terminal); + try { + EnterOuterAlt(_localctx, 1); + { + State = 122; + _localctx.val = value_literal(); + State = 124; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,12,Context) ) { + case 1: + { + State = 123; + _localctx.suffix = suffix_op(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Non_terminalContext : ParserRuleContext { + public IToken name; + public Suffix_opContext suffix; + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(kebnfParser.ID, 0); } + [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { + return GetRuleContext(0); + } + public Non_terminalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_non_terminal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterNon_terminal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitNon_terminal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitNon_terminal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Non_terminalContext non_terminal() { + Non_terminalContext _localctx = new Non_terminalContext(Context, State); + EnterRule(_localctx, 24, RULE_non_terminal); + try { + EnterOuterAlt(_localctx, 1); + { + State = 126; + _localctx.name = Match(ID); + State = 128; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,13,Context) ) { + case 1: + { + State = 127; + _localctx.suffix = suffix_op(); + } + break; + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Element_coreContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public Cross_referenceContext cross_reference() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public GroupContext group() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public TerminalContext terminal() { + return GetRuleContext(0); + } + [System.Diagnostics.DebuggerNonUserCode] public Non_terminalContext non_terminal() { + return GetRuleContext(0); + } + public Element_coreContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_element_core; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterElement_core(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitElement_core(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitElement_core(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Element_coreContext element_core() { + Element_coreContext _localctx = new Element_coreContext(Context, State); + EnterRule(_localctx, 26, RULE_element_core); + try { + State = 134; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { + case 1: + EnterOuterAlt(_localctx, 1); + { + State = 130; + cross_reference(); + } + break; + case 2: + EnterOuterAlt(_localctx, 2); + { + State = 131; + group(); + } + break; + case 3: + EnterOuterAlt(_localctx, 3); + { + State = 132; + terminal(); + } + break; + case 4: + EnterOuterAlt(_localctx, 4); + { + State = 133; + non_terminal(); + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Dotted_idContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ID() { return GetTokens(kebnfParser.ID); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID(int i) { + return GetToken(kebnfParser.ID, i); + } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] DOT() { return GetTokens(kebnfParser.DOT); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOT(int i) { + return GetToken(kebnfParser.DOT, i); + } + public Dotted_idContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_dotted_id; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterDotted_id(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitDotted_id(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitDotted_id(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Dotted_idContext dotted_id() { + Dotted_idContext _localctx = new Dotted_idContext(Context, State); + EnterRule(_localctx, 28, RULE_dotted_id); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 136; + Match(ID); + State = 141; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + while (_la==DOT) { + { + { + State = 137; + Match(DOT); + State = 138; + Match(ID); + } + } + State = 143; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Suffix_opContext : ParserRuleContext { + public Suffix_opContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_suffix_op; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterSuffix_op(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitSuffix_op(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitSuffix_op(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Suffix_opContext suffix_op() { + Suffix_opContext _localctx = new Suffix_opContext(Context, State); + EnterRule(_localctx, 30, RULE_suffix_op); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 144; + _la = TokenStream.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 14L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class Value_literalContext : ParserRuleContext { + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(kebnfParser.ID, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INT() { return GetToken(kebnfParser.INT, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING() { return GetToken(kebnfParser.STRING, 0); } + public Value_literalContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_value_literal; } } + [System.Diagnostics.DebuggerNonUserCode] + public override void EnterRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.EnterValue_literal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override void ExitRule(IParseTreeListener listener) { + IkebnfListener typedListener = listener as IkebnfListener; + if (typedListener != null) typedListener.ExitValue_literal(this); + } + [System.Diagnostics.DebuggerNonUserCode] + public override TResult Accept(IParseTreeVisitor visitor) { + IkebnfVisitor typedVisitor = visitor as IkebnfVisitor; + if (typedVisitor != null) return typedVisitor.VisitValue_literal(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Value_literalContext value_literal() { + Value_literalContext _localctx = new Value_literalContext(Context, State); + EnterRule(_localctx, 32, RULE_value_literal); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 146; + _la = TokenStream.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 58720496L) != 0)) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + private static int[] _serializedATN = { + 4,1,29,149,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7, + 7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14, + 2,15,7,15,2,16,7,16,1,0,5,0,36,8,0,10,0,12,0,39,9,0,1,0,4,0,42,8,0,11, + 0,12,0,43,1,0,1,0,1,1,1,1,3,1,50,8,1,1,1,1,1,3,1,54,8,1,1,1,1,1,1,1,3, + 1,59,8,1,1,1,4,1,62,8,1,11,1,12,1,63,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1, + 3,5,3,75,8,3,10,3,12,3,78,9,3,1,4,5,4,81,8,4,10,4,12,4,84,9,4,1,5,1,5, + 1,5,1,5,1,5,1,5,1,5,3,5,93,8,5,1,6,1,6,1,6,1,6,3,6,99,8,6,1,7,1,7,1,7, + 1,7,1,7,1,7,1,8,1,8,1,8,1,9,3,9,111,8,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10, + 1,10,3,10,121,8,10,1,11,1,11,3,11,125,8,11,1,12,1,12,3,12,129,8,12,1,13, + 1,13,1,13,1,13,3,13,135,8,13,1,14,1,14,1,14,5,14,140,8,14,10,14,12,14, + 143,9,14,1,15,1,15,1,16,1,16,1,16,0,0,17,0,2,4,6,8,10,12,14,16,18,20,22, + 24,26,28,30,32,0,4,1,0,8,10,1,0,8,9,1,0,1,3,2,0,4,7,23,25,154,0,37,1,0, + 0,0,2,47,1,0,0,0,4,65,1,0,0,0,6,71,1,0,0,0,8,82,1,0,0,0,10,92,1,0,0,0, + 12,94,1,0,0,0,14,100,1,0,0,0,16,106,1,0,0,0,18,110,1,0,0,0,20,116,1,0, + 0,0,22,122,1,0,0,0,24,126,1,0,0,0,26,134,1,0,0,0,28,136,1,0,0,0,30,144, + 1,0,0,0,32,146,1,0,0,0,34,36,5,29,0,0,35,34,1,0,0,0,36,39,1,0,0,0,37,35, + 1,0,0,0,37,38,1,0,0,0,38,41,1,0,0,0,39,37,1,0,0,0,40,42,3,2,1,0,41,40, + 1,0,0,0,42,43,1,0,0,0,43,41,1,0,0,0,43,44,1,0,0,0,44,45,1,0,0,0,45,46, + 5,0,0,1,46,1,1,0,0,0,47,49,5,23,0,0,48,50,3,4,2,0,49,48,1,0,0,0,49,50, + 1,0,0,0,50,53,1,0,0,0,51,52,5,12,0,0,52,54,5,23,0,0,53,51,1,0,0,0,53,54, + 1,0,0,0,54,55,1,0,0,0,55,56,5,8,0,0,56,58,3,6,3,0,57,59,5,13,0,0,58,57, + 1,0,0,0,58,59,1,0,0,0,59,61,1,0,0,0,60,62,5,29,0,0,61,60,1,0,0,0,62,63, + 1,0,0,0,63,61,1,0,0,0,63,64,1,0,0,0,64,3,1,0,0,0,65,66,5,15,0,0,66,67, + 5,23,0,0,67,68,5,12,0,0,68,69,5,23,0,0,69,70,5,16,0,0,70,5,1,0,0,0,71, + 76,3,8,4,0,72,73,5,11,0,0,73,75,3,8,4,0,74,72,1,0,0,0,75,78,1,0,0,0,76, + 74,1,0,0,0,76,77,1,0,0,0,77,7,1,0,0,0,78,76,1,0,0,0,79,81,3,10,5,0,80, + 79,1,0,0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83,1,0,0,0,83,9,1,0,0,0,84,82, + 1,0,0,0,85,93,3,12,6,0,86,93,3,14,7,0,87,93,3,16,8,0,88,93,3,18,9,0,89, + 93,3,20,10,0,90,93,3,22,11,0,91,93,3,24,12,0,92,85,1,0,0,0,92,86,1,0,0, + 0,92,87,1,0,0,0,92,88,1,0,0,0,92,89,1,0,0,0,92,90,1,0,0,0,92,91,1,0,0, + 0,93,11,1,0,0,0,94,95,3,28,14,0,95,96,7,0,0,0,96,98,3,26,13,0,97,99,3, + 30,15,0,98,97,1,0,0,0,98,99,1,0,0,0,99,13,1,0,0,0,100,101,5,19,0,0,101, + 102,3,28,14,0,102,103,7,1,0,0,103,104,3,32,16,0,104,105,5,20,0,0,105,15, + 1,0,0,0,106,107,5,19,0,0,107,108,5,20,0,0,108,17,1,0,0,0,109,111,5,22, + 0,0,110,109,1,0,0,0,110,111,1,0,0,0,111,112,1,0,0,0,112,113,5,17,0,0,113, + 114,5,23,0,0,114,115,5,18,0,0,115,19,1,0,0,0,116,117,5,15,0,0,117,118, + 3,6,3,0,118,120,5,16,0,0,119,121,3,30,15,0,120,119,1,0,0,0,120,121,1,0, + 0,0,121,21,1,0,0,0,122,124,3,32,16,0,123,125,3,30,15,0,124,123,1,0,0,0, + 124,125,1,0,0,0,125,23,1,0,0,0,126,128,5,23,0,0,127,129,3,30,15,0,128, + 127,1,0,0,0,128,129,1,0,0,0,129,25,1,0,0,0,130,135,3,18,9,0,131,135,3, + 20,10,0,132,135,3,22,11,0,133,135,3,24,12,0,134,130,1,0,0,0,134,131,1, + 0,0,0,134,132,1,0,0,0,134,133,1,0,0,0,135,27,1,0,0,0,136,141,5,23,0,0, + 137,138,5,21,0,0,138,140,5,23,0,0,139,137,1,0,0,0,140,143,1,0,0,0,141, + 139,1,0,0,0,141,142,1,0,0,0,142,29,1,0,0,0,143,141,1,0,0,0,144,145,7,2, + 0,0,145,31,1,0,0,0,146,147,7,3,0,0,147,33,1,0,0,0,16,37,43,49,53,58,63, + 76,82,92,98,110,120,124,128,134,141 + }; + + public static readonly ATN _ATN = + new ATNDeserializer().Deserialize(_serializedATN); + + +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs new file mode 100644 index 00000000..658bbffc --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs @@ -0,0 +1,138 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using Antlr4.Runtime.Misc; +using Antlr4.Runtime.Tree; +using IToken = Antlr4.Runtime.IToken; + +/// +/// This interface defines a complete generic visitor for a parse tree produced +/// by . +/// +/// The return type of the visit operation. +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.CLSCompliant(false)] +public interface IkebnfVisitor : IParseTreeVisitor { + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSpecification([NotNull] kebnfParser.SpecificationContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitRule_definition([NotNull] kebnfParser.Rule_definitionContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitParameter_list([NotNull] kebnfParser.Parameter_listContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAlternatives([NotNull] kebnfParser.AlternativesContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAlternative([NotNull] kebnfParser.AlternativeContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElement([NotNull] kebnfParser.ElementContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitAssignment([NotNull] kebnfParser.AssignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNon_parsing_assignment([NotNull] kebnfParser.Non_parsing_assignmentContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNon_parsing_empty([NotNull] kebnfParser.Non_parsing_emptyContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitCross_reference([NotNull] kebnfParser.Cross_referenceContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitGroup([NotNull] kebnfParser.GroupContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitTerminal([NotNull] kebnfParser.TerminalContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitNon_terminal([NotNull] kebnfParser.Non_terminalContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitElement_core([NotNull] kebnfParser.Element_coreContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitDotted_id([NotNull] kebnfParser.Dotted_idContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitSuffix_op([NotNull] kebnfParser.Suffix_opContext context); + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitValue_literal([NotNull] kebnfParser.Value_literalContext context); +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs new file mode 100644 index 00000000..19d83112 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + /// + /// Defines the assignment element + /// + public class AssignmentElement: RuleElement + { + /// + /// Gets or set the property's name + /// + public string Property { get; set; } + + /// + /// Gets or sets the assignment operator + /// + public string Operator { get; set; } + + /// + /// Getss or sets the assignment value + /// + public RuleElement Value { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs new file mode 100644 index 00000000..c6fb5b1a --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs @@ -0,0 +1,35 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + using System.Collections.Generic; + + /// + /// Defines a group of + /// + public class GroupElement: RuleElement + { + /// + /// All that are part of the group + /// + public List Elements { get; } = []; + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/NonParsingAssignmentElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/NonParsingAssignmentElement.cs new file mode 100644 index 00000000..54060b60 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/NonParsingAssignmentElement.cs @@ -0,0 +1,43 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + /// + /// Defines the non-parsing assignment element + /// + public class NonParsingAssignmentElement : RuleElement + { + /// + /// Gets or sets the property's name + /// + public string PropertyName { get; set; } + + /// + /// Gets or sets the assignment operator + /// + public string Operator { get; set; } + + /// + /// Gets or sets the assigned value + /// + public string Value { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/NonTerminalElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/NonTerminalElement.cs new file mode 100644 index 00000000..48d3d91a --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/NonTerminalElement.cs @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + /// + /// Describes a non-terminal Element + /// + public class NonTerminalElement: RuleElement + { + /// + /// Gets or sets the non-terminal element name + /// + public string Name { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs new file mode 100644 index 00000000..c7858dfb --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs @@ -0,0 +1,55 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + using System.Linq; + + /// + /// Base class that provides information about element that is part of a rule + /// + public abstract class RuleElement + { + /// + /// Defines all suffix that defines optional elements + /// + private static readonly string[] OptionalSuffix = ["?", "*"]; + + /// + /// Defines all suffix that defines collection elements + /// + private static readonly string[] CollectionSuffix = ["*", "+"]; + + /// + /// Gets or sets an optional suffix + /// + public string Suffix { get; set; } + + /// + /// Asserts that the current rule element defines an optional element + /// + public bool IsOptional => !string.IsNullOrEmpty(this.Suffix) && OptionalSuffix.Contains(this.Suffix); + + /// + /// Asserts that the current rule element defines an collection element + /// + public bool IsCollection => !string.IsNullOrEmpty(this.Suffix) && CollectionSuffix.Contains(this.Suffix); + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/RuleParameter.cs b/SysML2.NET.CodeGenerator/Grammar/Model/RuleParameter.cs new file mode 100644 index 00000000..aa497875 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/RuleParameter.cs @@ -0,0 +1,38 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + /// + /// Defines possible parameter that could be added to a + /// + public class RuleParameter + { + /// + /// Gets the parameter's name + /// + public string ParameterName { get; set; } + + /// + /// Gets the name of the target Element + /// + public string TargetElementName { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/TerminalElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/TerminalElement.cs new file mode 100644 index 00000000..ac2f8abe --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/TerminalElement.cs @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + /// + /// Describes a terminal Element + /// + public class TerminalElement: RuleElement + { + /// + /// Gets or sets the terminal element value + /// + public string Value { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs new file mode 100644 index 00000000..957fb5d5 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs @@ -0,0 +1,50 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + using System.Collections.Generic; + + /// + /// Describe the content of a rule + /// + public class TextualNotationRule + { + /// + /// Get or set rule's name + /// + public string RuleName { get; set; } + + /// + /// Gets or set the name of the KerML Element that the rule target + /// + public string TargetElementName { get; set; } + + /// + /// Gets or set an optional + /// + public RuleParameter Parameter { get; set; } + + /// + /// Gets the collection of defined + /// + public List Elements { get; } = []; + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationSpecification.cs b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationSpecification.cs new file mode 100644 index 00000000..affae75c --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationSpecification.cs @@ -0,0 +1,35 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + using System.Collections.Generic; + + /// + /// Provides access to all defined into the textual notation specification + /// + public class TextualNotationSpecification + { + /// + /// Gets the collection of all + /// + public List Rules { get; } = []; + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs new file mode 100644 index 00000000..a5fcd1b6 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs @@ -0,0 +1,180 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar +{ + using System.Collections.Generic; + using System.Linq; + + using SysML2.NET.CodeGenerator.Grammar.Model; + + /// + /// Custom to read + /// + public class TextualNotationSpecificationVisitor: kebnfBaseVisitor + { + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitSpecification(kebnfParser.SpecificationContext context) + { + var specification = new TextualNotationSpecification(); + + specification.Rules.AddRange(context.rule_definition().Select(rule => (TextualNotationRule)this.Visit(rule))); + return specification; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as + public override object VisitRule_definition(kebnfParser.Rule_definitionContext context) + { + var rule = new TextualNotationRule() + { + RuleName = context.name.Text, + TargetElementName = context.name.Text + }; + + if (context.parameter_list() != null) + { + rule.Parameter = new RuleParameter() + { + ParameterName = context.parameter_list().param_name.Text, + TargetElementName = context.parameter_list().param_type.Text + }; + } + + rule.Elements.AddRange((List)this.Visit(context.rule_body)); + return rule; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as a collection of + public override object VisitAlternatives(kebnfParser.AlternativesContext context) + { + return context.alternative().Select(a => (Alternatives)this.Visit(a)).SelectMany(x => x.Elements).ToList(); + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as an . + public override object VisitAlternative(kebnfParser.AlternativeContext context) + { + var alternatives = new Alternatives(); + alternatives.Elements.AddRange(context.element().Select(e => (RuleElement)this.Visit(e))); + return alternatives; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitAssignment(kebnfParser.AssignmentContext context) + { + return new AssignmentElement() + { + Property = context.property.GetText(), + Operator = context.op.Text, + Suffix = context.suffix?.GetText(), + Value = (RuleElement)this.Visit(context.content) + }; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as + public override object VisitNon_parsing_assignment(kebnfParser.Non_parsing_assignmentContext context) + { + return new NonParsingAssignmentElement() + { + PropertyName = context.property.GetText(), + Operator = context.op.Text, + Value = context.val.GetText() + }; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitGroup(kebnfParser.GroupContext context) + { + var group = new GroupElement() + { + Suffix = context.suffix?.GetText(), + }; + + group.Elements.AddRange((List)this.Visit(context.alternatives())); + return group; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitTerminal(kebnfParser.TerminalContext context) + { + return new TerminalElement() + { + Value = context.val.GetText().Trim('\''), + Suffix = context.suffix?.GetText() + }; + } + + /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result, as . + public override object VisitNon_terminal(kebnfParser.Non_terminalContext context) + { + return new NonTerminalElement() + { + Name = context.name.Text, + Suffix = context.suffix?.GetText() + }; + } + + /// + /// Provides mapping data class for the alternative grammar part + /// + private class Alternatives + { + /// + /// Gets a collection of that is part of the + /// + public List Elements { get; } = []; + } + } +} diff --git a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj index eb2f99cc..355fc1dc 100644 --- a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj +++ b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj @@ -19,6 +19,7 @@ en-US + @@ -229,4 +230,17 @@ Always + + + datamodel\kebnf.g4 + + + datamodel\KerML-textual-bnf.kebnf + Always + + + datamodel\SysML-textual-bnf.kebnf + Always + + \ No newline at end of file From f2d35e25625f06eacd40ad888276d48d22c56abd Mon Sep 17 00:00:00 2001 From: atheate Date: Thu, 19 Feb 2026 15:36:57 +0100 Subject: [PATCH 02/15] [WIP] First draft of Code-Gen --- ...tualNotationBuilderGeneratorTestFixture.cs | 71 ++ .../UmlCoreTextualNotationBuilderGenerator.cs | 199 +++++ .../Grammar/GrammarLoader.cs | 57 ++ .../SysML2.NET.CodeGenerator.csproj | 6 + ...xtual-notation-builder-facade-template.hbs | 60 ++ ...core-textual-notation-builder-template.hbs | 57 ++ ...AcceptActionUsageTextualNotationBuilder.cs | 56 ++ .../ActionDefinitionTextualNotationBuilder.cs | 56 ++ .../ActionUsageTextualNotationBuilder.cs | 56 ++ .../ActorMembershipTextualNotationBuilder.cs | 56 ++ ...ocationDefinitionTextualNotationBuilder.cs | 56 ++ .../AllocationUsageTextualNotationBuilder.cs | 56 ++ ...sisCaseDefinitionTextualNotationBuilder.cs | 56 ++ ...AnalysisCaseUsageTextualNotationBuilder.cs | 56 ++ ...AnnotatingElementTextualNotationBuilder.cs | 56 ++ .../AnnotationTextualNotationBuilder.cs | 56 ++ ...rtConstraintUsageTextualNotationBuilder.cs | 56 ++ ...gnmentActionUsageTextualNotationBuilder.cs | 56 ++ ...ociationStructureTextualNotationBuilder.cs | 56 ++ .../AssociationTextualNotationBuilder.cs | 56 ++ ...tributeDefinitionTextualNotationBuilder.cs | 56 ++ .../AttributeUsageTextualNotationBuilder.cs | 56 ++ .../BehaviorTextualNotationBuilder.cs | 56 ++ ...gConnectorAsUsageTextualNotationBuilder.cs | 56 ++ .../BindingConnectorTextualNotationBuilder.cs | 56 ++ ...BooleanExpressionTextualNotationBuilder.cs | 56 ++ ...ulationDefinitionTextualNotationBuilder.cs | 56 ++ .../CalculationUsageTextualNotationBuilder.cs | 56 ++ .../CaseDefinitionTextualNotationBuilder.cs | 56 ++ .../CaseUsageTextualNotationBuilder.cs | 56 ++ .../ClassTextualNotationBuilder.cs | 56 ++ .../ClassifierTextualNotationBuilder.cs | 56 ++ ...CollectExpressionTextualNotationBuilder.cs | 56 ++ .../CommentTextualNotationBuilder.cs | 56 ++ ...ConcernDefinitionTextualNotationBuilder.cs | 56 ++ .../ConcernUsageTextualNotationBuilder.cs | 56 ++ ...tedPortDefinitionTextualNotationBuilder.cs | 56 ++ ...jugatedPortTypingTextualNotationBuilder.cs | 56 ++ .../ConjugationTextualNotationBuilder.cs | 56 ++ ...nectionDefinitionTextualNotationBuilder.cs | 56 ++ .../ConnectionUsageTextualNotationBuilder.cs | 56 ++ .../ConnectorTextualNotationBuilder.cs | 56 ++ ...straintDefinitionTextualNotationBuilder.cs | 56 ++ .../ConstraintUsageTextualNotationBuilder.cs | 56 ++ ...tructorExpressionTextualNotationBuilder.cs | 56 ++ .../CrossSubsettingTextualNotationBuilder.cs | 56 ++ .../DataTypeTextualNotationBuilder.cs | 56 ++ .../DecisionNodeTextualNotationBuilder.cs | 56 ++ .../DefinitionTextualNotationBuilder.cs | 56 ++ .../DependencyTextualNotationBuilder.cs | 56 ++ .../DifferencingTextualNotationBuilder.cs | 56 ++ .../DisjoiningTextualNotationBuilder.cs | 56 ++ .../DocumentationTextualNotationBuilder.cs | 56 ++ ...tFilterMembershipTextualNotationBuilder.cs | 56 ++ ...FeatureMembershipTextualNotationBuilder.cs | 56 ++ ...erationDefinitionTextualNotationBuilder.cs | 56 ++ .../EnumerationUsageTextualNotationBuilder.cs | 56 ++ ...ntOccurrenceUsageTextualNotationBuilder.cs | 56 ++ ...ExhibitStateUsageTextualNotationBuilder.cs | 56 ++ .../ExpressionTextualNotationBuilder.cs | 56 ++ ...reChainExpressionTextualNotationBuilder.cs | 56 ++ .../FeatureChainingTextualNotationBuilder.cs | 56 ++ .../FeatureInvertingTextualNotationBuilder.cs | 56 ++ ...FeatureMembershipTextualNotationBuilder.cs | 56 ++ ...ferenceExpressionTextualNotationBuilder.cs | 56 ++ .../FeatureTextualNotationBuilder.cs | 56 ++ .../FeatureTypingTextualNotationBuilder.cs | 56 ++ .../FeatureValueTextualNotationBuilder.cs | 56 ++ .../FlowDefinitionTextualNotationBuilder.cs | 56 ++ .../FlowEndTextualNotationBuilder.cs | 56 ++ .../FlowTextualNotationBuilder.cs | 56 ++ .../FlowUsageTextualNotationBuilder.cs | 56 ++ ...orLoopActionUsageTextualNotationBuilder.cs | 56 ++ .../ForkNodeTextualNotationBuilder.cs | 56 ++ ...ConcernMembershipTextualNotationBuilder.cs | 56 ++ .../FunctionTextualNotationBuilder.cs | 56 ++ .../IfActionUsageTextualNotationBuilder.cs | 56 ++ ...cludeUseCaseUsageTextualNotationBuilder.cs | 56 ++ .../IndexExpressionTextualNotationBuilder.cs | 56 ++ .../InteractionTextualNotationBuilder.cs | 56 ++ ...terfaceDefinitionTextualNotationBuilder.cs | 56 ++ .../InterfaceUsageTextualNotationBuilder.cs | 56 ++ .../IntersectingTextualNotationBuilder.cs | 56 ++ .../InvariantTextualNotationBuilder.cs | 56 ++ ...ocationExpressionTextualNotationBuilder.cs | 56 ++ .../ItemDefinitionTextualNotationBuilder.cs | 56 ++ .../ItemUsageTextualNotationBuilder.cs | 56 ++ .../JoinNodeTextualNotationBuilder.cs | 56 ++ .../LibraryPackageTextualNotationBuilder.cs | 56 ++ .../LiteralBooleanTextualNotationBuilder.cs | 56 ++ ...LiteralExpressionTextualNotationBuilder.cs | 56 ++ .../LiteralInfinityTextualNotationBuilder.cs | 56 ++ .../LiteralIntegerTextualNotationBuilder.cs | 56 ++ .../LiteralRationalTextualNotationBuilder.cs | 56 ++ .../LiteralStringTextualNotationBuilder.cs | 56 ++ .../MembershipExposeTextualNotationBuilder.cs | 56 ++ .../MembershipImportTextualNotationBuilder.cs | 56 ++ .../MembershipTextualNotationBuilder.cs | 56 ++ .../MergeNodeTextualNotationBuilder.cs | 56 ++ .../MetaclassTextualNotationBuilder.cs | 56 ++ ...aAccessExpressionTextualNotationBuilder.cs | 56 ++ ...etadataDefinitionTextualNotationBuilder.cs | 56 ++ .../MetadataFeatureTextualNotationBuilder.cs | 56 ++ .../MetadataUsageTextualNotationBuilder.cs | 56 ++ ...MultiplicityRangeTextualNotationBuilder.cs | 56 ++ .../MultiplicityTextualNotationBuilder.cs | 56 ++ .../NamespaceExposeTextualNotationBuilder.cs | 56 ++ .../NamespaceImportTextualNotationBuilder.cs | 56 ++ .../NamespaceTextualNotationBuilder.cs | 56 ++ .../NullExpressionTextualNotationBuilder.cs | 56 ++ ...jectiveMembershipTextualNotationBuilder.cs | 56 ++ ...urrenceDefinitionTextualNotationBuilder.cs | 56 ++ .../OccurrenceUsageTextualNotationBuilder.cs | 56 ++ ...peratorExpressionTextualNotationBuilder.cs | 56 ++ .../OwningMembershipTextualNotationBuilder.cs | 56 ++ .../PackageTextualNotationBuilder.cs | 56 ++ ...rameterMembershipTextualNotationBuilder.cs | 56 ++ .../PartDefinitionTextualNotationBuilder.cs | 56 ++ .../PartUsageTextualNotationBuilder.cs | 56 ++ .../PayloadFeatureTextualNotationBuilder.cs | 56 ++ ...erformActionUsageTextualNotationBuilder.cs | 56 ++ .../PortConjugationTextualNotationBuilder.cs | 56 ++ .../PortDefinitionTextualNotationBuilder.cs | 56 ++ .../PortUsageTextualNotationBuilder.cs | 56 ++ .../PredicateTextualNotationBuilder.cs | 56 ++ .../RedefinitionTextualNotationBuilder.cs | 56 ++ ...ferenceSubsettingTextualNotationBuilder.cs | 56 ++ .../ReferenceUsageTextualNotationBuilder.cs | 56 ++ ...nderingDefinitionTextualNotationBuilder.cs | 56 ++ .../RenderingUsageTextualNotationBuilder.cs | 56 ++ ...straintMembershipTextualNotationBuilder.cs | 56 ++ ...irementDefinitionTextualNotationBuilder.cs | 56 ++ .../RequirementUsageTextualNotationBuilder.cs | 56 ++ ...icationMembershipTextualNotationBuilder.cs | 56 ++ ...ressionMembershipTextualNotationBuilder.cs | 56 ++ ...rameterMembershipTextualNotationBuilder.cs | 56 ++ ...yRequirementUsageTextualNotationBuilder.cs | 56 ++ .../SelectExpressionTextualNotationBuilder.cs | 56 ++ .../SendActionUsageTextualNotationBuilder.cs | 56 ++ .../SpecializationTextualNotationBuilder.cs | 56 ++ ...eholderMembershipTextualNotationBuilder.cs | 56 ++ .../StateDefinitionTextualNotationBuilder.cs | 56 ++ ...bactionMembershipTextualNotationBuilder.cs | 56 ++ .../StateUsageTextualNotationBuilder.cs | 56 ++ .../StepTextualNotationBuilder.cs | 56 ++ .../StructureTextualNotationBuilder.cs | 56 ++ ...SubclassificationTextualNotationBuilder.cs | 56 ++ ...SubjectMembershipTextualNotationBuilder.cs | 56 ++ .../SubsettingTextualNotationBuilder.cs | 56 ++ ...SuccessionAsUsageTextualNotationBuilder.cs | 56 ++ .../SuccessionFlowTextualNotationBuilder.cs | 56 ++ ...ccessionFlowUsageTextualNotationBuilder.cs | 56 ++ .../SuccessionTextualNotationBuilder.cs | 56 ++ ...minateActionUsageTextualNotationBuilder.cs | 56 ++ .../TextualNotationBuilderFacade.cs | 722 ++++++++++++++++++ ...ualRepresentationTextualNotationBuilder.cs | 56 ++ ...FeatureMembershipTextualNotationBuilder.cs | 56 ++ .../TransitionUsageTextualNotationBuilder.cs | 56 ++ ...ocationExpressionTextualNotationBuilder.cs | 56 ++ .../TypeFeaturingTextualNotationBuilder.cs | 56 ++ .../TypeTextualNotationBuilder.cs | 56 ++ .../UnioningTextualNotationBuilder.cs | 56 ++ .../UsageTextualNotationBuilder.cs | 56 ++ ...UseCaseDefinitionTextualNotationBuilder.cs | 56 ++ .../UseCaseUsageTextualNotationBuilder.cs | 56 ++ ...VariantMembershipTextualNotationBuilder.cs | 56 ++ ...ionCaseDefinitionTextualNotationBuilder.cs | 56 ++ ...ficationCaseUsageTextualNotationBuilder.cs | 56 ++ .../ViewDefinitionTextualNotationBuilder.cs | 56 ++ ...nderingMembershipTextualNotationBuilder.cs | 56 ++ .../ViewUsageTextualNotationBuilder.cs | 56 ++ ...ewpointDefinitionTextualNotationBuilder.cs | 56 ++ .../ViewpointUsageTextualNotationBuilder.cs | 56 ++ ...leLoopActionUsageTextualNotationBuilder.cs | 56 ++ .../ITextualNotationBuilderFacade.cs | 37 + .../TextualNotation/TextualNotationBuilder.cs | 52 ++ 176 files changed, 10613 insertions(+) create mode 100644 SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs create mode 100644 SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/GrammarLoader.cs create mode 100644 SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs create mode 100644 SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualNotationBuilderFacade.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/ITextualNotationBuilderFacade.cs create mode 100644 SysML2.NET/TextualNotation/TextualNotationBuilder.cs diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs new file mode 100644 index 00000000..373705c5 --- /dev/null +++ b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs @@ -0,0 +1,71 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Tests.Generators.UmlHandleBarsGenerators +{ + using System.IO; + using System.Linq; + using System.Threading.Tasks; + + using NUnit.Framework; + + using SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators; + using SysML2.NET.CodeGenerator.Grammar; + using SysML2.NET.CodeGenerator.Grammar.Model; + + [TestFixture] + public class UmlCoreTextualNotationBuilderGeneratorTestFixture + { + private DirectoryInfo umlPocoDirectoryInfo; + private UmlCoreTextualNotationBuilderGenerator umlCoreTextualNotationBuilderGenerator; + private TextualNotationSpecification textualNotationSpecification; + + [OneTimeSetUp] + public void OneTimeSetup() + { + var directoryInfo = new DirectoryInfo(TestContext.CurrentContext.TestDirectory); + + var path = Path.Combine("UML", "_SysML2.NET.Core.UmlCoreTextualNotationBuilderGenerator"); + + this.umlPocoDirectoryInfo = directoryInfo.CreateSubdirectory(path); + this.umlCoreTextualNotationBuilderGenerator = new UmlCoreTextualNotationBuilderGenerator(); + + var textualRulesFolder = Path.Combine(TestContext.CurrentContext.TestDirectory, "datamodel"); + var kermlRules = GrammarLoader.LoadTextualNotationSpecification(Path.Combine(textualRulesFolder, "KerML-textual-bnf.kebnf")); + var sysmlRules = GrammarLoader.LoadTextualNotationSpecification(Path.Combine(textualRulesFolder, "SysML-textual-bnf.kebnf")); + + var combinesRules = new TextualNotationSpecification(); + combinesRules.Rules.AddRange(sysmlRules.Rules); + + foreach (var rule in kermlRules.Rules.Where(rule => combinesRules.Rules.All(r => r.RuleName != rule.RuleName))) + { + combinesRules.Rules.Add(rule); + } + + this.textualNotationSpecification = combinesRules; + } + + [Test] + public async Task VerifyCanGenerateTextualNotation() + { + await Assert.ThatAsync(() => this.umlCoreTextualNotationBuilderGenerator.GenerateAsync(GeneratorSetupFixture.XmiReaderResult, this.textualNotationSpecification, this.umlPocoDirectoryInfo), Throws.Nothing); + } + } +} diff --git a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs new file mode 100644 index 00000000..aa04cba9 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs @@ -0,0 +1,199 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Generators.UmlHandleBarsGenerators +{ + using System; + using System.IO; + using System.Linq; + using System.Threading.Tasks; + + using SysML2.NET.CodeGenerator.Extensions; + using SysML2.NET.CodeGenerator.Grammar.Model; + + using uml4net.Extensions; + using uml4net.HandleBars; + using uml4net.StructuredClassifiers; + using uml4net.xmi.Readers; + + using NamedElementHelper = SysML2.NET.CodeGenerator.HandleBarHelpers.NamedElementHelper; + + /// + /// An to generate Textual Notation Builder + /// + public class UmlCoreTextualNotationBuilderGenerator: UmlHandleBarsGenerator + { + /// + /// Gets the name of template for builder classes + /// + private const string BuilderTemplateName = "core-textual-notation-builder-template"; + + /// + /// Gets the name of template for builder facade class + /// + private const string BuilderFacadeTemplateName = "core-textual-notation-builder-facade-template"; + + /// + /// Register the custom helpers + /// + protected override void RegisterHelpers() + { + NamedElementHelper.RegisterNamedElementHelper(this.Handlebars); + this.Handlebars.RegisterStringHelper(); + } + + /// + /// Register the code templates + /// + protected override void RegisterTemplates() + { + this.RegisterTemplate(BuilderTemplateName); + this.RegisterTemplate(BuilderFacadeTemplateName); + } + + /// + /// Generates code specific to the concrete implementation + /// + /// + /// the that contains the UML model to generate from + /// + /// + /// The target + /// + /// This method cannot be used since it requires to have . Uses + /// + /// an awaitable + /// + public override Task GenerateAsync(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + throw new NotSupportedException("The generator needs TextualNotationSpecification access"); + } + + /// + /// Generates code specific to the concrete implementation + /// + /// + /// the that contains the UML model to generate from + /// + /// The that contains specific grammar rules to produce textual notation + /// + /// The target + /// + /// + /// an awaitable + /// + public async Task GenerateAsync(XmiReaderResult xmiReaderResult, TextualNotationSpecification textualNotationSpecification, DirectoryInfo outputDirectory) + { + await this.GenerateBuilderClasses(xmiReaderResult, textualNotationSpecification, outputDirectory); + await this.GenerateBuilderFacade(xmiReaderResult, outputDirectory); + } + + /// + /// Generates Textual Notation builder classes for each concrete + /// + /// + /// the that contains the UML model to generate from + /// + /// The that contains specific grammar rules to produce textual notation + /// + /// The target + /// + /// If one of the given parameters is null + /// + /// an awaitable + /// + private Task GenerateBuilderClasses(XmiReaderResult xmiReaderResult, TextualNotationSpecification textualNotationSpecification, DirectoryInfo outputDirectory) + { + ArgumentNullException.ThrowIfNull(xmiReaderResult); + ArgumentNullException.ThrowIfNull(textualNotationSpecification); + ArgumentNullException.ThrowIfNull(outputDirectory); + + return this.GenerateBuilderClassesInternal(xmiReaderResult, textualNotationSpecification, outputDirectory); + } + + /// + /// Generates Textual Notation builder classes for each concrete + /// + /// + /// the that contains the UML model to generate from + /// + /// The that contains specific grammar rules to produce textual notation + /// + /// The target + /// + /// + /// an awaitable + /// + private async Task GenerateBuilderClassesInternal(XmiReaderResult xmiReaderResult, TextualNotationSpecification textualNotationSpecification, DirectoryInfo outputDirectory) + { + var template = this.Templates[BuilderTemplateName]; + + var classes = xmiReaderResult.QueryContainedAndImported("SysML") + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .ToList(); + + foreach (var umlClass in classes) + { + var generatedBuilder = template(umlClass); + generatedBuilder = this.CodeCleanup(generatedBuilder); + + var fileName = $"{umlClass.Name.CapitalizeFirstLetter()}TextualNotationBuilder.cs"; + + await WriteAsync(generatedBuilder, outputDirectory, fileName); + } + } + + /// + /// Generates the Textual Notation builder facade + /// + /// the that contains the UML model to generate from + /// The target + /// If one of the given parameters is null + /// an awaitable + private Task GenerateBuilderFacade(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + ArgumentNullException.ThrowIfNull(xmiReaderResult); + ArgumentNullException.ThrowIfNull(outputDirectory); + return this.GenerateBuilderFacadeInternal(xmiReaderResult, outputDirectory); + } + + /// + /// Generates the Textual Notation builder facade + /// + /// the that contains the UML model to generate from + /// The target + /// an awaitable + private async Task GenerateBuilderFacadeInternal(XmiReaderResult xmiReaderResult, DirectoryInfo outputDirectory) + { + var template = this.Templates[BuilderFacadeTemplateName]; + + var classes = xmiReaderResult.QueryContainedAndImported("SysML") + .SelectMany(x => x.PackagedElement.OfType()) + .Where(x => !x.IsAbstract) + .ToList(); + + var generatedFacade = template(classes); + generatedFacade = this.CodeCleanup(generatedFacade); + + await WriteAsync(generatedFacade, outputDirectory, "TextualNotationBuilderFacade.cs"); + } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/GrammarLoader.cs b/SysML2.NET.CodeGenerator/Grammar/GrammarLoader.cs new file mode 100644 index 00000000..9aa3d884 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/GrammarLoader.cs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar +{ + using System.IO; + + using Antlr4.Runtime; + + using SysML2.NET.CodeGenerator.Grammar.Model; + + /// + /// Provides direct access to by providing file path + /// + public static class GrammarLoader + { + /// + /// Loads the + /// + /// The string uri that locates the KEBNF file to load + /// The loaded + /// If the does not locate an existing + public static TextualNotationSpecification LoadTextualNotationSpecification(string fileUri) + { + if (!File.Exists(fileUri)) + { + throw new FileNotFoundException("File not found", fileUri); + } + + var stream = CharStreams.fromPath(fileUri); + var lexer = new kebnfLexer(stream); + var tokens = new CommonTokenStream(lexer); + var parser = new kebnfParser(tokens); + + var tree = parser.specification(); + var explorer = new TextualNotationSpecificationVisitor(); + return (TextualNotationSpecification)explorer.Visit(tree); + } + } +} diff --git a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj index 355fc1dc..57428a5f 100644 --- a/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj +++ b/SysML2.NET.CodeGenerator/SysML2.NET.CodeGenerator.csproj @@ -212,6 +212,12 @@ Always + + Always + + + Always + diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs new file mode 100644 index 00000000..e41972e0 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs @@ -0,0 +1,60 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides access to built textual notation for via + /// + public class TextualNotationBuilderFacade: ITextualNotationBuilderFacade + { + /// + /// Queries the Textual Notation of an + /// + /// The to built textual notation from + /// The built textual notation string + public string QueryTextualNotationOfElement(IElement element) + { + switch (element) + { + {{#each this as | class |}} + case SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{ this.Name }} poco{{ this.Name }}: + var {{String.LowerCaseFirstLetter this.Name }}TextualNotationBuilder = new {{ this.Name }}TextualNotationBuilder(this); + return {{String.LowerCaseFirstLetter this.Name }}TextualNotationBuilder.BuildTextualNotation(poco{{ this.Name }}); + + {{/each}} + default: + throw new ArgumentOutOfRangeException(nameof(element), "Provided element is not supported"); + } + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs new file mode 100644 index 00000000..97f881e3 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs @@ -0,0 +1,57 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class {{this.Name}}TextualNotationBuilder: TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public {{this.Name}}TextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{ this.Name }} poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + \ No newline at end of file diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..a057be8f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AcceptActionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AcceptActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.AcceptActionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..c0a1f991 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ActionDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ActionDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ActionDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..9e9b7320 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ActionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ActionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..fc181961 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ActorMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ActorMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.ActorMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..23b3a5d7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AllocationDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AllocationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Allocations.AllocationDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..cddc6e71 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AllocationUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AllocationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Allocations.AllocationUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..d376b8d3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AnalysisCaseDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AnalysisCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..fd693722 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AnalysisCaseUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AnalysisCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs new file mode 100644 index 00000000..7f9b8724 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AnnotatingElementTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AnnotatingElementTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.AnnotatingElement poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs new file mode 100644 index 00000000..559818d2 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AnnotationTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AnnotationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.Annotation poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..a2106272 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AssertConstraintUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AssertConstraintUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Constraints.AssertConstraintUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..1fc7f5e7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AssignmentActionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AssignmentActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.AssignmentActionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs new file mode 100644 index 00000000..30b1950d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AssociationStructureTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AssociationStructureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Associations.AssociationStructure poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs new file mode 100644 index 00000000..4f3bfb17 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AssociationTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AssociationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Associations.Association poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..0f4ea18f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AttributeDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AttributeDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Attributes.AttributeDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..ae50325d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class AttributeUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public AttributeUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Attributes.AttributeUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs new file mode 100644 index 00000000..232c3f5e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class BehaviorTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public BehaviorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Behaviors.Behavior poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..ceac3e0b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class BindingConnectorAsUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public BindingConnectorAsUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.BindingConnectorAsUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs new file mode 100644 index 00000000..0bb69c31 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class BindingConnectorTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public BindingConnectorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Connectors.BindingConnector poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..65c9e7eb --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class BooleanExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public BooleanExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.BooleanExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..59293bee --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class CalculationDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public CalculationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Calculations.CalculationDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..562cdf64 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class CalculationUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public CalculationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Calculations.CalculationUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..aaffa984 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class CaseDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public CaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Cases.CaseDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..9382d1f7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class CaseUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public CaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Cases.CaseUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs new file mode 100644 index 00000000..ac192b74 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ClassTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ClassTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Classes.Class poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs new file mode 100644 index 00000000..45f43954 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ClassifierTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ClassifierTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Classifiers.Classifier poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..8cc44e44 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class CollectExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public CollectExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.CollectExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs new file mode 100644 index 00000000..f2560afd --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class CommentTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public CommentTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.Comment poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..56613677 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConcernDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConcernDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.ConcernDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..d4344613 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConcernUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConcernUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.ConcernUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..c35af26b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConjugatedPortDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConjugatedPortDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs new file mode 100644 index 00000000..773c4da5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConjugatedPortTypingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConjugatedPortTypingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortTyping poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs new file mode 100644 index 00000000..9f6b63e5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConjugationTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConjugationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Conjugation poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..5ff8d1b9 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConnectionDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConnectionDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.ConnectionDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..555cc96e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConnectionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConnectionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.ConnectionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs new file mode 100644 index 00000000..28988131 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConnectorTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConnectorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Connectors.Connector poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..64abd164 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConstraintDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConstraintDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Constraints.ConstraintDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..648cef38 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConstraintUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConstraintUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Constraints.ConstraintUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..726aa707 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ConstructorExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ConstructorExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.ConstructorExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs new file mode 100644 index 00000000..d2287a2f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class CrossSubsettingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public CrossSubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.CrossSubsetting poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs new file mode 100644 index 00000000..50ee12ae --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class DataTypeTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public DataTypeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.DataTypes.DataType poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs new file mode 100644 index 00000000..b9702f8a --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class DecisionNodeTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public DecisionNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.DecisionNode poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..29ee79ac --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class DefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public DefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Definition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs new file mode 100644 index 00000000..a8ebe9b6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class DependencyTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public DependencyTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Dependencies.Dependency poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs new file mode 100644 index 00000000..3082177e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class DifferencingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public DifferencingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Differencing poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs new file mode 100644 index 00000000..5ceaae51 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class DisjoiningTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public DisjoiningTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Disjoining poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs new file mode 100644 index 00000000..1ece483a --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class DocumentationTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public DocumentationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.Documentation poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..04b434fa --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ElementFilterMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ElementFilterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Packages.ElementFilterMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..6f8d4a1e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class EndFeatureMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public EndFeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.EndFeatureMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..ad96cb47 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class EnumerationDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public EnumerationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..a834048d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class EnumerationUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public EnumerationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..3789b0e7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class EventOccurrenceUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public EventOccurrenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Occurrences.EventOccurrenceUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..df31bfbf --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ExhibitStateUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ExhibitStateUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.ExhibitStateUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..308497c0 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Expression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..19670dbc --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FeatureChainExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FeatureChainExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.FeatureChainExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs new file mode 100644 index 00000000..18d69384 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FeatureChainingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FeatureChainingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.FeatureChaining poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs new file mode 100644 index 00000000..f413882f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FeatureInvertingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FeatureInvertingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.FeatureInverting poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..6455eba3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FeatureMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.FeatureMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..f3168215 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FeatureReferenceExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FeatureReferenceExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.FeatureReferenceExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs new file mode 100644 index 00000000..06e184cf --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FeatureTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.Feature poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs new file mode 100644 index 00000000..be37e6ff --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FeatureTypingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FeatureTypingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.FeatureTyping poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs new file mode 100644 index 00000000..41f2c911 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FeatureValueTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FeatureValueTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.FeatureValues.FeatureValue poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..8bb1986c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FlowDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FlowDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Flows.FlowDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs new file mode 100644 index 00000000..d3d875ab --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FlowEndTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FlowEndTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.FlowEnd poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs new file mode 100644 index 00000000..7205ef89 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FlowTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FlowTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.Flow poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..924473af --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FlowUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FlowUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Flows.FlowUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..f87ed1bb --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ForLoopActionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ForLoopActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ForLoopActionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs new file mode 100644 index 00000000..0703248e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ForkNodeTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ForkNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ForkNode poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..95b1c3db --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FramedConcernMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FramedConcernMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.FramedConcernMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs new file mode 100644 index 00000000..10c29640 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class FunctionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public FunctionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Function poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..c92456fe --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class IfActionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public IfActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.IfActionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..2b98ef33 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class IncludeUseCaseUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public IncludeUseCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.UseCases.IncludeUseCaseUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..c0234f57 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class IndexExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public IndexExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.IndexExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs new file mode 100644 index 00000000..661ecef7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class InteractionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public InteractionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.Interaction poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..4e4ef98f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class InterfaceDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public InterfaceDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..5d9c5911 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class InterfaceUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public InterfaceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs new file mode 100644 index 00000000..e637b316 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class IntersectingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public IntersectingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Intersecting poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs new file mode 100644 index 00000000..3823761f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class InvariantTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public InvariantTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Invariant poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..10001e4e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class InvocationExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public InvocationExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.InvocationExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..27431910 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ItemDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ItemDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Items.ItemDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..20a21075 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ItemUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ItemUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Items.ItemUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs new file mode 100644 index 00000000..a8acbff3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class JoinNodeTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public JoinNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.JoinNode poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs new file mode 100644 index 00000000..0d4012b8 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class LibraryPackageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public LibraryPackageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Packages.LibraryPackage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs new file mode 100644 index 00000000..2a90066f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class LiteralBooleanTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public LiteralBooleanTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralBoolean poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..ae091cad --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class LiteralExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public LiteralExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs new file mode 100644 index 00000000..6cf1bb30 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class LiteralInfinityTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public LiteralInfinityTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInfinity poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs new file mode 100644 index 00000000..147116ae --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class LiteralIntegerTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public LiteralIntegerTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInteger poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs new file mode 100644 index 00000000..c8b499bd --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class LiteralRationalTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public LiteralRationalTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralRational poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs new file mode 100644 index 00000000..4aff1cff --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class LiteralStringTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public LiteralStringTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralString poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs new file mode 100644 index 00000000..26b67df2 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MembershipExposeTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MembershipExposeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.MembershipExpose poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs new file mode 100644 index 00000000..5f6f73f1 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MembershipImportTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MembershipImportTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.MembershipImport poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..596f0685 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.Membership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs new file mode 100644 index 00000000..04858ab6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MergeNodeTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MergeNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.MergeNode poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs new file mode 100644 index 00000000..73f49827 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MetaclassTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MetaclassTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Metadata.Metaclass poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..21ad5ee7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MetadataAccessExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MetadataAccessExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.MetadataAccessExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..8551fb97 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MetadataDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MetadataDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Metadata.MetadataDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs new file mode 100644 index 00000000..74ebcb0d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MetadataFeatureTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MetadataFeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Metadata.MetadataFeature poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..d8f44f9d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MetadataUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MetadataUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Metadata.MetadataUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs new file mode 100644 index 00000000..45d03d82 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MultiplicityRangeTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MultiplicityRangeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Multiplicities.MultiplicityRange poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs new file mode 100644 index 00000000..b12a1877 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class MultiplicityTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public MultiplicityTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Multiplicity poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs new file mode 100644 index 00000000..b39486ad --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class NamespaceExposeTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public NamespaceExposeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.NamespaceExpose poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs new file mode 100644 index 00000000..e3c7988b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class NamespaceImportTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public NamespaceImportTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.NamespaceImport poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs new file mode 100644 index 00000000..9826ab5b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class NamespaceTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public NamespaceTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.Namespace poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..dc9a2ba4 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class NullExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public NullExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.NullExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..1d345283 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ObjectiveMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ObjectiveMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Cases.ObjectiveMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..150bd0b3 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class OccurrenceDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public OccurrenceDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..4ffded5e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class OccurrenceUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public OccurrenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..8f42dec7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class OperatorExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public OperatorExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.OperatorExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..2ac702d5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class OwningMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public OwningMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs new file mode 100644 index 00000000..bf9430be --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class PackageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public PackageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Packages.Package poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..fdbb5a85 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ParameterMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ParameterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Behaviors.ParameterMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..b2035ace --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class PartDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public PartDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Parts.PartDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..4029b06a --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class PartUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public PartUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Parts.PartUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs new file mode 100644 index 00000000..0c2ce859 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class PayloadFeatureTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public PayloadFeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.PayloadFeature poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..6b4b19a5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class PerformActionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public PerformActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.PerformActionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs new file mode 100644 index 00000000..9b135767 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class PortConjugationTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public PortConjugationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.PortConjugation poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..d8afb8df --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class PortDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public PortDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.PortDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..0767bb08 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class PortUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public PortUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.PortUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs new file mode 100644 index 00000000..e60633c5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class PredicateTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public PredicateTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Predicate poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..417bff22 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class RedefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public RedefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.Redefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs new file mode 100644 index 00000000..8f623a0f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ReferenceSubsettingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ReferenceSubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.ReferenceSubsetting poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..69cb2e00 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ReferenceUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ReferenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.ReferenceUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..45e90e18 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class RenderingDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public RenderingDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.RenderingDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..3ee43fca --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class RenderingUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public RenderingUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.RenderingUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..f677c608 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class RequirementConstraintMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public RequirementConstraintMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.RequirementConstraintMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..f47ba59d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class RequirementDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public RequirementDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.RequirementDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..412d6708 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class RequirementUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public RequirementUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.RequirementUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..532a4856 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class RequirementVerificationMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public RequirementVerificationMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.VerificationCases.RequirementVerificationMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..c2fade6a --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ResultExpressionMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ResultExpressionMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.ResultExpressionMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..34b0c6c2 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ReturnParameterMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ReturnParameterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.ReturnParameterMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..faaf6298 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SatisfyRequirementUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SatisfyRequirementUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.SatisfyRequirementUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..0248d379 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SelectExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SelectExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.SelectExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..089e72df --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SendActionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SendActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.SendActionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs new file mode 100644 index 00000000..8bcf649f --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SpecializationTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SpecializationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Specialization poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..1166d807 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class StakeholderMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public StakeholderMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.StakeholderMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..595ab509 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class StateDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public StateDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.StateDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..68e24065 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class StateSubactionMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public StateSubactionMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.StateSubactionMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..a8891cd8 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class StateUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public StateUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.StateUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs new file mode 100644 index 00000000..23a7d396 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class StepTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public StepTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Behaviors.Step poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs new file mode 100644 index 00000000..c5be5072 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class StructureTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public StructureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Structures.Structure poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs new file mode 100644 index 00000000..2c1f46d7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SubclassificationTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SubclassificationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Classifiers.Subclassification poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..098f9d64 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SubjectMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SubjectMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.SubjectMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs new file mode 100644 index 00000000..0a4ec260 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SubsettingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.Subsetting poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..4f273f55 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SuccessionAsUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SuccessionAsUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.SuccessionAsUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs new file mode 100644 index 00000000..1e9cc87d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SuccessionFlowTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SuccessionFlowTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.SuccessionFlow poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..5affca57 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SuccessionFlowUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SuccessionFlowUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Flows.SuccessionFlowUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs new file mode 100644 index 00000000..6a44b58a --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class SuccessionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public SuccessionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Connectors.Succession poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..0631c87b --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class TerminateActionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public TerminateActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.TerminateActionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualNotationBuilderFacade.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualNotationBuilderFacade.cs new file mode 100644 index 00000000..20ed5cb6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualNotationBuilderFacade.cs @@ -0,0 +1,722 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides access to built textual notation for via + /// + public class TextualNotationBuilderFacade : ITextualNotationBuilderFacade + { + /// + /// Queries the Textual Notation of an + /// + /// The to built textual notation from + /// The built textual notation string + public string QueryTextualNotationOfElement(IElement element) + { + switch (element) + { + case SysML2.NET.Core.POCO.Systems.Ports.PortUsage pocoPortUsage: + var portUsageTextualNotationBuilder = new PortUsageTextualNotationBuilder(this); + return portUsageTextualNotationBuilder.BuildTextualNotation(pocoPortUsage); + + case SysML2.NET.Core.POCO.Systems.Ports.PortDefinition pocoPortDefinition: + var portDefinitionTextualNotationBuilder = new PortDefinitionTextualNotationBuilder(this); + return portDefinitionTextualNotationBuilder.BuildTextualNotation(pocoPortDefinition); + + case SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortDefinition pocoConjugatedPortDefinition: + var conjugatedPortDefinitionTextualNotationBuilder = new ConjugatedPortDefinitionTextualNotationBuilder(this); + return conjugatedPortDefinitionTextualNotationBuilder.BuildTextualNotation(pocoConjugatedPortDefinition); + + case SysML2.NET.Core.POCO.Systems.Ports.PortConjugation pocoPortConjugation: + var portConjugationTextualNotationBuilder = new PortConjugationTextualNotationBuilder(this); + return portConjugationTextualNotationBuilder.BuildTextualNotation(pocoPortConjugation); + + case SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortTyping pocoConjugatedPortTyping: + var conjugatedPortTypingTextualNotationBuilder = new ConjugatedPortTypingTextualNotationBuilder(this); + return conjugatedPortTypingTextualNotationBuilder.BuildTextualNotation(pocoConjugatedPortTyping); + + case SysML2.NET.Core.POCO.Systems.Attributes.AttributeDefinition pocoAttributeDefinition: + var attributeDefinitionTextualNotationBuilder = new AttributeDefinitionTextualNotationBuilder(this); + return attributeDefinitionTextualNotationBuilder.BuildTextualNotation(pocoAttributeDefinition); + + case SysML2.NET.Core.POCO.Systems.Attributes.AttributeUsage pocoAttributeUsage: + var attributeUsageTextualNotationBuilder = new AttributeUsageTextualNotationBuilder(this); + return attributeUsageTextualNotationBuilder.BuildTextualNotation(pocoAttributeUsage); + + case SysML2.NET.Core.POCO.Systems.Actions.AcceptActionUsage pocoAcceptActionUsage: + var acceptActionUsageTextualNotationBuilder = new AcceptActionUsageTextualNotationBuilder(this); + return acceptActionUsageTextualNotationBuilder.BuildTextualNotation(pocoAcceptActionUsage); + + case SysML2.NET.Core.POCO.Systems.Actions.SendActionUsage pocoSendActionUsage: + var sendActionUsageTextualNotationBuilder = new SendActionUsageTextualNotationBuilder(this); + return sendActionUsageTextualNotationBuilder.BuildTextualNotation(pocoSendActionUsage); + + case SysML2.NET.Core.POCO.Systems.Actions.PerformActionUsage pocoPerformActionUsage: + var performActionUsageTextualNotationBuilder = new PerformActionUsageTextualNotationBuilder(this); + return performActionUsageTextualNotationBuilder.BuildTextualNotation(pocoPerformActionUsage); + + case SysML2.NET.Core.POCO.Systems.Actions.ForkNode pocoForkNode: + var forkNodeTextualNotationBuilder = new ForkNodeTextualNotationBuilder(this); + return forkNodeTextualNotationBuilder.BuildTextualNotation(pocoForkNode); + + case SysML2.NET.Core.POCO.Systems.Actions.JoinNode pocoJoinNode: + var joinNodeTextualNotationBuilder = new JoinNodeTextualNotationBuilder(this); + return joinNodeTextualNotationBuilder.BuildTextualNotation(pocoJoinNode); + + case SysML2.NET.Core.POCO.Systems.Actions.ActionUsage pocoActionUsage: + var actionUsageTextualNotationBuilder = new ActionUsageTextualNotationBuilder(this); + return actionUsageTextualNotationBuilder.BuildTextualNotation(pocoActionUsage); + + case SysML2.NET.Core.POCO.Systems.Actions.DecisionNode pocoDecisionNode: + var decisionNodeTextualNotationBuilder = new DecisionNodeTextualNotationBuilder(this); + return decisionNodeTextualNotationBuilder.BuildTextualNotation(pocoDecisionNode); + + case SysML2.NET.Core.POCO.Systems.Actions.MergeNode pocoMergeNode: + var mergeNodeTextualNotationBuilder = new MergeNodeTextualNotationBuilder(this); + return mergeNodeTextualNotationBuilder.BuildTextualNotation(pocoMergeNode); + + case SysML2.NET.Core.POCO.Systems.Actions.ActionDefinition pocoActionDefinition: + var actionDefinitionTextualNotationBuilder = new ActionDefinitionTextualNotationBuilder(this); + return actionDefinitionTextualNotationBuilder.BuildTextualNotation(pocoActionDefinition); + + case SysML2.NET.Core.POCO.Systems.Actions.IfActionUsage pocoIfActionUsage: + var ifActionUsageTextualNotationBuilder = new IfActionUsageTextualNotationBuilder(this); + return ifActionUsageTextualNotationBuilder.BuildTextualNotation(pocoIfActionUsage); + + case SysML2.NET.Core.POCO.Systems.Actions.ForLoopActionUsage pocoForLoopActionUsage: + var forLoopActionUsageTextualNotationBuilder = new ForLoopActionUsageTextualNotationBuilder(this); + return forLoopActionUsageTextualNotationBuilder.BuildTextualNotation(pocoForLoopActionUsage); + + case SysML2.NET.Core.POCO.Systems.Actions.AssignmentActionUsage pocoAssignmentActionUsage: + var assignmentActionUsageTextualNotationBuilder = new AssignmentActionUsageTextualNotationBuilder(this); + return assignmentActionUsageTextualNotationBuilder.BuildTextualNotation(pocoAssignmentActionUsage); + + case SysML2.NET.Core.POCO.Systems.Actions.WhileLoopActionUsage pocoWhileLoopActionUsage: + var whileLoopActionUsageTextualNotationBuilder = new WhileLoopActionUsageTextualNotationBuilder(this); + return whileLoopActionUsageTextualNotationBuilder.BuildTextualNotation(pocoWhileLoopActionUsage); + + case SysML2.NET.Core.POCO.Systems.Actions.TriggerInvocationExpression pocoTriggerInvocationExpression: + var triggerInvocationExpressionTextualNotationBuilder = new TriggerInvocationExpressionTextualNotationBuilder(this); + return triggerInvocationExpressionTextualNotationBuilder.BuildTextualNotation(pocoTriggerInvocationExpression); + + case SysML2.NET.Core.POCO.Systems.Actions.TerminateActionUsage pocoTerminateActionUsage: + var terminateActionUsageTextualNotationBuilder = new TerminateActionUsageTextualNotationBuilder(this); + return terminateActionUsageTextualNotationBuilder.BuildTextualNotation(pocoTerminateActionUsage); + + case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Definition pocoDefinition: + var definitionTextualNotationBuilder = new DefinitionTextualNotationBuilder(this); + return definitionTextualNotationBuilder.BuildTextualNotation(pocoDefinition); + + case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Usage pocoUsage: + var usageTextualNotationBuilder = new UsageTextualNotationBuilder(this); + return usageTextualNotationBuilder.BuildTextualNotation(pocoUsage); + + case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.ReferenceUsage pocoReferenceUsage: + var referenceUsageTextualNotationBuilder = new ReferenceUsageTextualNotationBuilder(this); + return referenceUsageTextualNotationBuilder.BuildTextualNotation(pocoReferenceUsage); + + case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.VariantMembership pocoVariantMembership: + var variantMembershipTextualNotationBuilder = new VariantMembershipTextualNotationBuilder(this); + return variantMembershipTextualNotationBuilder.BuildTextualNotation(pocoVariantMembership); + + case SysML2.NET.Core.POCO.Systems.Parts.PartDefinition pocoPartDefinition: + var partDefinitionTextualNotationBuilder = new PartDefinitionTextualNotationBuilder(this); + return partDefinitionTextualNotationBuilder.BuildTextualNotation(pocoPartDefinition); + + case SysML2.NET.Core.POCO.Systems.Parts.PartUsage pocoPartUsage: + var partUsageTextualNotationBuilder = new PartUsageTextualNotationBuilder(this); + return partUsageTextualNotationBuilder.BuildTextualNotation(pocoPartUsage); + + case SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceUsage pocoInterfaceUsage: + var interfaceUsageTextualNotationBuilder = new InterfaceUsageTextualNotationBuilder(this); + return interfaceUsageTextualNotationBuilder.BuildTextualNotation(pocoInterfaceUsage); + + case SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceDefinition pocoInterfaceDefinition: + var interfaceDefinitionTextualNotationBuilder = new InterfaceDefinitionTextualNotationBuilder(this); + return interfaceDefinitionTextualNotationBuilder.BuildTextualNotation(pocoInterfaceDefinition); + + case SysML2.NET.Core.POCO.Systems.States.StateUsage pocoStateUsage: + var stateUsageTextualNotationBuilder = new StateUsageTextualNotationBuilder(this); + return stateUsageTextualNotationBuilder.BuildTextualNotation(pocoStateUsage); + + case SysML2.NET.Core.POCO.Systems.States.StateSubactionMembership pocoStateSubactionMembership: + var stateSubactionMembershipTextualNotationBuilder = new StateSubactionMembershipTextualNotationBuilder(this); + return stateSubactionMembershipTextualNotationBuilder.BuildTextualNotation(pocoStateSubactionMembership); + + case SysML2.NET.Core.POCO.Systems.States.StateDefinition pocoStateDefinition: + var stateDefinitionTextualNotationBuilder = new StateDefinitionTextualNotationBuilder(this); + return stateDefinitionTextualNotationBuilder.BuildTextualNotation(pocoStateDefinition); + + case SysML2.NET.Core.POCO.Systems.States.TransitionUsage pocoTransitionUsage: + var transitionUsageTextualNotationBuilder = new TransitionUsageTextualNotationBuilder(this); + return transitionUsageTextualNotationBuilder.BuildTextualNotation(pocoTransitionUsage); + + case SysML2.NET.Core.POCO.Systems.States.TransitionFeatureMembership pocoTransitionFeatureMembership: + var transitionFeatureMembershipTextualNotationBuilder = new TransitionFeatureMembershipTextualNotationBuilder(this); + return transitionFeatureMembershipTextualNotationBuilder.BuildTextualNotation(pocoTransitionFeatureMembership); + + case SysML2.NET.Core.POCO.Systems.States.ExhibitStateUsage pocoExhibitStateUsage: + var exhibitStateUsageTextualNotationBuilder = new ExhibitStateUsageTextualNotationBuilder(this); + return exhibitStateUsageTextualNotationBuilder.BuildTextualNotation(pocoExhibitStateUsage); + + case SysML2.NET.Core.POCO.Systems.Constraints.ConstraintUsage pocoConstraintUsage: + var constraintUsageTextualNotationBuilder = new ConstraintUsageTextualNotationBuilder(this); + return constraintUsageTextualNotationBuilder.BuildTextualNotation(pocoConstraintUsage); + + case SysML2.NET.Core.POCO.Systems.Constraints.ConstraintDefinition pocoConstraintDefinition: + var constraintDefinitionTextualNotationBuilder = new ConstraintDefinitionTextualNotationBuilder(this); + return constraintDefinitionTextualNotationBuilder.BuildTextualNotation(pocoConstraintDefinition); + + case SysML2.NET.Core.POCO.Systems.Constraints.AssertConstraintUsage pocoAssertConstraintUsage: + var assertConstraintUsageTextualNotationBuilder = new AssertConstraintUsageTextualNotationBuilder(this); + return assertConstraintUsageTextualNotationBuilder.BuildTextualNotation(pocoAssertConstraintUsage); + + case SysML2.NET.Core.POCO.Systems.Requirements.RequirementDefinition pocoRequirementDefinition: + var requirementDefinitionTextualNotationBuilder = new RequirementDefinitionTextualNotationBuilder(this); + return requirementDefinitionTextualNotationBuilder.BuildTextualNotation(pocoRequirementDefinition); + + case SysML2.NET.Core.POCO.Systems.Requirements.SatisfyRequirementUsage pocoSatisfyRequirementUsage: + var satisfyRequirementUsageTextualNotationBuilder = new SatisfyRequirementUsageTextualNotationBuilder(this); + return satisfyRequirementUsageTextualNotationBuilder.BuildTextualNotation(pocoSatisfyRequirementUsage); + + case SysML2.NET.Core.POCO.Systems.Requirements.RequirementUsage pocoRequirementUsage: + var requirementUsageTextualNotationBuilder = new RequirementUsageTextualNotationBuilder(this); + return requirementUsageTextualNotationBuilder.BuildTextualNotation(pocoRequirementUsage); + + case SysML2.NET.Core.POCO.Systems.Requirements.RequirementConstraintMembership pocoRequirementConstraintMembership: + var requirementConstraintMembershipTextualNotationBuilder = new RequirementConstraintMembershipTextualNotationBuilder(this); + return requirementConstraintMembershipTextualNotationBuilder.BuildTextualNotation(pocoRequirementConstraintMembership); + + case SysML2.NET.Core.POCO.Systems.Requirements.SubjectMembership pocoSubjectMembership: + var subjectMembershipTextualNotationBuilder = new SubjectMembershipTextualNotationBuilder(this); + return subjectMembershipTextualNotationBuilder.BuildTextualNotation(pocoSubjectMembership); + + case SysML2.NET.Core.POCO.Systems.Requirements.FramedConcernMembership pocoFramedConcernMembership: + var framedConcernMembershipTextualNotationBuilder = new FramedConcernMembershipTextualNotationBuilder(this); + return framedConcernMembershipTextualNotationBuilder.BuildTextualNotation(pocoFramedConcernMembership); + + case SysML2.NET.Core.POCO.Systems.Requirements.ConcernDefinition pocoConcernDefinition: + var concernDefinitionTextualNotationBuilder = new ConcernDefinitionTextualNotationBuilder(this); + return concernDefinitionTextualNotationBuilder.BuildTextualNotation(pocoConcernDefinition); + + case SysML2.NET.Core.POCO.Systems.Requirements.ConcernUsage pocoConcernUsage: + var concernUsageTextualNotationBuilder = new ConcernUsageTextualNotationBuilder(this); + return concernUsageTextualNotationBuilder.BuildTextualNotation(pocoConcernUsage); + + case SysML2.NET.Core.POCO.Systems.Requirements.StakeholderMembership pocoStakeholderMembership: + var stakeholderMembershipTextualNotationBuilder = new StakeholderMembershipTextualNotationBuilder(this); + return stakeholderMembershipTextualNotationBuilder.BuildTextualNotation(pocoStakeholderMembership); + + case SysML2.NET.Core.POCO.Systems.Requirements.ActorMembership pocoActorMembership: + var actorMembershipTextualNotationBuilder = new ActorMembershipTextualNotationBuilder(this); + return actorMembershipTextualNotationBuilder.BuildTextualNotation(pocoActorMembership); + + case SysML2.NET.Core.POCO.Systems.Calculations.CalculationDefinition pocoCalculationDefinition: + var calculationDefinitionTextualNotationBuilder = new CalculationDefinitionTextualNotationBuilder(this); + return calculationDefinitionTextualNotationBuilder.BuildTextualNotation(pocoCalculationDefinition); + + case SysML2.NET.Core.POCO.Systems.Calculations.CalculationUsage pocoCalculationUsage: + var calculationUsageTextualNotationBuilder = new CalculationUsageTextualNotationBuilder(this); + return calculationUsageTextualNotationBuilder.BuildTextualNotation(pocoCalculationUsage); + + case SysML2.NET.Core.POCO.Systems.Connections.ConnectionDefinition pocoConnectionDefinition: + var connectionDefinitionTextualNotationBuilder = new ConnectionDefinitionTextualNotationBuilder(this); + return connectionDefinitionTextualNotationBuilder.BuildTextualNotation(pocoConnectionDefinition); + + case SysML2.NET.Core.POCO.Systems.Connections.ConnectionUsage pocoConnectionUsage: + var connectionUsageTextualNotationBuilder = new ConnectionUsageTextualNotationBuilder(this); + return connectionUsageTextualNotationBuilder.BuildTextualNotation(pocoConnectionUsage); + + case SysML2.NET.Core.POCO.Systems.Connections.SuccessionAsUsage pocoSuccessionAsUsage: + var successionAsUsageTextualNotationBuilder = new SuccessionAsUsageTextualNotationBuilder(this); + return successionAsUsageTextualNotationBuilder.BuildTextualNotation(pocoSuccessionAsUsage); + + case SysML2.NET.Core.POCO.Systems.Connections.BindingConnectorAsUsage pocoBindingConnectorAsUsage: + var bindingConnectorAsUsageTextualNotationBuilder = new BindingConnectorAsUsageTextualNotationBuilder(this); + return bindingConnectorAsUsageTextualNotationBuilder.BuildTextualNotation(pocoBindingConnectorAsUsage); + + case SysML2.NET.Core.POCO.Systems.Cases.CaseUsage pocoCaseUsage: + var caseUsageTextualNotationBuilder = new CaseUsageTextualNotationBuilder(this); + return caseUsageTextualNotationBuilder.BuildTextualNotation(pocoCaseUsage); + + case SysML2.NET.Core.POCO.Systems.Cases.CaseDefinition pocoCaseDefinition: + var caseDefinitionTextualNotationBuilder = new CaseDefinitionTextualNotationBuilder(this); + return caseDefinitionTextualNotationBuilder.BuildTextualNotation(pocoCaseDefinition); + + case SysML2.NET.Core.POCO.Systems.Cases.ObjectiveMembership pocoObjectiveMembership: + var objectiveMembershipTextualNotationBuilder = new ObjectiveMembershipTextualNotationBuilder(this); + return objectiveMembershipTextualNotationBuilder.BuildTextualNotation(pocoObjectiveMembership); + + case SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseUsage pocoAnalysisCaseUsage: + var analysisCaseUsageTextualNotationBuilder = new AnalysisCaseUsageTextualNotationBuilder(this); + return analysisCaseUsageTextualNotationBuilder.BuildTextualNotation(pocoAnalysisCaseUsage); + + case SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseDefinition pocoAnalysisCaseDefinition: + var analysisCaseDefinitionTextualNotationBuilder = new AnalysisCaseDefinitionTextualNotationBuilder(this); + return analysisCaseDefinitionTextualNotationBuilder.BuildTextualNotation(pocoAnalysisCaseDefinition); + + case SysML2.NET.Core.POCO.Systems.Items.ItemUsage pocoItemUsage: + var itemUsageTextualNotationBuilder = new ItemUsageTextualNotationBuilder(this); + return itemUsageTextualNotationBuilder.BuildTextualNotation(pocoItemUsage); + + case SysML2.NET.Core.POCO.Systems.Items.ItemDefinition pocoItemDefinition: + var itemDefinitionTextualNotationBuilder = new ItemDefinitionTextualNotationBuilder(this); + return itemDefinitionTextualNotationBuilder.BuildTextualNotation(pocoItemDefinition); + + case SysML2.NET.Core.POCO.Systems.Views.ViewpointDefinition pocoViewpointDefinition: + var viewpointDefinitionTextualNotationBuilder = new ViewpointDefinitionTextualNotationBuilder(this); + return viewpointDefinitionTextualNotationBuilder.BuildTextualNotation(pocoViewpointDefinition); + + case SysML2.NET.Core.POCO.Systems.Views.ViewUsage pocoViewUsage: + var viewUsageTextualNotationBuilder = new ViewUsageTextualNotationBuilder(this); + return viewUsageTextualNotationBuilder.BuildTextualNotation(pocoViewUsage); + + case SysML2.NET.Core.POCO.Systems.Views.RenderingDefinition pocoRenderingDefinition: + var renderingDefinitionTextualNotationBuilder = new RenderingDefinitionTextualNotationBuilder(this); + return renderingDefinitionTextualNotationBuilder.BuildTextualNotation(pocoRenderingDefinition); + + case SysML2.NET.Core.POCO.Systems.Views.ViewpointUsage pocoViewpointUsage: + var viewpointUsageTextualNotationBuilder = new ViewpointUsageTextualNotationBuilder(this); + return viewpointUsageTextualNotationBuilder.BuildTextualNotation(pocoViewpointUsage); + + case SysML2.NET.Core.POCO.Systems.Views.ViewDefinition pocoViewDefinition: + var viewDefinitionTextualNotationBuilder = new ViewDefinitionTextualNotationBuilder(this); + return viewDefinitionTextualNotationBuilder.BuildTextualNotation(pocoViewDefinition); + + case SysML2.NET.Core.POCO.Systems.Views.RenderingUsage pocoRenderingUsage: + var renderingUsageTextualNotationBuilder = new RenderingUsageTextualNotationBuilder(this); + return renderingUsageTextualNotationBuilder.BuildTextualNotation(pocoRenderingUsage); + + case SysML2.NET.Core.POCO.Systems.Views.ViewRenderingMembership pocoViewRenderingMembership: + var viewRenderingMembershipTextualNotationBuilder = new ViewRenderingMembershipTextualNotationBuilder(this); + return viewRenderingMembershipTextualNotationBuilder.BuildTextualNotation(pocoViewRenderingMembership); + + case SysML2.NET.Core.POCO.Systems.Views.NamespaceExpose pocoNamespaceExpose: + var namespaceExposeTextualNotationBuilder = new NamespaceExposeTextualNotationBuilder(this); + return namespaceExposeTextualNotationBuilder.BuildTextualNotation(pocoNamespaceExpose); + + case SysML2.NET.Core.POCO.Systems.Views.MembershipExpose pocoMembershipExpose: + var membershipExposeTextualNotationBuilder = new MembershipExposeTextualNotationBuilder(this); + return membershipExposeTextualNotationBuilder.BuildTextualNotation(pocoMembershipExpose); + + case SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseDefinition pocoVerificationCaseDefinition: + var verificationCaseDefinitionTextualNotationBuilder = new VerificationCaseDefinitionTextualNotationBuilder(this); + return verificationCaseDefinitionTextualNotationBuilder.BuildTextualNotation(pocoVerificationCaseDefinition); + + case SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseUsage pocoVerificationCaseUsage: + var verificationCaseUsageTextualNotationBuilder = new VerificationCaseUsageTextualNotationBuilder(this); + return verificationCaseUsageTextualNotationBuilder.BuildTextualNotation(pocoVerificationCaseUsage); + + case SysML2.NET.Core.POCO.Systems.VerificationCases.RequirementVerificationMembership pocoRequirementVerificationMembership: + var requirementVerificationMembershipTextualNotationBuilder = new RequirementVerificationMembershipTextualNotationBuilder(this); + return requirementVerificationMembershipTextualNotationBuilder.BuildTextualNotation(pocoRequirementVerificationMembership); + + case SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationDefinition pocoEnumerationDefinition: + var enumerationDefinitionTextualNotationBuilder = new EnumerationDefinitionTextualNotationBuilder(this); + return enumerationDefinitionTextualNotationBuilder.BuildTextualNotation(pocoEnumerationDefinition); + + case SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationUsage pocoEnumerationUsage: + var enumerationUsageTextualNotationBuilder = new EnumerationUsageTextualNotationBuilder(this); + return enumerationUsageTextualNotationBuilder.BuildTextualNotation(pocoEnumerationUsage); + + case SysML2.NET.Core.POCO.Systems.Allocations.AllocationDefinition pocoAllocationDefinition: + var allocationDefinitionTextualNotationBuilder = new AllocationDefinitionTextualNotationBuilder(this); + return allocationDefinitionTextualNotationBuilder.BuildTextualNotation(pocoAllocationDefinition); + + case SysML2.NET.Core.POCO.Systems.Allocations.AllocationUsage pocoAllocationUsage: + var allocationUsageTextualNotationBuilder = new AllocationUsageTextualNotationBuilder(this); + return allocationUsageTextualNotationBuilder.BuildTextualNotation(pocoAllocationUsage); + + case SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceUsage pocoOccurrenceUsage: + var occurrenceUsageTextualNotationBuilder = new OccurrenceUsageTextualNotationBuilder(this); + return occurrenceUsageTextualNotationBuilder.BuildTextualNotation(pocoOccurrenceUsage); + + case SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceDefinition pocoOccurrenceDefinition: + var occurrenceDefinitionTextualNotationBuilder = new OccurrenceDefinitionTextualNotationBuilder(this); + return occurrenceDefinitionTextualNotationBuilder.BuildTextualNotation(pocoOccurrenceDefinition); + + case SysML2.NET.Core.POCO.Systems.Occurrences.EventOccurrenceUsage pocoEventOccurrenceUsage: + var eventOccurrenceUsageTextualNotationBuilder = new EventOccurrenceUsageTextualNotationBuilder(this); + return eventOccurrenceUsageTextualNotationBuilder.BuildTextualNotation(pocoEventOccurrenceUsage); + + case SysML2.NET.Core.POCO.Systems.UseCases.IncludeUseCaseUsage pocoIncludeUseCaseUsage: + var includeUseCaseUsageTextualNotationBuilder = new IncludeUseCaseUsageTextualNotationBuilder(this); + return includeUseCaseUsageTextualNotationBuilder.BuildTextualNotation(pocoIncludeUseCaseUsage); + + case SysML2.NET.Core.POCO.Systems.UseCases.UseCaseUsage pocoUseCaseUsage: + var useCaseUsageTextualNotationBuilder = new UseCaseUsageTextualNotationBuilder(this); + return useCaseUsageTextualNotationBuilder.BuildTextualNotation(pocoUseCaseUsage); + + case SysML2.NET.Core.POCO.Systems.UseCases.UseCaseDefinition pocoUseCaseDefinition: + var useCaseDefinitionTextualNotationBuilder = new UseCaseDefinitionTextualNotationBuilder(this); + return useCaseDefinitionTextualNotationBuilder.BuildTextualNotation(pocoUseCaseDefinition); + + case SysML2.NET.Core.POCO.Systems.Metadata.MetadataDefinition pocoMetadataDefinition: + var metadataDefinitionTextualNotationBuilder = new MetadataDefinitionTextualNotationBuilder(this); + return metadataDefinitionTextualNotationBuilder.BuildTextualNotation(pocoMetadataDefinition); + + case SysML2.NET.Core.POCO.Systems.Metadata.MetadataUsage pocoMetadataUsage: + var metadataUsageTextualNotationBuilder = new MetadataUsageTextualNotationBuilder(this); + return metadataUsageTextualNotationBuilder.BuildTextualNotation(pocoMetadataUsage); + + case SysML2.NET.Core.POCO.Systems.Flows.FlowUsage pocoFlowUsage: + var flowUsageTextualNotationBuilder = new FlowUsageTextualNotationBuilder(this); + return flowUsageTextualNotationBuilder.BuildTextualNotation(pocoFlowUsage); + + case SysML2.NET.Core.POCO.Systems.Flows.FlowDefinition pocoFlowDefinition: + var flowDefinitionTextualNotationBuilder = new FlowDefinitionTextualNotationBuilder(this); + return flowDefinitionTextualNotationBuilder.BuildTextualNotation(pocoFlowDefinition); + + case SysML2.NET.Core.POCO.Systems.Flows.SuccessionFlowUsage pocoSuccessionFlowUsage: + var successionFlowUsageTextualNotationBuilder = new SuccessionFlowUsageTextualNotationBuilder(this); + return successionFlowUsageTextualNotationBuilder.BuildTextualNotation(pocoSuccessionFlowUsage); + + case SysML2.NET.Core.POCO.Root.Dependencies.Dependency pocoDependency: + var dependencyTextualNotationBuilder = new DependencyTextualNotationBuilder(this); + return dependencyTextualNotationBuilder.BuildTextualNotation(pocoDependency); + + case SysML2.NET.Core.POCO.Root.Annotations.Comment pocoComment: + var commentTextualNotationBuilder = new CommentTextualNotationBuilder(this); + return commentTextualNotationBuilder.BuildTextualNotation(pocoComment); + + case SysML2.NET.Core.POCO.Root.Annotations.Annotation pocoAnnotation: + var annotationTextualNotationBuilder = new AnnotationTextualNotationBuilder(this); + return annotationTextualNotationBuilder.BuildTextualNotation(pocoAnnotation); + + case SysML2.NET.Core.POCO.Root.Annotations.AnnotatingElement pocoAnnotatingElement: + var annotatingElementTextualNotationBuilder = new AnnotatingElementTextualNotationBuilder(this); + return annotatingElementTextualNotationBuilder.BuildTextualNotation(pocoAnnotatingElement); + + case SysML2.NET.Core.POCO.Root.Annotations.TextualRepresentation pocoTextualRepresentation: + var textualRepresentationTextualNotationBuilder = new TextualRepresentationTextualNotationBuilder(this); + return textualRepresentationTextualNotationBuilder.BuildTextualNotation(pocoTextualRepresentation); + + case SysML2.NET.Core.POCO.Root.Annotations.Documentation pocoDocumentation: + var documentationTextualNotationBuilder = new DocumentationTextualNotationBuilder(this); + return documentationTextualNotationBuilder.BuildTextualNotation(pocoDocumentation); + + case SysML2.NET.Core.POCO.Root.Namespaces.Namespace pocoNamespace: + var namespaceTextualNotationBuilder = new NamespaceTextualNotationBuilder(this); + return namespaceTextualNotationBuilder.BuildTextualNotation(pocoNamespace); + + case SysML2.NET.Core.POCO.Root.Namespaces.MembershipImport pocoMembershipImport: + var membershipImportTextualNotationBuilder = new MembershipImportTextualNotationBuilder(this); + return membershipImportTextualNotationBuilder.BuildTextualNotation(pocoMembershipImport); + + case SysML2.NET.Core.POCO.Root.Namespaces.NamespaceImport pocoNamespaceImport: + var namespaceImportTextualNotationBuilder = new NamespaceImportTextualNotationBuilder(this); + return namespaceImportTextualNotationBuilder.BuildTextualNotation(pocoNamespaceImport); + + case SysML2.NET.Core.POCO.Root.Namespaces.Membership pocoMembership: + var membershipTextualNotationBuilder = new MembershipTextualNotationBuilder(this); + return membershipTextualNotationBuilder.BuildTextualNotation(pocoMembership); + + case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership pocoOwningMembership: + var owningMembershipTextualNotationBuilder = new OwningMembershipTextualNotationBuilder(this); + return owningMembershipTextualNotationBuilder.BuildTextualNotation(pocoOwningMembership); + + case SysML2.NET.Core.POCO.Core.Types.Specialization pocoSpecialization: + var specializationTextualNotationBuilder = new SpecializationTextualNotationBuilder(this); + return specializationTextualNotationBuilder.BuildTextualNotation(pocoSpecialization); + + case SysML2.NET.Core.POCO.Core.Types.Type pocoType: + var typeTextualNotationBuilder = new TypeTextualNotationBuilder(this); + return typeTextualNotationBuilder.BuildTextualNotation(pocoType); + + case SysML2.NET.Core.POCO.Core.Types.FeatureMembership pocoFeatureMembership: + var featureMembershipTextualNotationBuilder = new FeatureMembershipTextualNotationBuilder(this); + return featureMembershipTextualNotationBuilder.BuildTextualNotation(pocoFeatureMembership); + + case SysML2.NET.Core.POCO.Core.Types.Conjugation pocoConjugation: + var conjugationTextualNotationBuilder = new ConjugationTextualNotationBuilder(this); + return conjugationTextualNotationBuilder.BuildTextualNotation(pocoConjugation); + + case SysML2.NET.Core.POCO.Core.Types.Multiplicity pocoMultiplicity: + var multiplicityTextualNotationBuilder = new MultiplicityTextualNotationBuilder(this); + return multiplicityTextualNotationBuilder.BuildTextualNotation(pocoMultiplicity); + + case SysML2.NET.Core.POCO.Core.Types.Disjoining pocoDisjoining: + var disjoiningTextualNotationBuilder = new DisjoiningTextualNotationBuilder(this); + return disjoiningTextualNotationBuilder.BuildTextualNotation(pocoDisjoining); + + case SysML2.NET.Core.POCO.Core.Types.Differencing pocoDifferencing: + var differencingTextualNotationBuilder = new DifferencingTextualNotationBuilder(this); + return differencingTextualNotationBuilder.BuildTextualNotation(pocoDifferencing); + + case SysML2.NET.Core.POCO.Core.Types.Unioning pocoUnioning: + var unioningTextualNotationBuilder = new UnioningTextualNotationBuilder(this); + return unioningTextualNotationBuilder.BuildTextualNotation(pocoUnioning); + + case SysML2.NET.Core.POCO.Core.Types.Intersecting pocoIntersecting: + var intersectingTextualNotationBuilder = new IntersectingTextualNotationBuilder(this); + return intersectingTextualNotationBuilder.BuildTextualNotation(pocoIntersecting); + + case SysML2.NET.Core.POCO.Core.Classifiers.Subclassification pocoSubclassification: + var subclassificationTextualNotationBuilder = new SubclassificationTextualNotationBuilder(this); + return subclassificationTextualNotationBuilder.BuildTextualNotation(pocoSubclassification); + + case SysML2.NET.Core.POCO.Core.Classifiers.Classifier pocoClassifier: + var classifierTextualNotationBuilder = new ClassifierTextualNotationBuilder(this); + return classifierTextualNotationBuilder.BuildTextualNotation(pocoClassifier); + + case SysML2.NET.Core.POCO.Core.Features.Redefinition pocoRedefinition: + var redefinitionTextualNotationBuilder = new RedefinitionTextualNotationBuilder(this); + return redefinitionTextualNotationBuilder.BuildTextualNotation(pocoRedefinition); + + case SysML2.NET.Core.POCO.Core.Features.Feature pocoFeature: + var featureTextualNotationBuilder = new FeatureTextualNotationBuilder(this); + return featureTextualNotationBuilder.BuildTextualNotation(pocoFeature); + + case SysML2.NET.Core.POCO.Core.Features.FeatureTyping pocoFeatureTyping: + var featureTypingTextualNotationBuilder = new FeatureTypingTextualNotationBuilder(this); + return featureTypingTextualNotationBuilder.BuildTextualNotation(pocoFeatureTyping); + + case SysML2.NET.Core.POCO.Core.Features.Subsetting pocoSubsetting: + var subsettingTextualNotationBuilder = new SubsettingTextualNotationBuilder(this); + return subsettingTextualNotationBuilder.BuildTextualNotation(pocoSubsetting); + + case SysML2.NET.Core.POCO.Core.Features.TypeFeaturing pocoTypeFeaturing: + var typeFeaturingTextualNotationBuilder = new TypeFeaturingTextualNotationBuilder(this); + return typeFeaturingTextualNotationBuilder.BuildTextualNotation(pocoTypeFeaturing); + + case SysML2.NET.Core.POCO.Core.Features.EndFeatureMembership pocoEndFeatureMembership: + var endFeatureMembershipTextualNotationBuilder = new EndFeatureMembershipTextualNotationBuilder(this); + return endFeatureMembershipTextualNotationBuilder.BuildTextualNotation(pocoEndFeatureMembership); + + case SysML2.NET.Core.POCO.Core.Features.FeatureChaining pocoFeatureChaining: + var featureChainingTextualNotationBuilder = new FeatureChainingTextualNotationBuilder(this); + return featureChainingTextualNotationBuilder.BuildTextualNotation(pocoFeatureChaining); + + case SysML2.NET.Core.POCO.Core.Features.FeatureInverting pocoFeatureInverting: + var featureInvertingTextualNotationBuilder = new FeatureInvertingTextualNotationBuilder(this); + return featureInvertingTextualNotationBuilder.BuildTextualNotation(pocoFeatureInverting); + + case SysML2.NET.Core.POCO.Core.Features.ReferenceSubsetting pocoReferenceSubsetting: + var referenceSubsettingTextualNotationBuilder = new ReferenceSubsettingTextualNotationBuilder(this); + return referenceSubsettingTextualNotationBuilder.BuildTextualNotation(pocoReferenceSubsetting); + + case SysML2.NET.Core.POCO.Core.Features.CrossSubsetting pocoCrossSubsetting: + var crossSubsettingTextualNotationBuilder = new CrossSubsettingTextualNotationBuilder(this); + return crossSubsettingTextualNotationBuilder.BuildTextualNotation(pocoCrossSubsetting); + + case SysML2.NET.Core.POCO.Kernel.Interactions.PayloadFeature pocoPayloadFeature: + var payloadFeatureTextualNotationBuilder = new PayloadFeatureTextualNotationBuilder(this); + return payloadFeatureTextualNotationBuilder.BuildTextualNotation(pocoPayloadFeature); + + case SysML2.NET.Core.POCO.Kernel.Interactions.Interaction pocoInteraction: + var interactionTextualNotationBuilder = new InteractionTextualNotationBuilder(this); + return interactionTextualNotationBuilder.BuildTextualNotation(pocoInteraction); + + case SysML2.NET.Core.POCO.Kernel.Interactions.SuccessionFlow pocoSuccessionFlow: + var successionFlowTextualNotationBuilder = new SuccessionFlowTextualNotationBuilder(this); + return successionFlowTextualNotationBuilder.BuildTextualNotation(pocoSuccessionFlow); + + case SysML2.NET.Core.POCO.Kernel.Interactions.Flow pocoFlow: + var flowTextualNotationBuilder = new FlowTextualNotationBuilder(this); + return flowTextualNotationBuilder.BuildTextualNotation(pocoFlow); + + case SysML2.NET.Core.POCO.Kernel.Interactions.FlowEnd pocoFlowEnd: + var flowEndTextualNotationBuilder = new FlowEndTextualNotationBuilder(this); + return flowEndTextualNotationBuilder.BuildTextualNotation(pocoFlowEnd); + + case SysML2.NET.Core.POCO.Kernel.Packages.LibraryPackage pocoLibraryPackage: + var libraryPackageTextualNotationBuilder = new LibraryPackageTextualNotationBuilder(this); + return libraryPackageTextualNotationBuilder.BuildTextualNotation(pocoLibraryPackage); + + case SysML2.NET.Core.POCO.Kernel.Packages.ElementFilterMembership pocoElementFilterMembership: + var elementFilterMembershipTextualNotationBuilder = new ElementFilterMembershipTextualNotationBuilder(this); + return elementFilterMembershipTextualNotationBuilder.BuildTextualNotation(pocoElementFilterMembership); + + case SysML2.NET.Core.POCO.Kernel.Packages.Package pocoPackage: + var packageTextualNotationBuilder = new PackageTextualNotationBuilder(this); + return packageTextualNotationBuilder.BuildTextualNotation(pocoPackage); + + case SysML2.NET.Core.POCO.Kernel.Classes.Class pocoClass: + var classTextualNotationBuilder = new ClassTextualNotationBuilder(this); + return classTextualNotationBuilder.BuildTextualNotation(pocoClass); + + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralBoolean pocoLiteralBoolean: + var literalBooleanTextualNotationBuilder = new LiteralBooleanTextualNotationBuilder(this); + return literalBooleanTextualNotationBuilder.BuildTextualNotation(pocoLiteralBoolean); + + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralExpression pocoLiteralExpression: + var literalExpressionTextualNotationBuilder = new LiteralExpressionTextualNotationBuilder(this); + return literalExpressionTextualNotationBuilder.BuildTextualNotation(pocoLiteralExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralRational pocoLiteralRational: + var literalRationalTextualNotationBuilder = new LiteralRationalTextualNotationBuilder(this); + return literalRationalTextualNotationBuilder.BuildTextualNotation(pocoLiteralRational); + + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInfinity pocoLiteralInfinity: + var literalInfinityTextualNotationBuilder = new LiteralInfinityTextualNotationBuilder(this); + return literalInfinityTextualNotationBuilder.BuildTextualNotation(pocoLiteralInfinity); + + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInteger pocoLiteralInteger: + var literalIntegerTextualNotationBuilder = new LiteralIntegerTextualNotationBuilder(this); + return literalIntegerTextualNotationBuilder.BuildTextualNotation(pocoLiteralInteger); + + case SysML2.NET.Core.POCO.Kernel.Expressions.NullExpression pocoNullExpression: + var nullExpressionTextualNotationBuilder = new NullExpressionTextualNotationBuilder(this); + return nullExpressionTextualNotationBuilder.BuildTextualNotation(pocoNullExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralString pocoLiteralString: + var literalStringTextualNotationBuilder = new LiteralStringTextualNotationBuilder(this); + return literalStringTextualNotationBuilder.BuildTextualNotation(pocoLiteralString); + + case SysML2.NET.Core.POCO.Kernel.Expressions.InvocationExpression pocoInvocationExpression: + var invocationExpressionTextualNotationBuilder = new InvocationExpressionTextualNotationBuilder(this); + return invocationExpressionTextualNotationBuilder.BuildTextualNotation(pocoInvocationExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.FeatureReferenceExpression pocoFeatureReferenceExpression: + var featureReferenceExpressionTextualNotationBuilder = new FeatureReferenceExpressionTextualNotationBuilder(this); + return featureReferenceExpressionTextualNotationBuilder.BuildTextualNotation(pocoFeatureReferenceExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.SelectExpression pocoSelectExpression: + var selectExpressionTextualNotationBuilder = new SelectExpressionTextualNotationBuilder(this); + return selectExpressionTextualNotationBuilder.BuildTextualNotation(pocoSelectExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.OperatorExpression pocoOperatorExpression: + var operatorExpressionTextualNotationBuilder = new OperatorExpressionTextualNotationBuilder(this); + return operatorExpressionTextualNotationBuilder.BuildTextualNotation(pocoOperatorExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.CollectExpression pocoCollectExpression: + var collectExpressionTextualNotationBuilder = new CollectExpressionTextualNotationBuilder(this); + return collectExpressionTextualNotationBuilder.BuildTextualNotation(pocoCollectExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.FeatureChainExpression pocoFeatureChainExpression: + var featureChainExpressionTextualNotationBuilder = new FeatureChainExpressionTextualNotationBuilder(this); + return featureChainExpressionTextualNotationBuilder.BuildTextualNotation(pocoFeatureChainExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.MetadataAccessExpression pocoMetadataAccessExpression: + var metadataAccessExpressionTextualNotationBuilder = new MetadataAccessExpressionTextualNotationBuilder(this); + return metadataAccessExpressionTextualNotationBuilder.BuildTextualNotation(pocoMetadataAccessExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.IndexExpression pocoIndexExpression: + var indexExpressionTextualNotationBuilder = new IndexExpressionTextualNotationBuilder(this); + return indexExpressionTextualNotationBuilder.BuildTextualNotation(pocoIndexExpression); + + case SysML2.NET.Core.POCO.Kernel.Expressions.ConstructorExpression pocoConstructorExpression: + var constructorExpressionTextualNotationBuilder = new ConstructorExpressionTextualNotationBuilder(this); + return constructorExpressionTextualNotationBuilder.BuildTextualNotation(pocoConstructorExpression); + + case SysML2.NET.Core.POCO.Kernel.Structures.Structure pocoStructure: + var structureTextualNotationBuilder = new StructureTextualNotationBuilder(this); + return structureTextualNotationBuilder.BuildTextualNotation(pocoStructure); + + case SysML2.NET.Core.POCO.Kernel.Functions.Predicate pocoPredicate: + var predicateTextualNotationBuilder = new PredicateTextualNotationBuilder(this); + return predicateTextualNotationBuilder.BuildTextualNotation(pocoPredicate); + + case SysML2.NET.Core.POCO.Kernel.Functions.ReturnParameterMembership pocoReturnParameterMembership: + var returnParameterMembershipTextualNotationBuilder = new ReturnParameterMembershipTextualNotationBuilder(this); + return returnParameterMembershipTextualNotationBuilder.BuildTextualNotation(pocoReturnParameterMembership); + + case SysML2.NET.Core.POCO.Kernel.Functions.Invariant pocoInvariant: + var invariantTextualNotationBuilder = new InvariantTextualNotationBuilder(this); + return invariantTextualNotationBuilder.BuildTextualNotation(pocoInvariant); + + case SysML2.NET.Core.POCO.Kernel.Functions.BooleanExpression pocoBooleanExpression: + var booleanExpressionTextualNotationBuilder = new BooleanExpressionTextualNotationBuilder(this); + return booleanExpressionTextualNotationBuilder.BuildTextualNotation(pocoBooleanExpression); + + case SysML2.NET.Core.POCO.Kernel.Functions.Expression pocoExpression: + var expressionTextualNotationBuilder = new ExpressionTextualNotationBuilder(this); + return expressionTextualNotationBuilder.BuildTextualNotation(pocoExpression); + + case SysML2.NET.Core.POCO.Kernel.Functions.Function pocoFunction: + var functionTextualNotationBuilder = new FunctionTextualNotationBuilder(this); + return functionTextualNotationBuilder.BuildTextualNotation(pocoFunction); + + case SysML2.NET.Core.POCO.Kernel.Functions.ResultExpressionMembership pocoResultExpressionMembership: + var resultExpressionMembershipTextualNotationBuilder = new ResultExpressionMembershipTextualNotationBuilder(this); + return resultExpressionMembershipTextualNotationBuilder.BuildTextualNotation(pocoResultExpressionMembership); + + case SysML2.NET.Core.POCO.Kernel.Multiplicities.MultiplicityRange pocoMultiplicityRange: + var multiplicityRangeTextualNotationBuilder = new MultiplicityRangeTextualNotationBuilder(this); + return multiplicityRangeTextualNotationBuilder.BuildTextualNotation(pocoMultiplicityRange); + + case SysML2.NET.Core.POCO.Kernel.Behaviors.Step pocoStep: + var stepTextualNotationBuilder = new StepTextualNotationBuilder(this); + return stepTextualNotationBuilder.BuildTextualNotation(pocoStep); + + case SysML2.NET.Core.POCO.Kernel.Behaviors.Behavior pocoBehavior: + var behaviorTextualNotationBuilder = new BehaviorTextualNotationBuilder(this); + return behaviorTextualNotationBuilder.BuildTextualNotation(pocoBehavior); + + case SysML2.NET.Core.POCO.Kernel.Behaviors.ParameterMembership pocoParameterMembership: + var parameterMembershipTextualNotationBuilder = new ParameterMembershipTextualNotationBuilder(this); + return parameterMembershipTextualNotationBuilder.BuildTextualNotation(pocoParameterMembership); + + case SysML2.NET.Core.POCO.Kernel.Metadata.Metaclass pocoMetaclass: + var metaclassTextualNotationBuilder = new MetaclassTextualNotationBuilder(this); + return metaclassTextualNotationBuilder.BuildTextualNotation(pocoMetaclass); + + case SysML2.NET.Core.POCO.Kernel.Metadata.MetadataFeature pocoMetadataFeature: + var metadataFeatureTextualNotationBuilder = new MetadataFeatureTextualNotationBuilder(this); + return metadataFeatureTextualNotationBuilder.BuildTextualNotation(pocoMetadataFeature); + + case SysML2.NET.Core.POCO.Kernel.DataTypes.DataType pocoDataType: + var dataTypeTextualNotationBuilder = new DataTypeTextualNotationBuilder(this); + return dataTypeTextualNotationBuilder.BuildTextualNotation(pocoDataType); + + case SysML2.NET.Core.POCO.Kernel.Associations.AssociationStructure pocoAssociationStructure: + var associationStructureTextualNotationBuilder = new AssociationStructureTextualNotationBuilder(this); + return associationStructureTextualNotationBuilder.BuildTextualNotation(pocoAssociationStructure); + + case SysML2.NET.Core.POCO.Kernel.Associations.Association pocoAssociation: + var associationTextualNotationBuilder = new AssociationTextualNotationBuilder(this); + return associationTextualNotationBuilder.BuildTextualNotation(pocoAssociation); + + case SysML2.NET.Core.POCO.Kernel.FeatureValues.FeatureValue pocoFeatureValue: + var featureValueTextualNotationBuilder = new FeatureValueTextualNotationBuilder(this); + return featureValueTextualNotationBuilder.BuildTextualNotation(pocoFeatureValue); + + case SysML2.NET.Core.POCO.Kernel.Connectors.Connector pocoConnector: + var connectorTextualNotationBuilder = new ConnectorTextualNotationBuilder(this); + return connectorTextualNotationBuilder.BuildTextualNotation(pocoConnector); + + case SysML2.NET.Core.POCO.Kernel.Connectors.BindingConnector pocoBindingConnector: + var bindingConnectorTextualNotationBuilder = new BindingConnectorTextualNotationBuilder(this); + return bindingConnectorTextualNotationBuilder.BuildTextualNotation(pocoBindingConnector); + + case SysML2.NET.Core.POCO.Kernel.Connectors.Succession pocoSuccession: + var successionTextualNotationBuilder = new SuccessionTextualNotationBuilder(this); + return successionTextualNotationBuilder.BuildTextualNotation(pocoSuccession); + + default: + throw new ArgumentOutOfRangeException(nameof(element), "Provided element is not supported"); + } + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs new file mode 100644 index 00000000..f1aaa69c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class TextualRepresentationTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public TextualRepresentationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.TextualRepresentation poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..e728d6a0 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class TransitionFeatureMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public TransitionFeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.TransitionFeatureMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..304e45dd --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class TransitionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public TransitionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.TransitionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..f1936c2c --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class TriggerInvocationExpressionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public TriggerInvocationExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.TriggerInvocationExpression poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs new file mode 100644 index 00000000..c1ef9236 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class TypeFeaturingTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public TypeFeaturingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.TypeFeaturing poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs new file mode 100644 index 00000000..f01befde --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class TypeTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public TypeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Type poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs new file mode 100644 index 00000000..a970c88e --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class UnioningTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public UnioningTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Unioning poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs new file mode 100644 index 00000000..304340c6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class UsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public UsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Usage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..aa84e885 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class UseCaseDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public UseCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.UseCases.UseCaseDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..eaccd628 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class UseCaseUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public UseCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.UseCases.UseCaseUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..e5e7fbfd --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class VariantMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public VariantMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.VariantMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..57667c78 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class VerificationCaseDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public VerificationCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..cc381b27 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class VerificationCaseUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public VerificationCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..fe3b48de --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ViewDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ViewDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..fd6430a6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ViewRenderingMembershipTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ViewRenderingMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewRenderingMembership poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..294b7954 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ViewUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ViewUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..f37f29b6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ViewpointDefinitionTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ViewpointDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewpointDefinition poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..c61212a5 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class ViewpointUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public ViewpointUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewpointUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..b3bb4567 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public class WhileLoopActionUsageTextualNotationBuilder : TextualNotationBuilder + { + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + public WhileLoopActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + { + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.WhileLoopActionUsage poco) + { + return string.Empty; + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/ITextualNotationBuilderFacade.cs b/SysML2.NET/TextualNotation/ITextualNotationBuilderFacade.cs new file mode 100644 index 00000000..a290d58f --- /dev/null +++ b/SysML2.NET/TextualNotation/ITextualNotationBuilderFacade.cs @@ -0,0 +1,37 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides access to built textual notation for via + /// + public interface ITextualNotationBuilderFacade + { + /// + /// Queries the Textual Notation of an + /// + /// The to built textual notation from + /// The built textual notation string + string QueryTextualNotationOfElement(IElement element); + } +} diff --git a/SysML2.NET/TextualNotation/TextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TextualNotationBuilder.cs new file mode 100644 index 00000000..4ea1b815 --- /dev/null +++ b/SysML2.NET/TextualNotation/TextualNotationBuilder.cs @@ -0,0 +1,52 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// Base class that provides Textual Notation string builder for a specific + /// + /// Any concrete class + public abstract class TextualNotationBuilder where TElement : class, IElement + { + /// + /// Gets the used to query textual notation of referenced + /// + protected readonly ITextualNotationBuilderFacade Facade; + + /// + /// Initializes a new instance of a + /// + /// The used to query textual notation of referenced + protected TextualNotationBuilder(ITextualNotationBuilderFacade facade) + { + this.Facade = facade; + } + + /// + /// Builds the Textual Notation string for the provided + /// + /// The from which the textual notation should be build + /// The built textual notation string + public abstract string BuildTextualNotation(TElement poco); + } +} From 76ba2278b201d6754f4c81e0a1aa90032d18fe68 Mon Sep 17 00:00:00 2001 From: atheate Date: Thu, 19 Feb 2026 17:06:01 +0100 Subject: [PATCH 03/15] [WIP] Added prefix on assingment, gonna start implement logic for builder --- Resources/kebnf.g4 | 2 +- ...NotationSpecificationVisitorTestFixture.cs | 2 + .../UmlCoreTextualNotationBuilderGenerator.cs | 2 +- .../NET/CodeGenerator/Grammar/kebnf.interp | 86 --------- .../Grammar/AutoGenGrammar/kebnf.interp | 86 +++++++++ .../CodeGenerator/Grammar => }/kebnf.tokens | 0 .../Grammar => }/kebnfBaseListener.cs | 0 .../Grammar => }/kebnfBaseVisitor.cs | 0 .../CodeGenerator/Grammar => }/kebnfLexer.cs | 0 .../Grammar => }/kebnfLexer.interp | 0 .../Grammar => }/kebnfLexer.tokens | 0 .../Grammar => }/kebnfListener.cs | 0 .../CodeGenerator/Grammar => }/kebnfParser.cs | 179 ++++++++++-------- .../Grammar => }/kebnfVisitor.cs | 0 .../Grammar/Model/AssignmentElement.cs | 7 +- .../TextualNotationSpecificationVisitor.cs | 8 +- ...core-textual-notation-builder-template.hbs | 22 ++- 17 files changed, 212 insertions(+), 182 deletions(-) delete mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.interp rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{SysML2/NET/CodeGenerator/Grammar => }/kebnf.tokens (100%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{SysML2/NET/CodeGenerator/Grammar => }/kebnfBaseListener.cs (100%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{SysML2/NET/CodeGenerator/Grammar => }/kebnfBaseVisitor.cs (100%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{SysML2/NET/CodeGenerator/Grammar => }/kebnfLexer.cs (100%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{SysML2/NET/CodeGenerator/Grammar => }/kebnfLexer.interp (100%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{SysML2/NET/CodeGenerator/Grammar => }/kebnfLexer.tokens (100%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{SysML2/NET/CodeGenerator/Grammar => }/kebnfListener.cs (100%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{SysML2/NET/CodeGenerator/Grammar => }/kebnfParser.cs (92%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{SysML2/NET/CodeGenerator/Grammar => }/kebnfVisitor.cs (100%) diff --git a/Resources/kebnf.g4 b/Resources/kebnf.g4 index 5be3842d..f068d86e 100644 --- a/Resources/kebnf.g4 +++ b/Resources/kebnf.g4 @@ -31,7 +31,7 @@ element ; assignment - : property=dotted_id op=(ASSIGN | ADD_ASSIGN | BOOL_ASSIGN) content=element_core (suffix=suffix_op)? + : property=dotted_id op=(ASSIGN | ADD_ASSIGN | BOOL_ASSIGN) (prefix=TILDE)?content=element_core (suffix=suffix_op)? ; non_parsing_assignment diff --git a/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs index 6ea3d80b..7990d4cc 100644 --- a/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Grammar/TextualNotationSpecificationVisitorTestFixture.cs @@ -22,6 +22,7 @@ namespace SysML2.NET.CodeGenerator.Tests.Grammar { using System; using System.IO; + using System.Linq; using Antlr4.Runtime; @@ -54,6 +55,7 @@ public void VerifyCanParseGrammar(string modelName) { Assert.That(rules, Is.Not.Null); Assert.That(rules, Is.Not.Empty); + Assert.That(rules.DistinctBy(x => x.RuleName), Is.EquivalentTo(rules)); } Console.WriteLine($"Found {rules.Count} rules"); diff --git a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs index aa04cba9..0c314862 100644 --- a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs @@ -152,7 +152,7 @@ private async Task GenerateBuilderClassesInternal(XmiReaderResult xmiReaderResul foreach (var umlClass in classes) { - var generatedBuilder = template(umlClass); + var generatedBuilder = template(new {ClassContext = umlClass, Rules = textualNotationSpecification.Rules}); generatedBuilder = this.CodeCleanup(generatedBuilder); var fileName = $"{umlClass.Name.CapitalizeFirstLetter()}TextualNotationBuilder.cs"; diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp deleted file mode 100644 index 54fabec1..00000000 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp +++ /dev/null @@ -1,86 +0,0 @@ -token literal names: -null -'*' -'+' -'?' -'true' -'false' -'this' -'[QualifiedName]' -null -'+=' -'?=' -'|' -':' -';' -',' -'(' -')' -'[' -']' -'{' -'}' -'.' -'~' -null -null -null -null -null -null -null - -token symbolic names: -null -null -null -null -null -null -null -null -ASSIGN -ADD_ASSIGN -BOOL_ASSIGN -PIPE -COLON -SEMICOLON -COMMA -LPAREN -RPAREN -LBRACK -RBRACK -LBRACE -RBRACE -DOT -TILDE -ID -INT -STRING -COMMENT -WS -CONTINUATION -NL - -rule names: -specification -rule_definition -parameter_list -alternatives -alternative -element -assignment -non_parsing_assignment -non_parsing_empty -cross_reference -group -terminal -non_terminal -element_core -dotted_id -suffix_op -value_literal - - -atn: -[4, 1, 29, 149, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0, 5, 0, 36, 8, 0, 10, 0, 12, 0, 39, 9, 0, 1, 0, 4, 0, 42, 8, 0, 11, 0, 12, 0, 43, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 50, 8, 1, 1, 1, 1, 1, 3, 1, 54, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 59, 8, 1, 1, 1, 4, 1, 62, 8, 1, 11, 1, 12, 1, 63, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 75, 8, 3, 10, 3, 12, 3, 78, 9, 3, 1, 4, 5, 4, 81, 8, 4, 10, 4, 12, 4, 84, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 93, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 99, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 3, 9, 111, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 121, 8, 10, 1, 11, 1, 11, 3, 11, 125, 8, 11, 1, 12, 1, 12, 3, 12, 129, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 135, 8, 13, 1, 14, 1, 14, 1, 14, 5, 14, 140, 8, 14, 10, 14, 12, 14, 143, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 0, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 4, 1, 0, 8, 10, 1, 0, 8, 9, 1, 0, 1, 3, 2, 0, 4, 7, 23, 25, 154, 0, 37, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 65, 1, 0, 0, 0, 6, 71, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 92, 1, 0, 0, 0, 12, 94, 1, 0, 0, 0, 14, 100, 1, 0, 0, 0, 16, 106, 1, 0, 0, 0, 18, 110, 1, 0, 0, 0, 20, 116, 1, 0, 0, 0, 22, 122, 1, 0, 0, 0, 24, 126, 1, 0, 0, 0, 26, 134, 1, 0, 0, 0, 28, 136, 1, 0, 0, 0, 30, 144, 1, 0, 0, 0, 32, 146, 1, 0, 0, 0, 34, 36, 5, 29, 0, 0, 35, 34, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 41, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 42, 3, 2, 1, 0, 41, 40, 1, 0, 0, 0, 42, 43, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 43, 44, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 46, 5, 0, 0, 1, 46, 1, 1, 0, 0, 0, 47, 49, 5, 23, 0, 0, 48, 50, 3, 4, 2, 0, 49, 48, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 52, 5, 12, 0, 0, 52, 54, 5, 23, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 55, 1, 0, 0, 0, 55, 56, 5, 8, 0, 0, 56, 58, 3, 6, 3, 0, 57, 59, 5, 13, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 61, 1, 0, 0, 0, 60, 62, 5, 29, 0, 0, 61, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 3, 1, 0, 0, 0, 65, 66, 5, 15, 0, 0, 66, 67, 5, 23, 0, 0, 67, 68, 5, 12, 0, 0, 68, 69, 5, 23, 0, 0, 69, 70, 5, 16, 0, 0, 70, 5, 1, 0, 0, 0, 71, 76, 3, 8, 4, 0, 72, 73, 5, 11, 0, 0, 73, 75, 3, 8, 4, 0, 74, 72, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 7, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 81, 3, 10, 5, 0, 80, 79, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 93, 3, 12, 6, 0, 86, 93, 3, 14, 7, 0, 87, 93, 3, 16, 8, 0, 88, 93, 3, 18, 9, 0, 89, 93, 3, 20, 10, 0, 90, 93, 3, 22, 11, 0, 91, 93, 3, 24, 12, 0, 92, 85, 1, 0, 0, 0, 92, 86, 1, 0, 0, 0, 92, 87, 1, 0, 0, 0, 92, 88, 1, 0, 0, 0, 92, 89, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 92, 91, 1, 0, 0, 0, 93, 11, 1, 0, 0, 0, 94, 95, 3, 28, 14, 0, 95, 96, 7, 0, 0, 0, 96, 98, 3, 26, 13, 0, 97, 99, 3, 30, 15, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 13, 1, 0, 0, 0, 100, 101, 5, 19, 0, 0, 101, 102, 3, 28, 14, 0, 102, 103, 7, 1, 0, 0, 103, 104, 3, 32, 16, 0, 104, 105, 5, 20, 0, 0, 105, 15, 1, 0, 0, 0, 106, 107, 5, 19, 0, 0, 107, 108, 5, 20, 0, 0, 108, 17, 1, 0, 0, 0, 109, 111, 5, 22, 0, 0, 110, 109, 1, 0, 0, 0, 110, 111, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 113, 5, 17, 0, 0, 113, 114, 5, 23, 0, 0, 114, 115, 5, 18, 0, 0, 115, 19, 1, 0, 0, 0, 116, 117, 5, 15, 0, 0, 117, 118, 3, 6, 3, 0, 118, 120, 5, 16, 0, 0, 119, 121, 3, 30, 15, 0, 120, 119, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 21, 1, 0, 0, 0, 122, 124, 3, 32, 16, 0, 123, 125, 3, 30, 15, 0, 124, 123, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 23, 1, 0, 0, 0, 126, 128, 5, 23, 0, 0, 127, 129, 3, 30, 15, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 25, 1, 0, 0, 0, 130, 135, 3, 18, 9, 0, 131, 135, 3, 20, 10, 0, 132, 135, 3, 22, 11, 0, 133, 135, 3, 24, 12, 0, 134, 130, 1, 0, 0, 0, 134, 131, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 134, 133, 1, 0, 0, 0, 135, 27, 1, 0, 0, 0, 136, 141, 5, 23, 0, 0, 137, 138, 5, 21, 0, 0, 138, 140, 5, 23, 0, 0, 139, 137, 1, 0, 0, 0, 140, 143, 1, 0, 0, 0, 141, 139, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 29, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 144, 145, 7, 2, 0, 0, 145, 31, 1, 0, 0, 0, 146, 147, 7, 3, 0, 0, 147, 33, 1, 0, 0, 0, 16, 37, 43, 49, 53, 58, 63, 76, 82, 92, 98, 110, 120, 124, 128, 134, 141] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.interp new file mode 100644 index 00000000..c34fc53c --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.interp @@ -0,0 +1,86 @@ +token literal names: +null +'*' +'+' +'?' +'true' +'false' +'this' +'[QualifiedName]' +null +'+=' +'?=' +'|' +':' +';' +',' +'(' +')' +'[' +']' +'{' +'}' +'.' +'~' +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +ID +INT +STRING +COMMENT +WS +CONTINUATION +NL + +rule names: +specification +rule_definition +parameter_list +alternatives +alternative +element +assignment +non_parsing_assignment +non_parsing_empty +cross_reference +group +terminal +non_terminal +element_core +dotted_id +suffix_op +value_literal + + +atn: +[4, 1, 29, 152, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0, 5, 0, 36, 8, 0, 10, 0, 12, 0, 39, 9, 0, 1, 0, 4, 0, 42, 8, 0, 11, 0, 12, 0, 43, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 50, 8, 1, 1, 1, 1, 1, 3, 1, 54, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 59, 8, 1, 1, 1, 4, 1, 62, 8, 1, 11, 1, 12, 1, 63, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 75, 8, 3, 10, 3, 12, 3, 78, 9, 3, 1, 4, 5, 4, 81, 8, 4, 10, 4, 12, 4, 84, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 93, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 98, 8, 6, 1, 6, 1, 6, 3, 6, 102, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 3, 9, 114, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 124, 8, 10, 1, 11, 1, 11, 3, 11, 128, 8, 11, 1, 12, 1, 12, 3, 12, 132, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 138, 8, 13, 1, 14, 1, 14, 1, 14, 5, 14, 143, 8, 14, 10, 14, 12, 14, 146, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 0, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 4, 1, 0, 8, 10, 1, 0, 8, 9, 1, 0, 1, 3, 2, 0, 4, 7, 23, 25, 158, 0, 37, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 65, 1, 0, 0, 0, 6, 71, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 92, 1, 0, 0, 0, 12, 94, 1, 0, 0, 0, 14, 103, 1, 0, 0, 0, 16, 109, 1, 0, 0, 0, 18, 113, 1, 0, 0, 0, 20, 119, 1, 0, 0, 0, 22, 125, 1, 0, 0, 0, 24, 129, 1, 0, 0, 0, 26, 137, 1, 0, 0, 0, 28, 139, 1, 0, 0, 0, 30, 147, 1, 0, 0, 0, 32, 149, 1, 0, 0, 0, 34, 36, 5, 29, 0, 0, 35, 34, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 41, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 42, 3, 2, 1, 0, 41, 40, 1, 0, 0, 0, 42, 43, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 43, 44, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 46, 5, 0, 0, 1, 46, 1, 1, 0, 0, 0, 47, 49, 5, 23, 0, 0, 48, 50, 3, 4, 2, 0, 49, 48, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 52, 5, 12, 0, 0, 52, 54, 5, 23, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 55, 1, 0, 0, 0, 55, 56, 5, 8, 0, 0, 56, 58, 3, 6, 3, 0, 57, 59, 5, 13, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 61, 1, 0, 0, 0, 60, 62, 5, 29, 0, 0, 61, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 3, 1, 0, 0, 0, 65, 66, 5, 15, 0, 0, 66, 67, 5, 23, 0, 0, 67, 68, 5, 12, 0, 0, 68, 69, 5, 23, 0, 0, 69, 70, 5, 16, 0, 0, 70, 5, 1, 0, 0, 0, 71, 76, 3, 8, 4, 0, 72, 73, 5, 11, 0, 0, 73, 75, 3, 8, 4, 0, 74, 72, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 7, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 81, 3, 10, 5, 0, 80, 79, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 93, 3, 12, 6, 0, 86, 93, 3, 14, 7, 0, 87, 93, 3, 16, 8, 0, 88, 93, 3, 18, 9, 0, 89, 93, 3, 20, 10, 0, 90, 93, 3, 22, 11, 0, 91, 93, 3, 24, 12, 0, 92, 85, 1, 0, 0, 0, 92, 86, 1, 0, 0, 0, 92, 87, 1, 0, 0, 0, 92, 88, 1, 0, 0, 0, 92, 89, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 92, 91, 1, 0, 0, 0, 93, 11, 1, 0, 0, 0, 94, 95, 3, 28, 14, 0, 95, 97, 7, 0, 0, 0, 96, 98, 5, 22, 0, 0, 97, 96, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 101, 3, 26, 13, 0, 100, 102, 3, 30, 15, 0, 101, 100, 1, 0, 0, 0, 101, 102, 1, 0, 0, 0, 102, 13, 1, 0, 0, 0, 103, 104, 5, 19, 0, 0, 104, 105, 3, 28, 14, 0, 105, 106, 7, 1, 0, 0, 106, 107, 3, 32, 16, 0, 107, 108, 5, 20, 0, 0, 108, 15, 1, 0, 0, 0, 109, 110, 5, 19, 0, 0, 110, 111, 5, 20, 0, 0, 111, 17, 1, 0, 0, 0, 112, 114, 5, 22, 0, 0, 113, 112, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 5, 17, 0, 0, 116, 117, 5, 23, 0, 0, 117, 118, 5, 18, 0, 0, 118, 19, 1, 0, 0, 0, 119, 120, 5, 15, 0, 0, 120, 121, 3, 6, 3, 0, 121, 123, 5, 16, 0, 0, 122, 124, 3, 30, 15, 0, 123, 122, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 21, 1, 0, 0, 0, 125, 127, 3, 32, 16, 0, 126, 128, 3, 30, 15, 0, 127, 126, 1, 0, 0, 0, 127, 128, 1, 0, 0, 0, 128, 23, 1, 0, 0, 0, 129, 131, 5, 23, 0, 0, 130, 132, 3, 30, 15, 0, 131, 130, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 25, 1, 0, 0, 0, 133, 138, 3, 18, 9, 0, 134, 138, 3, 20, 10, 0, 135, 138, 3, 22, 11, 0, 136, 138, 3, 24, 12, 0, 137, 133, 1, 0, 0, 0, 137, 134, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 136, 1, 0, 0, 0, 138, 27, 1, 0, 0, 0, 139, 144, 5, 23, 0, 0, 140, 141, 5, 21, 0, 0, 141, 143, 5, 23, 0, 0, 142, 140, 1, 0, 0, 0, 143, 146, 1, 0, 0, 0, 144, 142, 1, 0, 0, 0, 144, 145, 1, 0, 0, 0, 145, 29, 1, 0, 0, 0, 146, 144, 1, 0, 0, 0, 147, 148, 7, 2, 0, 0, 148, 31, 1, 0, 0, 0, 149, 150, 7, 3, 0, 0, 150, 33, 1, 0, 0, 0, 17, 37, 43, 49, 53, 58, 63, 76, 82, 92, 97, 101, 113, 123, 127, 131, 137, 144] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.tokens similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.tokens diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfBaseListener.cs similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfBaseListener.cs diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfBaseVisitor.cs similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfBaseVisitor.cs diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.cs similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.cs diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.interp similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.interp diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.tokens similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.tokens diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfListener.cs similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfListener.cs diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfParser.cs similarity index 92% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfParser.cs index 14ce997c..f48c7aa7 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfParser.cs @@ -620,6 +620,7 @@ public ElementContext element() { public partial class AssignmentContext : ParserRuleContext { public Dotted_idContext property; public IToken op; + public IToken prefix; public Element_coreContext content; public Suffix_opContext suffix; [System.Diagnostics.DebuggerNonUserCode] public Dotted_idContext dotted_id() { @@ -631,6 +632,7 @@ [System.Diagnostics.DebuggerNonUserCode] public Element_coreContext element_core [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSIGN() { return GetToken(kebnfParser.ASSIGN, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ADD_ASSIGN() { return GetToken(kebnfParser.ADD_ASSIGN, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode BOOL_ASSIGN() { return GetToken(kebnfParser.BOOL_ASSIGN, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode TILDE() { return GetToken(kebnfParser.TILDE, 0); } [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { return GetRuleContext(0); } @@ -677,14 +679,24 @@ public AssignmentContext assignment() { ErrorHandler.ReportMatch(this); Consume(); } - State = 96; + State = 97; + ErrorHandler.Sync(this); + switch ( Interpreter.AdaptivePredict(TokenStream,9,Context) ) { + case 1: + { + State = 96; + _localctx.prefix = Match(TILDE); + } + break; + } + State = 99; _localctx.content = element_core(); - State = 98; + State = 101; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 14L) != 0)) { { - State = 97; + State = 100; _localctx.suffix = suffix_op(); } } @@ -747,11 +759,11 @@ public Non_parsing_assignmentContext non_parsing_assignment() { try { EnterOuterAlt(_localctx, 1); { - State = 100; + State = 103; Match(LBRACE); - State = 101; + State = 104; _localctx.property = dotted_id(); - State = 102; + State = 105; _localctx.op = TokenStream.LT(1); _la = TokenStream.LA(1); if ( !(_la==ASSIGN || _la==ADD_ASSIGN) ) { @@ -761,9 +773,9 @@ public Non_parsing_assignmentContext non_parsing_assignment() { ErrorHandler.ReportMatch(this); Consume(); } - State = 103; + State = 106; _localctx.val = value_literal(); - State = 104; + State = 107; Match(RBRACE); } } @@ -811,9 +823,9 @@ public Non_parsing_emptyContext non_parsing_empty() { try { EnterOuterAlt(_localctx, 1); { - State = 106; + State = 109; Match(LBRACE); - State = 107; + State = 110; Match(RBRACE); } } @@ -865,21 +877,21 @@ public Cross_referenceContext cross_reference() { try { EnterOuterAlt(_localctx, 1); { - State = 110; + State = 113; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==TILDE) { { - State = 109; + State = 112; Match(TILDE); } } - State = 112; + State = 115; Match(LBRACK); - State = 113; + State = 116; _localctx.@ref = Match(ID); - State = 114; + State = 117; Match(RBRACK); } } @@ -934,18 +946,18 @@ public GroupContext group() { try { EnterOuterAlt(_localctx, 1); { - State = 116; + State = 119; Match(LPAREN); - State = 117; + State = 120; alternatives(); - State = 118; + State = 121; Match(RPAREN); - State = 120; + State = 123; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,11,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,12,Context) ) { case 1: { - State = 119; + State = 122; _localctx.suffix = suffix_op(); } break; @@ -1002,14 +1014,14 @@ public TerminalContext terminal() { try { EnterOuterAlt(_localctx, 1); { - State = 122; + State = 125; _localctx.val = value_literal(); - State = 124; + State = 127; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,12,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,13,Context) ) { case 1: { - State = 123; + State = 126; _localctx.suffix = suffix_op(); } break; @@ -1064,14 +1076,14 @@ public Non_terminalContext non_terminal() { try { EnterOuterAlt(_localctx, 1); { - State = 126; + State = 129; _localctx.name = Match(ID); - State = 128; + State = 131; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,13,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { case 1: { - State = 127; + State = 130; _localctx.suffix = suffix_op(); } break; @@ -1130,34 +1142,34 @@ public Element_coreContext element_core() { Element_coreContext _localctx = new Element_coreContext(Context, State); EnterRule(_localctx, 26, RULE_element_core); try { - State = 134; + State = 137; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,15,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 130; + State = 133; cross_reference(); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 131; + State = 134; group(); } break; case 3: EnterOuterAlt(_localctx, 3); { - State = 132; + State = 135; terminal(); } break; case 4: EnterOuterAlt(_localctx, 4); { - State = 133; + State = 136; non_terminal(); } break; @@ -1214,21 +1226,21 @@ public Dotted_idContext dotted_id() { try { EnterOuterAlt(_localctx, 1); { - State = 136; + State = 139; Match(ID); - State = 141; + State = 144; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==DOT) { { { - State = 137; + State = 140; Match(DOT); - State = 138; + State = 141; Match(ID); } } - State = 143; + State = 146; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } @@ -1277,7 +1289,7 @@ public Suffix_opContext suffix_op() { try { EnterOuterAlt(_localctx, 1); { - State = 144; + State = 147; _la = TokenStream.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 14L) != 0)) ) { ErrorHandler.RecoverInline(this); @@ -1334,7 +1346,7 @@ public Value_literalContext value_literal() { try { EnterOuterAlt(_localctx, 1); { - State = 146; + State = 149; _la = TokenStream.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 58720496L) != 0)) ) { ErrorHandler.RecoverInline(this); @@ -1357,52 +1369,53 @@ public Value_literalContext value_literal() { } private static int[] _serializedATN = { - 4,1,29,149,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7, + 4,1,29,152,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7, 7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14, 2,15,7,15,2,16,7,16,1,0,5,0,36,8,0,10,0,12,0,39,9,0,1,0,4,0,42,8,0,11, 0,12,0,43,1,0,1,0,1,1,1,1,3,1,50,8,1,1,1,1,1,3,1,54,8,1,1,1,1,1,1,1,3, 1,59,8,1,1,1,4,1,62,8,1,11,1,12,1,63,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1, 3,5,3,75,8,3,10,3,12,3,78,9,3,1,4,5,4,81,8,4,10,4,12,4,84,9,4,1,5,1,5, - 1,5,1,5,1,5,1,5,1,5,3,5,93,8,5,1,6,1,6,1,6,1,6,3,6,99,8,6,1,7,1,7,1,7, - 1,7,1,7,1,7,1,8,1,8,1,8,1,9,3,9,111,8,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10, - 1,10,3,10,121,8,10,1,11,1,11,3,11,125,8,11,1,12,1,12,3,12,129,8,12,1,13, - 1,13,1,13,1,13,3,13,135,8,13,1,14,1,14,1,14,5,14,140,8,14,10,14,12,14, - 143,9,14,1,15,1,15,1,16,1,16,1,16,0,0,17,0,2,4,6,8,10,12,14,16,18,20,22, - 24,26,28,30,32,0,4,1,0,8,10,1,0,8,9,1,0,1,3,2,0,4,7,23,25,154,0,37,1,0, - 0,0,2,47,1,0,0,0,4,65,1,0,0,0,6,71,1,0,0,0,8,82,1,0,0,0,10,92,1,0,0,0, - 12,94,1,0,0,0,14,100,1,0,0,0,16,106,1,0,0,0,18,110,1,0,0,0,20,116,1,0, - 0,0,22,122,1,0,0,0,24,126,1,0,0,0,26,134,1,0,0,0,28,136,1,0,0,0,30,144, - 1,0,0,0,32,146,1,0,0,0,34,36,5,29,0,0,35,34,1,0,0,0,36,39,1,0,0,0,37,35, - 1,0,0,0,37,38,1,0,0,0,38,41,1,0,0,0,39,37,1,0,0,0,40,42,3,2,1,0,41,40, - 1,0,0,0,42,43,1,0,0,0,43,41,1,0,0,0,43,44,1,0,0,0,44,45,1,0,0,0,45,46, - 5,0,0,1,46,1,1,0,0,0,47,49,5,23,0,0,48,50,3,4,2,0,49,48,1,0,0,0,49,50, - 1,0,0,0,50,53,1,0,0,0,51,52,5,12,0,0,52,54,5,23,0,0,53,51,1,0,0,0,53,54, - 1,0,0,0,54,55,1,0,0,0,55,56,5,8,0,0,56,58,3,6,3,0,57,59,5,13,0,0,58,57, - 1,0,0,0,58,59,1,0,0,0,59,61,1,0,0,0,60,62,5,29,0,0,61,60,1,0,0,0,62,63, - 1,0,0,0,63,61,1,0,0,0,63,64,1,0,0,0,64,3,1,0,0,0,65,66,5,15,0,0,66,67, - 5,23,0,0,67,68,5,12,0,0,68,69,5,23,0,0,69,70,5,16,0,0,70,5,1,0,0,0,71, - 76,3,8,4,0,72,73,5,11,0,0,73,75,3,8,4,0,74,72,1,0,0,0,75,78,1,0,0,0,76, - 74,1,0,0,0,76,77,1,0,0,0,77,7,1,0,0,0,78,76,1,0,0,0,79,81,3,10,5,0,80, - 79,1,0,0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83,1,0,0,0,83,9,1,0,0,0,84,82, - 1,0,0,0,85,93,3,12,6,0,86,93,3,14,7,0,87,93,3,16,8,0,88,93,3,18,9,0,89, - 93,3,20,10,0,90,93,3,22,11,0,91,93,3,24,12,0,92,85,1,0,0,0,92,86,1,0,0, - 0,92,87,1,0,0,0,92,88,1,0,0,0,92,89,1,0,0,0,92,90,1,0,0,0,92,91,1,0,0, - 0,93,11,1,0,0,0,94,95,3,28,14,0,95,96,7,0,0,0,96,98,3,26,13,0,97,99,3, - 30,15,0,98,97,1,0,0,0,98,99,1,0,0,0,99,13,1,0,0,0,100,101,5,19,0,0,101, - 102,3,28,14,0,102,103,7,1,0,0,103,104,3,32,16,0,104,105,5,20,0,0,105,15, - 1,0,0,0,106,107,5,19,0,0,107,108,5,20,0,0,108,17,1,0,0,0,109,111,5,22, - 0,0,110,109,1,0,0,0,110,111,1,0,0,0,111,112,1,0,0,0,112,113,5,17,0,0,113, - 114,5,23,0,0,114,115,5,18,0,0,115,19,1,0,0,0,116,117,5,15,0,0,117,118, - 3,6,3,0,118,120,5,16,0,0,119,121,3,30,15,0,120,119,1,0,0,0,120,121,1,0, - 0,0,121,21,1,0,0,0,122,124,3,32,16,0,123,125,3,30,15,0,124,123,1,0,0,0, - 124,125,1,0,0,0,125,23,1,0,0,0,126,128,5,23,0,0,127,129,3,30,15,0,128, - 127,1,0,0,0,128,129,1,0,0,0,129,25,1,0,0,0,130,135,3,18,9,0,131,135,3, - 20,10,0,132,135,3,22,11,0,133,135,3,24,12,0,134,130,1,0,0,0,134,131,1, - 0,0,0,134,132,1,0,0,0,134,133,1,0,0,0,135,27,1,0,0,0,136,141,5,23,0,0, - 137,138,5,21,0,0,138,140,5,23,0,0,139,137,1,0,0,0,140,143,1,0,0,0,141, - 139,1,0,0,0,141,142,1,0,0,0,142,29,1,0,0,0,143,141,1,0,0,0,144,145,7,2, - 0,0,145,31,1,0,0,0,146,147,7,3,0,0,147,33,1,0,0,0,16,37,43,49,53,58,63, - 76,82,92,98,110,120,124,128,134,141 + 1,5,1,5,1,5,1,5,1,5,3,5,93,8,5,1,6,1,6,1,6,3,6,98,8,6,1,6,1,6,3,6,102, + 8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,9,3,9,114,8,9,1,9,1,9,1,9,1, + 9,1,10,1,10,1,10,1,10,3,10,124,8,10,1,11,1,11,3,11,128,8,11,1,12,1,12, + 3,12,132,8,12,1,13,1,13,1,13,1,13,3,13,138,8,13,1,14,1,14,1,14,5,14,143, + 8,14,10,14,12,14,146,9,14,1,15,1,15,1,16,1,16,1,16,0,0,17,0,2,4,6,8,10, + 12,14,16,18,20,22,24,26,28,30,32,0,4,1,0,8,10,1,0,8,9,1,0,1,3,2,0,4,7, + 23,25,158,0,37,1,0,0,0,2,47,1,0,0,0,4,65,1,0,0,0,6,71,1,0,0,0,8,82,1,0, + 0,0,10,92,1,0,0,0,12,94,1,0,0,0,14,103,1,0,0,0,16,109,1,0,0,0,18,113,1, + 0,0,0,20,119,1,0,0,0,22,125,1,0,0,0,24,129,1,0,0,0,26,137,1,0,0,0,28,139, + 1,0,0,0,30,147,1,0,0,0,32,149,1,0,0,0,34,36,5,29,0,0,35,34,1,0,0,0,36, + 39,1,0,0,0,37,35,1,0,0,0,37,38,1,0,0,0,38,41,1,0,0,0,39,37,1,0,0,0,40, + 42,3,2,1,0,41,40,1,0,0,0,42,43,1,0,0,0,43,41,1,0,0,0,43,44,1,0,0,0,44, + 45,1,0,0,0,45,46,5,0,0,1,46,1,1,0,0,0,47,49,5,23,0,0,48,50,3,4,2,0,49, + 48,1,0,0,0,49,50,1,0,0,0,50,53,1,0,0,0,51,52,5,12,0,0,52,54,5,23,0,0,53, + 51,1,0,0,0,53,54,1,0,0,0,54,55,1,0,0,0,55,56,5,8,0,0,56,58,3,6,3,0,57, + 59,5,13,0,0,58,57,1,0,0,0,58,59,1,0,0,0,59,61,1,0,0,0,60,62,5,29,0,0,61, + 60,1,0,0,0,62,63,1,0,0,0,63,61,1,0,0,0,63,64,1,0,0,0,64,3,1,0,0,0,65,66, + 5,15,0,0,66,67,5,23,0,0,67,68,5,12,0,0,68,69,5,23,0,0,69,70,5,16,0,0,70, + 5,1,0,0,0,71,76,3,8,4,0,72,73,5,11,0,0,73,75,3,8,4,0,74,72,1,0,0,0,75, + 78,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,0,77,7,1,0,0,0,78,76,1,0,0,0,79,81, + 3,10,5,0,80,79,1,0,0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83,1,0,0,0,83,9, + 1,0,0,0,84,82,1,0,0,0,85,93,3,12,6,0,86,93,3,14,7,0,87,93,3,16,8,0,88, + 93,3,18,9,0,89,93,3,20,10,0,90,93,3,22,11,0,91,93,3,24,12,0,92,85,1,0, + 0,0,92,86,1,0,0,0,92,87,1,0,0,0,92,88,1,0,0,0,92,89,1,0,0,0,92,90,1,0, + 0,0,92,91,1,0,0,0,93,11,1,0,0,0,94,95,3,28,14,0,95,97,7,0,0,0,96,98,5, + 22,0,0,97,96,1,0,0,0,97,98,1,0,0,0,98,99,1,0,0,0,99,101,3,26,13,0,100, + 102,3,30,15,0,101,100,1,0,0,0,101,102,1,0,0,0,102,13,1,0,0,0,103,104,5, + 19,0,0,104,105,3,28,14,0,105,106,7,1,0,0,106,107,3,32,16,0,107,108,5,20, + 0,0,108,15,1,0,0,0,109,110,5,19,0,0,110,111,5,20,0,0,111,17,1,0,0,0,112, + 114,5,22,0,0,113,112,1,0,0,0,113,114,1,0,0,0,114,115,1,0,0,0,115,116,5, + 17,0,0,116,117,5,23,0,0,117,118,5,18,0,0,118,19,1,0,0,0,119,120,5,15,0, + 0,120,121,3,6,3,0,121,123,5,16,0,0,122,124,3,30,15,0,123,122,1,0,0,0,123, + 124,1,0,0,0,124,21,1,0,0,0,125,127,3,32,16,0,126,128,3,30,15,0,127,126, + 1,0,0,0,127,128,1,0,0,0,128,23,1,0,0,0,129,131,5,23,0,0,130,132,3,30,15, + 0,131,130,1,0,0,0,131,132,1,0,0,0,132,25,1,0,0,0,133,138,3,18,9,0,134, + 138,3,20,10,0,135,138,3,22,11,0,136,138,3,24,12,0,137,133,1,0,0,0,137, + 134,1,0,0,0,137,135,1,0,0,0,137,136,1,0,0,0,138,27,1,0,0,0,139,144,5,23, + 0,0,140,141,5,21,0,0,141,143,5,23,0,0,142,140,1,0,0,0,143,146,1,0,0,0, + 144,142,1,0,0,0,144,145,1,0,0,0,145,29,1,0,0,0,146,144,1,0,0,0,147,148, + 7,2,0,0,148,31,1,0,0,0,149,150,7,3,0,0,150,33,1,0,0,0,17,37,43,49,53,58, + 63,76,82,92,97,101,113,123,127,131,137,144 }; public static readonly ATN _ATN = diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfVisitor.cs similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfVisitor.cs diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs index 19d83112..719dd5d2 100644 --- a/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs +++ b/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs @@ -36,8 +36,13 @@ public class AssignmentElement: RuleElement public string Operator { get; set; } /// - /// Getss or sets the assignment value + /// Gets or sets the assignment value /// public RuleElement Value { get; set; } + + /// + /// Gets or sets an optional prefix + /// + public string Prefix { get; set; } } } diff --git a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs index a5fcd1b6..fff2225b 100644 --- a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs +++ b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs @@ -56,6 +56,11 @@ public override object VisitRule_definition(kebnfParser.Rule_definitionContext c TargetElementName = context.name.Text }; + if (string.IsNullOrWhiteSpace(rule.RuleName)) + { + rule.RuleName = rule.TargetElementName; + } + if (context.parameter_list() != null) { rule.Parameter = new RuleParameter() @@ -103,7 +108,8 @@ public override object VisitAssignment(kebnfParser.AssignmentContext context) Property = context.property.GetText(), Operator = context.op.Text, Suffix = context.suffix?.GetText(), - Value = (RuleElement)this.Visit(context.content) + Value = (RuleElement)this.Visit(context.content), + Prefix = context.prefix?.Text }; } diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs index 97f881e3..0797bc83 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------------------------- -// +// // // Copyright 2022-2026 Starion Group S.A. // @@ -24,29 +24,33 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class {{this.Name}}TextualNotationBuilder: TextualNotationBuilder + public class {{this.ClassContext.Name}}TextualNotationBuilder: TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced - public {{this.Name}}TextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + public {{this.ClassContext.Name}}TextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) { } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the provided /// - /// The from which the textual notation should be build + /// The from which the textual notation should be build /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace this }}.{{ this.Name }} poco) + public override string BuildTextualNotation(SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace this.ClassContext }}.{{ this.ClassContext.Name }} poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + {{RulesHelper.WriteForPoco this.ClassContext this.Rules}} + return stringBuilder.ToString(); } } } From 5a7d46c94e9a56a48ed876a1fd3cca0eae15d17a Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 20 Feb 2026 16:12:43 +0100 Subject: [PATCH 04/15] [WIP] Improved G4 and process TerminalElement rules --- Resources/kebnf.g4 | 12 +- .../UmlCoreTextualNotationBuilderGenerator.cs | 2 + .../NET/CodeGenerator/Grammar/kebnf.interp | 90 +++++++ .../NET/CodeGenerator/Grammar}/kebnf.tokens | 16 +- .../Grammar}/kebnfBaseListener.cs | 0 .../Grammar}/kebnfBaseVisitor.cs | 0 .../NET/CodeGenerator/Grammar/kebnfLexer.cs | 185 ++++++++++++++ .../CodeGenerator/Grammar/kebnfLexer.interp | 110 +++++++++ .../CodeGenerator/Grammar}/kebnfLexer.tokens | 16 +- .../CodeGenerator/Grammar}/kebnfListener.cs | 0 .../NET/CodeGenerator/Grammar}/kebnfParser.cs | 228 ++++++++++-------- .../CodeGenerator/Grammar}/kebnfVisitor.cs | 0 .../Grammar/AutoGenGrammar/kebnf.interp | 86 ------- .../Grammar/AutoGenGrammar/kebnfLexer.cs | 174 ------------- .../Grammar/AutoGenGrammar/kebnfLexer.interp | 104 -------- .../Grammar/Model/TextualNotationRule.cs | 5 + .../Grammar/Model/ValueLiteralElement.cs | 33 +++ .../TextualNotationSpecificationVisitor.cs | 24 +- .../HandleBarHelpers/RulesHelper.cs | 103 ++++++++ ...AcceptActionUsageTextualNotationBuilder.cs | 8 +- .../ActionDefinitionTextualNotationBuilder.cs | 21 +- .../ActionUsageTextualNotationBuilder.cs | 20 +- .../ActorMembershipTextualNotationBuilder.cs | 8 +- ...ocationDefinitionTextualNotationBuilder.cs | 18 +- .../AllocationUsageTextualNotationBuilder.cs | 21 +- ...sisCaseDefinitionTextualNotationBuilder.cs | 21 +- ...AnalysisCaseUsageTextualNotationBuilder.cs | 26 +- ...AnnotatingElementTextualNotationBuilder.cs | 30 ++- .../AnnotationTextualNotationBuilder.cs | 11 +- ...rtConstraintUsageTextualNotationBuilder.cs | 19 +- ...gnmentActionUsageTextualNotationBuilder.cs | 8 +- ...ociationStructureTextualNotationBuilder.cs | 25 +- .../AssociationTextualNotationBuilder.cs | 20 +- ...tributeDefinitionTextualNotationBuilder.cs | 18 +- .../AttributeUsageTextualNotationBuilder.cs | 19 +- .../BehaviorTextualNotationBuilder.cs | 22 +- ...gConnectorAsUsageTextualNotationBuilder.cs | 23 +- .../BindingConnectorTextualNotationBuilder.cs | 24 +- ...BooleanExpressionTextualNotationBuilder.cs | 25 +- ...ulationDefinitionTextualNotationBuilder.cs | 21 +- .../CalculationUsageTextualNotationBuilder.cs | 20 +- .../CaseDefinitionTextualNotationBuilder.cs | 21 +- .../CaseUsageTextualNotationBuilder.cs | 24 +- .../ClassTextualNotationBuilder.cs | 22 +- .../ClassifierTextualNotationBuilder.cs | 20 +- ...CollectExpressionTextualNotationBuilder.cs | 13 +- .../CommentTextualNotationBuilder.cs | 13 +- ...ConcernDefinitionTextualNotationBuilder.cs | 21 +- .../ConcernUsageTextualNotationBuilder.cs | 26 +- ...tedPortDefinitionTextualNotationBuilder.cs | 11 +- ...jugatedPortTypingTextualNotationBuilder.cs | 25 +- .../ConjugationTextualNotationBuilder.cs | 26 +- ...nectionDefinitionTextualNotationBuilder.cs | 18 +- .../ConnectionUsageTextualNotationBuilder.cs | 17 +- .../ConnectorTextualNotationBuilder.cs | 20 +- ...straintDefinitionTextualNotationBuilder.cs | 21 +- .../ConstraintUsageTextualNotationBuilder.cs | 24 +- ...tructorExpressionTextualNotationBuilder.cs | 13 +- .../CrossSubsettingTextualNotationBuilder.cs | 8 +- .../DataTypeTextualNotationBuilder.cs | 22 +- .../DecisionNodeTextualNotationBuilder.cs | 20 +- .../DefinitionTextualNotationBuilder.cs | 16 +- .../DependencyTextualNotationBuilder.cs | 24 +- .../DifferencingTextualNotationBuilder.cs | 14 +- .../DisjoiningTextualNotationBuilder.cs | 20 +- .../DocumentationTextualNotationBuilder.cs | 18 +- ...tFilterMembershipTextualNotationBuilder.cs | 8 +- ...FeatureMembershipTextualNotationBuilder.cs | 8 +- ...erationDefinitionTextualNotationBuilder.cs | 21 +- .../EnumerationUsageTextualNotationBuilder.cs | 21 +- ...ntOccurrenceUsageTextualNotationBuilder.cs | 20 +- ...ExhibitStateUsageTextualNotationBuilder.cs | 23 +- .../ExpressionTextualNotationBuilder.cs | 27 ++- ...reChainExpressionTextualNotationBuilder.cs | 13 +- .../FeatureChainingTextualNotationBuilder.cs | 8 +- .../FeatureInvertingTextualNotationBuilder.cs | 20 +- ...FeatureMembershipTextualNotationBuilder.cs | 8 +- ...ferenceExpressionTextualNotationBuilder.cs | 12 +- .../FeatureTextualNotationBuilder.cs | 19 +- .../FeatureTypingTextualNotationBuilder.cs | 29 ++- .../FeatureValueTextualNotationBuilder.cs | 17 +- .../FlowDefinitionTextualNotationBuilder.cs | 18 +- .../FlowEndTextualNotationBuilder.cs | 12 +- .../FlowTextualNotationBuilder.cs | 22 +- .../FlowUsageTextualNotationBuilder.cs | 20 +- ...orLoopActionUsageTextualNotationBuilder.cs | 8 +- .../ForkNodeTextualNotationBuilder.cs | 22 +- ...ConcernMembershipTextualNotationBuilder.cs | 8 +- .../FunctionTextualNotationBuilder.cs | 20 +- .../IfActionUsageTextualNotationBuilder.cs | 8 +- ...cludeUseCaseUsageTextualNotationBuilder.cs | 25 +- .../IndexExpressionTextualNotationBuilder.cs | 15 +- .../InteractionTextualNotationBuilder.cs | 22 +- ...terfaceDefinitionTextualNotationBuilder.cs | 21 +- .../InterfaceUsageTextualNotationBuilder.cs | 20 +- .../IntersectingTextualNotationBuilder.cs | 12 +- .../InvariantTextualNotationBuilder.cs | 30 ++- ...ocationExpressionTextualNotationBuilder.cs | 15 +- .../ItemDefinitionTextualNotationBuilder.cs | 18 +- .../ItemUsageTextualNotationBuilder.cs | 19 +- .../JoinNodeTextualNotationBuilder.cs | 20 +- .../LibraryPackageTextualNotationBuilder.cs | 19 +- .../LiteralBooleanTextualNotationBuilder.cs | 11 +- ...LiteralExpressionTextualNotationBuilder.cs | 29 ++- .../LiteralInfinityTextualNotationBuilder.cs | 15 +- .../LiteralIntegerTextualNotationBuilder.cs | 11 +- .../LiteralRationalTextualNotationBuilder.cs | 8 +- .../LiteralStringTextualNotationBuilder.cs | 11 +- .../MembershipExposeTextualNotationBuilder.cs | 13 +- .../MembershipImportTextualNotationBuilder.cs | 12 +- .../MembershipTextualNotationBuilder.cs | 8 +- .../MergeNodeTextualNotationBuilder.cs | 20 +- .../MetaclassTextualNotationBuilder.cs | 20 +- ...aAccessExpressionTextualNotationBuilder.cs | 13 +- ...etadataDefinitionTextualNotationBuilder.cs | 19 +- .../MetadataFeatureTextualNotationBuilder.cs | 19 +- .../MetadataUsageTextualNotationBuilder.cs | 21 +- ...MultiplicityRangeTextualNotationBuilder.cs | 14 +- .../MultiplicityTextualNotationBuilder.cs | 16 +- .../NamespaceExposeTextualNotationBuilder.cs | 15 +- .../NamespaceImportTextualNotationBuilder.cs | 16 +- .../NamespaceTextualNotationBuilder.cs | 17 +- .../NullExpressionTextualNotationBuilder.cs | 13 +- ...jectiveMembershipTextualNotationBuilder.cs | 8 +- ...urrenceDefinitionTextualNotationBuilder.cs | 18 +- .../OccurrenceUsageTextualNotationBuilder.cs | 17 +- ...peratorExpressionTextualNotationBuilder.cs | 8 +- .../OwningMembershipTextualNotationBuilder.cs | 8 +- .../PackageTextualNotationBuilder.cs | 17 +- ...rameterMembershipTextualNotationBuilder.cs | 8 +- .../PartDefinitionTextualNotationBuilder.cs | 18 +- .../PartUsageTextualNotationBuilder.cs | 19 +- .../PayloadFeatureTextualNotationBuilder.cs | 23 +- ...erformActionUsageTextualNotationBuilder.cs | 20 +- .../PortConjugationTextualNotationBuilder.cs | 10 +- .../PortDefinitionTextualNotationBuilder.cs | 22 +- .../PortUsageTextualNotationBuilder.cs | 17 +- .../PredicateTextualNotationBuilder.cs | 22 +- .../RedefinitionTextualNotationBuilder.cs | 30 ++- ...ferenceSubsettingTextualNotationBuilder.cs | 8 +- .../ReferenceUsageTextualNotationBuilder.cs | 15 +- ...nderingDefinitionTextualNotationBuilder.cs | 18 +- .../RenderingUsageTextualNotationBuilder.cs | 19 +- ...straintMembershipTextualNotationBuilder.cs | 8 +- ...irementDefinitionTextualNotationBuilder.cs | 21 +- .../RequirementUsageTextualNotationBuilder.cs | 24 +- ...icationMembershipTextualNotationBuilder.cs | 8 +- ...ressionMembershipTextualNotationBuilder.cs | 8 +- ...rameterMembershipTextualNotationBuilder.cs | 8 +- ...yRequirementUsageTextualNotationBuilder.cs | 24 +- .../SelectExpressionTextualNotationBuilder.cs | 13 +- .../SendActionUsageTextualNotationBuilder.cs | 8 +- .../SpecializationTextualNotationBuilder.cs | 28 ++- ...eholderMembershipTextualNotationBuilder.cs | 8 +- .../StateDefinitionTextualNotationBuilder.cs | 21 +- ...bactionMembershipTextualNotationBuilder.cs | 8 +- .../StateUsageTextualNotationBuilder.cs | 20 +- .../StepTextualNotationBuilder.cs | 29 ++- .../StructureTextualNotationBuilder.cs | 22 +- ...SubclassificationTextualNotationBuilder.cs | 22 +- ...SubjectMembershipTextualNotationBuilder.cs | 8 +- .../SubsettingTextualNotationBuilder.cs | 28 ++- ...SuccessionAsUsageTextualNotationBuilder.cs | 25 +- .../SuccessionFlowTextualNotationBuilder.cs | 23 +- ...ccessionFlowUsageTextualNotationBuilder.cs | 21 +- .../SuccessionTextualNotationBuilder.cs | 26 +- ...minateActionUsageTextualNotationBuilder.cs | 8 +- ...ualRepresentationTextualNotationBuilder.cs | 18 +- ...FeatureMembershipTextualNotationBuilder.cs | 8 +- .../TransitionUsageTextualNotationBuilder.cs | 22 +- ...ocationExpressionTextualNotationBuilder.cs | 8 +- .../TypeFeaturingTextualNotationBuilder.cs | 20 +- .../TypeTextualNotationBuilder.cs | 20 +- .../UnioningTextualNotationBuilder.cs | 12 +- .../UsageTextualNotationBuilder.cs | 16 +- ...UseCaseDefinitionTextualNotationBuilder.cs | 22 +- .../UseCaseUsageTextualNotationBuilder.cs | 25 +- ...VariantMembershipTextualNotationBuilder.cs | 8 +- ...ionCaseDefinitionTextualNotationBuilder.cs | 21 +- ...ficationCaseUsageTextualNotationBuilder.cs | 24 +- .../ViewDefinitionTextualNotationBuilder.cs | 21 +- ...nderingMembershipTextualNotationBuilder.cs | 8 +- .../ViewUsageTextualNotationBuilder.cs | 23 +- ...ewpointDefinitionTextualNotationBuilder.cs | 21 +- .../ViewpointUsageTextualNotationBuilder.cs | 26 +- ...leLoopActionUsageTextualNotationBuilder.cs | 8 +- 186 files changed, 3296 insertions(+), 821 deletions(-) create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{ => SysML2/NET/CodeGenerator/Grammar}/kebnf.tokens (78%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{ => SysML2/NET/CodeGenerator/Grammar}/kebnfBaseListener.cs (100%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{ => SysML2/NET/CodeGenerator/Grammar}/kebnfBaseVisitor.cs (100%) create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs create mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{ => SysML2/NET/CodeGenerator/Grammar}/kebnfLexer.tokens (78%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{ => SysML2/NET/CodeGenerator/Grammar}/kebnfListener.cs (100%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{ => SysML2/NET/CodeGenerator/Grammar}/kebnfParser.cs (89%) rename SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/{ => SysML2/NET/CodeGenerator/Grammar}/kebnfVisitor.cs (100%) delete mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.interp delete mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.cs delete mode 100644 SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.interp create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs create mode 100644 SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs diff --git a/Resources/kebnf.g4 b/Resources/kebnf.g4 index f068d86e..b67c94d2 100644 --- a/Resources/kebnf.g4 +++ b/Resources/kebnf.g4 @@ -5,7 +5,7 @@ grammar kebnf; specification : (NL)* rule_definition+ EOF ; rule_definition - : name=ID (params=parameter_list)? (COLON target_ast=ID)? ASSIGN rule_body=alternatives SEMICOLON? NL+ + : name=UPPER_ID (params=parameter_list)? (COLON target_ast=UPPER_ID)? ASSIGN rule_body=alternatives SEMICOLON? NL+ ; parameter_list @@ -28,6 +28,7 @@ element | group | terminal | non_terminal + | value_literal ; assignment @@ -51,11 +52,11 @@ group ; terminal - : val=value_literal (suffix=suffix_op)? + : val=SINGLE_QUOTED_STRING (suffix=suffix_op)? ; non_terminal - : name=ID (suffix=suffix_op)? + : name=UPPER_ID (suffix=suffix_op)? ; element_core @@ -63,6 +64,7 @@ element_core | group | terminal | non_terminal + | value_literal ; dotted_id @@ -71,7 +73,7 @@ dotted_id suffix_op : '*' | '+' | '?' ; -value_literal : ID | 'true' | 'false' | 'this' | INT | STRING | '[QualifiedName]'; +value_literal : ID | 'true' | 'false' | 'this' | INT | STRING | '[QualifiedName]' | SINGLE_QUOTED_STRING; // Lexer ASSIGN : '::=' | '=' ; @@ -90,7 +92,9 @@ RBRACE : '}' ; DOT : '.' ; TILDE : '~' ; +UPPER_ID : [A-Z] [a-zA-Z0-9_]* ; ID : [a-zA-Z_][a-zA-Z0-9_]* ; +SINGLE_QUOTED_STRING : '\'' (~['\\] | '\\' .)* '\'' ; INT : [0-9]+ ; STRING : '\'' ( ~['\\] | '\\' . )* '\'' ; diff --git a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs index 0c314862..fd82343a 100644 --- a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs @@ -27,6 +27,7 @@ namespace SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators using SysML2.NET.CodeGenerator.Extensions; using SysML2.NET.CodeGenerator.Grammar.Model; + using SysML2.NET.CodeGenerator.HandleBarHelpers; using uml4net.Extensions; using uml4net.HandleBars; @@ -57,6 +58,7 @@ protected override void RegisterHelpers() { NamedElementHelper.RegisterNamedElementHelper(this.Handlebars); this.Handlebars.RegisterStringHelper(); + this.Handlebars.RegisterRulesHelper(); } /// diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp new file mode 100644 index 00000000..e16ea718 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp @@ -0,0 +1,90 @@ +token literal names: +null +'*' +'+' +'?' +'true' +'false' +'this' +'[QualifiedName]' +null +'+=' +'?=' +'|' +':' +';' +',' +'(' +')' +'[' +']' +'{' +'}' +'.' +'~' +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +UPPER_ID +ID +SINGLE_QUOTED_STRING +INT +STRING +COMMENT +WS +CONTINUATION +NL + +rule names: +specification +rule_definition +parameter_list +alternatives +alternative +element +assignment +non_parsing_assignment +non_parsing_empty +cross_reference +group +terminal +non_terminal +element_core +dotted_id +suffix_op +value_literal + + +atn: +[4, 1, 31, 154, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0, 5, 0, 36, 8, 0, 10, 0, 12, 0, 39, 9, 0, 1, 0, 4, 0, 42, 8, 0, 11, 0, 12, 0, 43, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 50, 8, 1, 1, 1, 1, 1, 3, 1, 54, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 59, 8, 1, 1, 1, 4, 1, 62, 8, 1, 11, 1, 12, 1, 63, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 75, 8, 3, 10, 3, 12, 3, 78, 9, 3, 1, 4, 5, 4, 81, 8, 4, 10, 4, 12, 4, 84, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 94, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 99, 8, 6, 1, 6, 1, 6, 3, 6, 103, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 3, 9, 115, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 125, 8, 10, 1, 11, 1, 11, 3, 11, 129, 8, 11, 1, 12, 1, 12, 3, 12, 133, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 140, 8, 13, 1, 14, 1, 14, 1, 14, 5, 14, 145, 8, 14, 10, 14, 12, 14, 148, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 0, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 4, 1, 0, 8, 10, 1, 0, 8, 9, 1, 0, 1, 3, 2, 0, 4, 7, 24, 27, 162, 0, 37, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 65, 1, 0, 0, 0, 6, 71, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 93, 1, 0, 0, 0, 12, 95, 1, 0, 0, 0, 14, 104, 1, 0, 0, 0, 16, 110, 1, 0, 0, 0, 18, 114, 1, 0, 0, 0, 20, 120, 1, 0, 0, 0, 22, 126, 1, 0, 0, 0, 24, 130, 1, 0, 0, 0, 26, 139, 1, 0, 0, 0, 28, 141, 1, 0, 0, 0, 30, 149, 1, 0, 0, 0, 32, 151, 1, 0, 0, 0, 34, 36, 5, 31, 0, 0, 35, 34, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 41, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 42, 3, 2, 1, 0, 41, 40, 1, 0, 0, 0, 42, 43, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 43, 44, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 46, 5, 0, 0, 1, 46, 1, 1, 0, 0, 0, 47, 49, 5, 23, 0, 0, 48, 50, 3, 4, 2, 0, 49, 48, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 52, 5, 12, 0, 0, 52, 54, 5, 23, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 55, 1, 0, 0, 0, 55, 56, 5, 8, 0, 0, 56, 58, 3, 6, 3, 0, 57, 59, 5, 13, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 61, 1, 0, 0, 0, 60, 62, 5, 31, 0, 0, 61, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 3, 1, 0, 0, 0, 65, 66, 5, 15, 0, 0, 66, 67, 5, 24, 0, 0, 67, 68, 5, 12, 0, 0, 68, 69, 5, 24, 0, 0, 69, 70, 5, 16, 0, 0, 70, 5, 1, 0, 0, 0, 71, 76, 3, 8, 4, 0, 72, 73, 5, 11, 0, 0, 73, 75, 3, 8, 4, 0, 74, 72, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 7, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 81, 3, 10, 5, 0, 80, 79, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 94, 3, 12, 6, 0, 86, 94, 3, 14, 7, 0, 87, 94, 3, 16, 8, 0, 88, 94, 3, 18, 9, 0, 89, 94, 3, 20, 10, 0, 90, 94, 3, 22, 11, 0, 91, 94, 3, 24, 12, 0, 92, 94, 3, 32, 16, 0, 93, 85, 1, 0, 0, 0, 93, 86, 1, 0, 0, 0, 93, 87, 1, 0, 0, 0, 93, 88, 1, 0, 0, 0, 93, 89, 1, 0, 0, 0, 93, 90, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 93, 92, 1, 0, 0, 0, 94, 11, 1, 0, 0, 0, 95, 96, 3, 28, 14, 0, 96, 98, 7, 0, 0, 0, 97, 99, 5, 22, 0, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 102, 3, 26, 13, 0, 101, 103, 3, 30, 15, 0, 102, 101, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 13, 1, 0, 0, 0, 104, 105, 5, 19, 0, 0, 105, 106, 3, 28, 14, 0, 106, 107, 7, 1, 0, 0, 107, 108, 3, 32, 16, 0, 108, 109, 5, 20, 0, 0, 109, 15, 1, 0, 0, 0, 110, 111, 5, 19, 0, 0, 111, 112, 5, 20, 0, 0, 112, 17, 1, 0, 0, 0, 113, 115, 5, 22, 0, 0, 114, 113, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 5, 17, 0, 0, 117, 118, 5, 24, 0, 0, 118, 119, 5, 18, 0, 0, 119, 19, 1, 0, 0, 0, 120, 121, 5, 15, 0, 0, 121, 122, 3, 6, 3, 0, 122, 124, 5, 16, 0, 0, 123, 125, 3, 30, 15, 0, 124, 123, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 21, 1, 0, 0, 0, 126, 128, 5, 25, 0, 0, 127, 129, 3, 30, 15, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 23, 1, 0, 0, 0, 130, 132, 5, 23, 0, 0, 131, 133, 3, 30, 15, 0, 132, 131, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 25, 1, 0, 0, 0, 134, 140, 3, 18, 9, 0, 135, 140, 3, 20, 10, 0, 136, 140, 3, 22, 11, 0, 137, 140, 3, 24, 12, 0, 138, 140, 3, 32, 16, 0, 139, 134, 1, 0, 0, 0, 139, 135, 1, 0, 0, 0, 139, 136, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 138, 1, 0, 0, 0, 140, 27, 1, 0, 0, 0, 141, 146, 5, 24, 0, 0, 142, 143, 5, 21, 0, 0, 143, 145, 5, 24, 0, 0, 144, 142, 1, 0, 0, 0, 145, 148, 1, 0, 0, 0, 146, 144, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 29, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 149, 150, 7, 2, 0, 0, 150, 31, 1, 0, 0, 0, 151, 152, 7, 3, 0, 0, 152, 33, 1, 0, 0, 0, 17, 37, 43, 49, 53, 58, 63, 76, 82, 93, 98, 102, 114, 124, 128, 132, 139, 146] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens similarity index 78% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.tokens rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens index a34fe965..07eb9f09 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.tokens +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens @@ -20,13 +20,15 @@ LBRACE=19 RBRACE=20 DOT=21 TILDE=22 -ID=23 -INT=24 -STRING=25 -COMMENT=26 -WS=27 -CONTINUATION=28 -NL=29 +UPPER_ID=23 +ID=24 +SINGLE_QUOTED_STRING=25 +INT=26 +STRING=27 +COMMENT=28 +WS=29 +CONTINUATION=30 +NL=31 '*'=1 '+'=2 '?'=3 diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfBaseListener.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfBaseListener.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseListener.cs diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfBaseVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfBaseVisitor.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfBaseVisitor.cs diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs new file mode 100644 index 00000000..42c8411d --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs @@ -0,0 +1,185 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// ANTLR Version: 4.13.2 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 + +// Unreachable code detected +#pragma warning disable 0162 +// The variable '...' is assigned but its value is never used +#pragma warning disable 0219 +// Missing XML comment for publicly visible type or member '...' +#pragma warning disable 1591 +// Ambiguous reference in cref attribute +#pragma warning disable 419 + +namespace SysML2.NET.CodeGenerator.Grammar { +using System; +using System.IO; +using System.Text; +using Antlr4.Runtime; +using Antlr4.Runtime.Atn; +using Antlr4.Runtime.Misc; +using DFA = Antlr4.Runtime.Dfa.DFA; + +[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] +[System.CLSCompliant(false)] +public partial class kebnfLexer : Lexer { + protected static DFA[] decisionToDFA; + protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); + public const int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, ASSIGN=8, ADD_ASSIGN=9, + BOOL_ASSIGN=10, PIPE=11, COLON=12, SEMICOLON=13, COMMA=14, LPAREN=15, + RPAREN=16, LBRACK=17, RBRACK=18, LBRACE=19, RBRACE=20, DOT=21, TILDE=22, + UPPER_ID=23, ID=24, SINGLE_QUOTED_STRING=25, INT=26, STRING=27, COMMENT=28, + WS=29, CONTINUATION=30, NL=31; + public static string[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN" + }; + + public static string[] modeNames = { + "DEFAULT_MODE" + }; + + public static readonly string[] ruleNames = { + "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "ASSIGN", "ADD_ASSIGN", + "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", + "SINGLE_QUOTED_STRING", "INT", "STRING", "COMMENT", "WS", "CONTINUATION", + "NL" + }; + + + public kebnfLexer(ICharStream input) + : this(input, Console.Out, Console.Error) { } + + public kebnfLexer(ICharStream input, TextWriter output, TextWriter errorOutput) + : base(input, output, errorOutput) + { + Interpreter = new LexerATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); + } + + private static readonly string[] _LiteralNames = { + null, "'*'", "'+'", "'?'", "'true'", "'false'", "'this'", "'[QualifiedName]'", + null, "'+='", "'?='", "'|'", "':'", "';'", "','", "'('", "')'", "'['", + "']'", "'{'", "'}'", "'.'", "'~'" + }; + private static readonly string[] _SymbolicNames = { + null, null, null, null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", + "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", + "SINGLE_QUOTED_STRING", "INT", "STRING", "COMMENT", "WS", "CONTINUATION", + "NL" + }; + public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); + + [NotNull] + public override IVocabulary Vocabulary + { + get + { + return DefaultVocabulary; + } + } + + public override string GrammarFileName { get { return "kebnf.g4"; } } + + public override string[] RuleNames { get { return ruleNames; } } + + public override string[] ChannelNames { get { return channelNames; } } + + public override string[] ModeNames { get { return modeNames; } } + + public override int[] SerializedAtn { get { return _serializedATN; } } + + static kebnfLexer() { + decisionToDFA = new DFA[_ATN.NumberOfDecisions]; + for (int i = 0; i < _ATN.NumberOfDecisions; i++) { + decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); + } + } + private static int[] _serializedATN = { + 4,0,31,212,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, + 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, + 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28, + 7,28,2,29,7,29,2,30,7,30,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1, + 4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6, + 1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,3,7,106,8,7,1,8,1, + 8,1,8,1,9,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1, + 15,1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1, + 22,1,22,5,22,140,8,22,10,22,12,22,143,9,22,1,23,1,23,5,23,147,8,23,10, + 23,12,23,150,9,23,1,24,1,24,1,24,1,24,5,24,156,8,24,10,24,12,24,159,9, + 24,1,24,1,24,1,25,4,25,164,8,25,11,25,12,25,165,1,26,1,26,1,26,1,26,5, + 26,172,8,26,10,26,12,26,175,9,26,1,26,1,26,1,27,1,27,1,27,1,27,5,27,183, + 8,27,10,27,12,27,186,9,27,1,27,1,27,1,28,4,28,191,8,28,11,28,12,28,192, + 1,28,1,28,1,29,3,29,198,8,29,1,29,1,29,4,29,202,8,29,11,29,12,29,203,1, + 29,1,29,1,30,3,30,209,8,30,1,30,1,30,0,0,31,1,1,3,2,5,3,7,4,9,5,11,6,13, + 7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19, + 39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31, + 1,0,7,1,0,65,90,4,0,48,57,65,90,95,95,97,122,3,0,65,90,95,95,97,122,2, + 0,39,39,92,92,1,0,48,57,2,0,10,10,13,13,2,0,9,9,32,32,224,0,1,1,0,0,0, + 0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0, + 0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0, + 25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1, + 0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0, + 0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57, + 1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,1,63,1,0,0,0,3,65,1,0,0,0,5,67,1,0,0, + 0,7,69,1,0,0,0,9,74,1,0,0,0,11,80,1,0,0,0,13,85,1,0,0,0,15,105,1,0,0,0, + 17,107,1,0,0,0,19,110,1,0,0,0,21,113,1,0,0,0,23,115,1,0,0,0,25,117,1,0, + 0,0,27,119,1,0,0,0,29,121,1,0,0,0,31,123,1,0,0,0,33,125,1,0,0,0,35,127, + 1,0,0,0,37,129,1,0,0,0,39,131,1,0,0,0,41,133,1,0,0,0,43,135,1,0,0,0,45, + 137,1,0,0,0,47,144,1,0,0,0,49,151,1,0,0,0,51,163,1,0,0,0,53,167,1,0,0, + 0,55,178,1,0,0,0,57,190,1,0,0,0,59,197,1,0,0,0,61,208,1,0,0,0,63,64,5, + 42,0,0,64,2,1,0,0,0,65,66,5,43,0,0,66,4,1,0,0,0,67,68,5,63,0,0,68,6,1, + 0,0,0,69,70,5,116,0,0,70,71,5,114,0,0,71,72,5,117,0,0,72,73,5,101,0,0, + 73,8,1,0,0,0,74,75,5,102,0,0,75,76,5,97,0,0,76,77,5,108,0,0,77,78,5,115, + 0,0,78,79,5,101,0,0,79,10,1,0,0,0,80,81,5,116,0,0,81,82,5,104,0,0,82,83, + 5,105,0,0,83,84,5,115,0,0,84,12,1,0,0,0,85,86,5,91,0,0,86,87,5,81,0,0, + 87,88,5,117,0,0,88,89,5,97,0,0,89,90,5,108,0,0,90,91,5,105,0,0,91,92,5, + 102,0,0,92,93,5,105,0,0,93,94,5,101,0,0,94,95,5,100,0,0,95,96,5,78,0,0, + 96,97,5,97,0,0,97,98,5,109,0,0,98,99,5,101,0,0,99,100,5,93,0,0,100,14, + 1,0,0,0,101,102,5,58,0,0,102,103,5,58,0,0,103,106,5,61,0,0,104,106,5,61, + 0,0,105,101,1,0,0,0,105,104,1,0,0,0,106,16,1,0,0,0,107,108,5,43,0,0,108, + 109,5,61,0,0,109,18,1,0,0,0,110,111,5,63,0,0,111,112,5,61,0,0,112,20,1, + 0,0,0,113,114,5,124,0,0,114,22,1,0,0,0,115,116,5,58,0,0,116,24,1,0,0,0, + 117,118,5,59,0,0,118,26,1,0,0,0,119,120,5,44,0,0,120,28,1,0,0,0,121,122, + 5,40,0,0,122,30,1,0,0,0,123,124,5,41,0,0,124,32,1,0,0,0,125,126,5,91,0, + 0,126,34,1,0,0,0,127,128,5,93,0,0,128,36,1,0,0,0,129,130,5,123,0,0,130, + 38,1,0,0,0,131,132,5,125,0,0,132,40,1,0,0,0,133,134,5,46,0,0,134,42,1, + 0,0,0,135,136,5,126,0,0,136,44,1,0,0,0,137,141,7,0,0,0,138,140,7,1,0,0, + 139,138,1,0,0,0,140,143,1,0,0,0,141,139,1,0,0,0,141,142,1,0,0,0,142,46, + 1,0,0,0,143,141,1,0,0,0,144,148,7,2,0,0,145,147,7,1,0,0,146,145,1,0,0, + 0,147,150,1,0,0,0,148,146,1,0,0,0,148,149,1,0,0,0,149,48,1,0,0,0,150,148, + 1,0,0,0,151,157,5,39,0,0,152,156,8,3,0,0,153,154,5,92,0,0,154,156,9,0, + 0,0,155,152,1,0,0,0,155,153,1,0,0,0,156,159,1,0,0,0,157,155,1,0,0,0,157, + 158,1,0,0,0,158,160,1,0,0,0,159,157,1,0,0,0,160,161,5,39,0,0,161,50,1, + 0,0,0,162,164,7,4,0,0,163,162,1,0,0,0,164,165,1,0,0,0,165,163,1,0,0,0, + 165,166,1,0,0,0,166,52,1,0,0,0,167,173,5,39,0,0,168,172,8,3,0,0,169,170, + 5,92,0,0,170,172,9,0,0,0,171,168,1,0,0,0,171,169,1,0,0,0,172,175,1,0,0, + 0,173,171,1,0,0,0,173,174,1,0,0,0,174,176,1,0,0,0,175,173,1,0,0,0,176, + 177,5,39,0,0,177,54,1,0,0,0,178,179,5,47,0,0,179,180,5,47,0,0,180,184, + 1,0,0,0,181,183,8,5,0,0,182,181,1,0,0,0,183,186,1,0,0,0,184,182,1,0,0, + 0,184,185,1,0,0,0,185,187,1,0,0,0,186,184,1,0,0,0,187,188,6,27,0,0,188, + 56,1,0,0,0,189,191,7,6,0,0,190,189,1,0,0,0,191,192,1,0,0,0,192,190,1,0, + 0,0,192,193,1,0,0,0,193,194,1,0,0,0,194,195,6,28,0,0,195,58,1,0,0,0,196, + 198,5,13,0,0,197,196,1,0,0,0,197,198,1,0,0,0,198,199,1,0,0,0,199,201,5, + 10,0,0,200,202,7,6,0,0,201,200,1,0,0,0,202,203,1,0,0,0,203,201,1,0,0,0, + 203,204,1,0,0,0,204,205,1,0,0,0,205,206,6,29,0,0,206,60,1,0,0,0,207,209, + 5,13,0,0,208,207,1,0,0,0,208,209,1,0,0,0,209,210,1,0,0,0,210,211,5,10, + 0,0,211,62,1,0,0,0,14,0,105,141,148,155,157,165,171,173,184,192,197,203, + 208,1,6,0,0 + }; + + public static readonly ATN _ATN = + new ATNDeserializer().Deserialize(_serializedATN); + + +} +} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp new file mode 100644 index 00000000..72caecf6 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp @@ -0,0 +1,110 @@ +token literal names: +null +'*' +'+' +'?' +'true' +'false' +'this' +'[QualifiedName]' +null +'+=' +'?=' +'|' +':' +';' +',' +'(' +')' +'[' +']' +'{' +'}' +'.' +'~' +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +null +null +null +null +null +null +null +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +UPPER_ID +ID +SINGLE_QUOTED_STRING +INT +STRING +COMMENT +WS +CONTINUATION +NL + +rule names: +T__0 +T__1 +T__2 +T__3 +T__4 +T__5 +T__6 +ASSIGN +ADD_ASSIGN +BOOL_ASSIGN +PIPE +COLON +SEMICOLON +COMMA +LPAREN +RPAREN +LBRACK +RBRACK +LBRACE +RBRACE +DOT +TILDE +UPPER_ID +ID +SINGLE_QUOTED_STRING +INT +STRING +COMMENT +WS +CONTINUATION +NL + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 31, 212, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 106, 8, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 5, 22, 140, 8, 22, 10, 22, 12, 22, 143, 9, 22, 1, 23, 1, 23, 5, 23, 147, 8, 23, 10, 23, 12, 23, 150, 9, 23, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 156, 8, 24, 10, 24, 12, 24, 159, 9, 24, 1, 24, 1, 24, 1, 25, 4, 25, 164, 8, 25, 11, 25, 12, 25, 165, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 172, 8, 26, 10, 26, 12, 26, 175, 9, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 5, 27, 183, 8, 27, 10, 27, 12, 27, 186, 9, 27, 1, 27, 1, 27, 1, 28, 4, 28, 191, 8, 28, 11, 28, 12, 28, 192, 1, 28, 1, 28, 1, 29, 3, 29, 198, 8, 29, 1, 29, 1, 29, 4, 29, 202, 8, 29, 11, 29, 12, 29, 203, 1, 29, 1, 29, 1, 30, 3, 30, 209, 8, 30, 1, 30, 1, 30, 0, 0, 31, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 1, 0, 7, 1, 0, 65, 90, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 2, 0, 39, 39, 92, 92, 1, 0, 48, 57, 2, 0, 10, 10, 13, 13, 2, 0, 9, 9, 32, 32, 224, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 1, 63, 1, 0, 0, 0, 3, 65, 1, 0, 0, 0, 5, 67, 1, 0, 0, 0, 7, 69, 1, 0, 0, 0, 9, 74, 1, 0, 0, 0, 11, 80, 1, 0, 0, 0, 13, 85, 1, 0, 0, 0, 15, 105, 1, 0, 0, 0, 17, 107, 1, 0, 0, 0, 19, 110, 1, 0, 0, 0, 21, 113, 1, 0, 0, 0, 23, 115, 1, 0, 0, 0, 25, 117, 1, 0, 0, 0, 27, 119, 1, 0, 0, 0, 29, 121, 1, 0, 0, 0, 31, 123, 1, 0, 0, 0, 33, 125, 1, 0, 0, 0, 35, 127, 1, 0, 0, 0, 37, 129, 1, 0, 0, 0, 39, 131, 1, 0, 0, 0, 41, 133, 1, 0, 0, 0, 43, 135, 1, 0, 0, 0, 45, 137, 1, 0, 0, 0, 47, 144, 1, 0, 0, 0, 49, 151, 1, 0, 0, 0, 51, 163, 1, 0, 0, 0, 53, 167, 1, 0, 0, 0, 55, 178, 1, 0, 0, 0, 57, 190, 1, 0, 0, 0, 59, 197, 1, 0, 0, 0, 61, 208, 1, 0, 0, 0, 63, 64, 5, 42, 0, 0, 64, 2, 1, 0, 0, 0, 65, 66, 5, 43, 0, 0, 66, 4, 1, 0, 0, 0, 67, 68, 5, 63, 0, 0, 68, 6, 1, 0, 0, 0, 69, 70, 5, 116, 0, 0, 70, 71, 5, 114, 0, 0, 71, 72, 5, 117, 0, 0, 72, 73, 5, 101, 0, 0, 73, 8, 1, 0, 0, 0, 74, 75, 5, 102, 0, 0, 75, 76, 5, 97, 0, 0, 76, 77, 5, 108, 0, 0, 77, 78, 5, 115, 0, 0, 78, 79, 5, 101, 0, 0, 79, 10, 1, 0, 0, 0, 80, 81, 5, 116, 0, 0, 81, 82, 5, 104, 0, 0, 82, 83, 5, 105, 0, 0, 83, 84, 5, 115, 0, 0, 84, 12, 1, 0, 0, 0, 85, 86, 5, 91, 0, 0, 86, 87, 5, 81, 0, 0, 87, 88, 5, 117, 0, 0, 88, 89, 5, 97, 0, 0, 89, 90, 5, 108, 0, 0, 90, 91, 5, 105, 0, 0, 91, 92, 5, 102, 0, 0, 92, 93, 5, 105, 0, 0, 93, 94, 5, 101, 0, 0, 94, 95, 5, 100, 0, 0, 95, 96, 5, 78, 0, 0, 96, 97, 5, 97, 0, 0, 97, 98, 5, 109, 0, 0, 98, 99, 5, 101, 0, 0, 99, 100, 5, 93, 0, 0, 100, 14, 1, 0, 0, 0, 101, 102, 5, 58, 0, 0, 102, 103, 5, 58, 0, 0, 103, 106, 5, 61, 0, 0, 104, 106, 5, 61, 0, 0, 105, 101, 1, 0, 0, 0, 105, 104, 1, 0, 0, 0, 106, 16, 1, 0, 0, 0, 107, 108, 5, 43, 0, 0, 108, 109, 5, 61, 0, 0, 109, 18, 1, 0, 0, 0, 110, 111, 5, 63, 0, 0, 111, 112, 5, 61, 0, 0, 112, 20, 1, 0, 0, 0, 113, 114, 5, 124, 0, 0, 114, 22, 1, 0, 0, 0, 115, 116, 5, 58, 0, 0, 116, 24, 1, 0, 0, 0, 117, 118, 5, 59, 0, 0, 118, 26, 1, 0, 0, 0, 119, 120, 5, 44, 0, 0, 120, 28, 1, 0, 0, 0, 121, 122, 5, 40, 0, 0, 122, 30, 1, 0, 0, 0, 123, 124, 5, 41, 0, 0, 124, 32, 1, 0, 0, 0, 125, 126, 5, 91, 0, 0, 126, 34, 1, 0, 0, 0, 127, 128, 5, 93, 0, 0, 128, 36, 1, 0, 0, 0, 129, 130, 5, 123, 0, 0, 130, 38, 1, 0, 0, 0, 131, 132, 5, 125, 0, 0, 132, 40, 1, 0, 0, 0, 133, 134, 5, 46, 0, 0, 134, 42, 1, 0, 0, 0, 135, 136, 5, 126, 0, 0, 136, 44, 1, 0, 0, 0, 137, 141, 7, 0, 0, 0, 138, 140, 7, 1, 0, 0, 139, 138, 1, 0, 0, 0, 140, 143, 1, 0, 0, 0, 141, 139, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 46, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 144, 148, 7, 2, 0, 0, 145, 147, 7, 1, 0, 0, 146, 145, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 48, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 157, 5, 39, 0, 0, 152, 156, 8, 3, 0, 0, 153, 154, 5, 92, 0, 0, 154, 156, 9, 0, 0, 0, 155, 152, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 160, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 160, 161, 5, 39, 0, 0, 161, 50, 1, 0, 0, 0, 162, 164, 7, 4, 0, 0, 163, 162, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 163, 1, 0, 0, 0, 165, 166, 1, 0, 0, 0, 166, 52, 1, 0, 0, 0, 167, 173, 5, 39, 0, 0, 168, 172, 8, 3, 0, 0, 169, 170, 5, 92, 0, 0, 170, 172, 9, 0, 0, 0, 171, 168, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 172, 175, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 176, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 176, 177, 5, 39, 0, 0, 177, 54, 1, 0, 0, 0, 178, 179, 5, 47, 0, 0, 179, 180, 5, 47, 0, 0, 180, 184, 1, 0, 0, 0, 181, 183, 8, 5, 0, 0, 182, 181, 1, 0, 0, 0, 183, 186, 1, 0, 0, 0, 184, 182, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 185, 187, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, 187, 188, 6, 27, 0, 0, 188, 56, 1, 0, 0, 0, 189, 191, 7, 6, 0, 0, 190, 189, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 190, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 195, 6, 28, 0, 0, 195, 58, 1, 0, 0, 0, 196, 198, 5, 13, 0, 0, 197, 196, 1, 0, 0, 0, 197, 198, 1, 0, 0, 0, 198, 199, 1, 0, 0, 0, 199, 201, 5, 10, 0, 0, 200, 202, 7, 6, 0, 0, 201, 200, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 203, 204, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 206, 6, 29, 0, 0, 206, 60, 1, 0, 0, 0, 207, 209, 5, 13, 0, 0, 208, 207, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 211, 5, 10, 0, 0, 211, 62, 1, 0, 0, 0, 14, 0, 105, 141, 148, 155, 157, 165, 171, 173, 184, 192, 197, 203, 208, 1, 6, 0, 0] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens similarity index 78% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.tokens rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens index a34fe965..07eb9f09 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.tokens +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens @@ -20,13 +20,15 @@ LBRACE=19 RBRACE=20 DOT=21 TILDE=22 -ID=23 -INT=24 -STRING=25 -COMMENT=26 -WS=27 -CONTINUATION=28 -NL=29 +UPPER_ID=23 +ID=24 +SINGLE_QUOTED_STRING=25 +INT=26 +STRING=27 +COMMENT=28 +WS=29 +CONTINUATION=30 +NL=31 '*'=1 '+'=2 '?'=3 diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfListener.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfListener.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfListener.cs diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfParser.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs similarity index 89% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfParser.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs index f48c7aa7..8aa8cab1 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfParser.cs +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs @@ -40,7 +40,8 @@ public const int T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, ASSIGN=8, ADD_ASSIGN=9, BOOL_ASSIGN=10, PIPE=11, COLON=12, SEMICOLON=13, COMMA=14, LPAREN=15, RPAREN=16, LBRACK=17, RBRACK=18, LBRACE=19, RBRACE=20, DOT=21, TILDE=22, - ID=23, INT=24, STRING=25, COMMENT=26, WS=27, CONTINUATION=28, NL=29; + UPPER_ID=23, ID=24, SINGLE_QUOTED_STRING=25, INT=26, STRING=27, COMMENT=28, + WS=29, CONTINUATION=30, NL=31; public const int RULE_specification = 0, RULE_rule_definition = 1, RULE_parameter_list = 2, RULE_alternatives = 3, RULE_alternative = 4, RULE_element = 5, RULE_assignment = 6, @@ -62,8 +63,9 @@ public const int private static readonly string[] _SymbolicNames = { null, null, null, null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", - "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "ID", "INT", "STRING", - "COMMENT", "WS", "CONTINUATION", "NL" + "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", + "SINGLE_QUOTED_STRING", "INT", "STRING", "COMMENT", "WS", "CONTINUATION", + "NL" }; public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); @@ -167,7 +169,7 @@ public SpecificationContext specification() { State = 43; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - } while ( _la==ID ); + } while ( _la==UPPER_ID ); State = 45; Match(Eof); } @@ -189,9 +191,9 @@ public partial class Rule_definitionContext : ParserRuleContext { public IToken target_ast; public AlternativesContext rule_body; [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ASSIGN() { return GetToken(kebnfParser.ASSIGN, 0); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] ID() { return GetTokens(kebnfParser.ID); } - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID(int i) { - return GetToken(kebnfParser.ID, i); + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode[] UPPER_ID() { return GetTokens(kebnfParser.UPPER_ID); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UPPER_ID(int i) { + return GetToken(kebnfParser.UPPER_ID, i); } [System.Diagnostics.DebuggerNonUserCode] public AlternativesContext alternatives() { return GetRuleContext(0); @@ -237,7 +239,7 @@ public Rule_definitionContext rule_definition() { EnterOuterAlt(_localctx, 1); { State = 47; - _localctx.name = Match(ID); + _localctx.name = Match(UPPER_ID); State = 49; ErrorHandler.Sync(this); _la = TokenStream.LA(1); @@ -256,7 +258,7 @@ public Rule_definitionContext rule_definition() { State = 51; Match(COLON); State = 52; - _localctx.target_ast = Match(ID); + _localctx.target_ast = Match(UPPER_ID); } } @@ -478,7 +480,7 @@ public AlternativeContext alternative() { State = 82; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 63602928L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 264929520L) != 0)) { { { State = 79; @@ -524,6 +526,9 @@ [System.Diagnostics.DebuggerNonUserCode] public TerminalContext terminal() { [System.Diagnostics.DebuggerNonUserCode] public Non_terminalContext non_terminal() { return GetRuleContext(0); } + [System.Diagnostics.DebuggerNonUserCode] public Value_literalContext value_literal() { + return GetRuleContext(0); + } public ElementContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -552,7 +557,7 @@ public ElementContext element() { ElementContext _localctx = new ElementContext(Context, State); EnterRule(_localctx, 10, RULE_element); try { - State = 92; + State = 93; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,8,Context) ) { case 1: @@ -604,6 +609,13 @@ public ElementContext element() { non_terminal(); } break; + case 8: + EnterOuterAlt(_localctx, 8); + { + State = 92; + value_literal(); + } + break; } } catch (RecognitionException re) { @@ -667,9 +679,9 @@ public AssignmentContext assignment() { try { EnterOuterAlt(_localctx, 1); { - State = 94; - _localctx.property = dotted_id(); State = 95; + _localctx.property = dotted_id(); + State = 96; _localctx.op = TokenStream.LT(1); _la = TokenStream.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 1792L) != 0)) ) { @@ -679,24 +691,24 @@ public AssignmentContext assignment() { ErrorHandler.ReportMatch(this); Consume(); } - State = 97; + State = 98; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,9,Context) ) { case 1: { - State = 96; + State = 97; _localctx.prefix = Match(TILDE); } break; } - State = 99; + State = 100; _localctx.content = element_core(); - State = 101; + State = 102; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 14L) != 0)) { { - State = 100; + State = 101; _localctx.suffix = suffix_op(); } } @@ -759,11 +771,11 @@ public Non_parsing_assignmentContext non_parsing_assignment() { try { EnterOuterAlt(_localctx, 1); { - State = 103; - Match(LBRACE); State = 104; - _localctx.property = dotted_id(); + Match(LBRACE); State = 105; + _localctx.property = dotted_id(); + State = 106; _localctx.op = TokenStream.LT(1); _la = TokenStream.LA(1); if ( !(_la==ASSIGN || _la==ADD_ASSIGN) ) { @@ -773,9 +785,9 @@ public Non_parsing_assignmentContext non_parsing_assignment() { ErrorHandler.ReportMatch(this); Consume(); } - State = 106; - _localctx.val = value_literal(); State = 107; + _localctx.val = value_literal(); + State = 108; Match(RBRACE); } } @@ -823,9 +835,9 @@ public Non_parsing_emptyContext non_parsing_empty() { try { EnterOuterAlt(_localctx, 1); { - State = 109; - Match(LBRACE); State = 110; + Match(LBRACE); + State = 111; Match(RBRACE); } } @@ -877,21 +889,21 @@ public Cross_referenceContext cross_reference() { try { EnterOuterAlt(_localctx, 1); { - State = 113; + State = 114; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==TILDE) { { - State = 112; + State = 113; Match(TILDE); } } - State = 115; - Match(LBRACK); State = 116; - _localctx.@ref = Match(ID); + Match(LBRACK); State = 117; + _localctx.@ref = Match(ID); + State = 118; Match(RBRACK); } } @@ -946,18 +958,18 @@ public GroupContext group() { try { EnterOuterAlt(_localctx, 1); { - State = 119; - Match(LPAREN); State = 120; - alternatives(); + Match(LPAREN); State = 121; + alternatives(); + State = 122; Match(RPAREN); - State = 123; + State = 124; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,12,Context) ) { case 1: { - State = 122; + State = 123; _localctx.suffix = suffix_op(); } break; @@ -976,11 +988,9 @@ public GroupContext group() { } public partial class TerminalContext : ParserRuleContext { - public Value_literalContext val; + public IToken val; public Suffix_opContext suffix; - [System.Diagnostics.DebuggerNonUserCode] public Value_literalContext value_literal() { - return GetRuleContext(0); - } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SINGLE_QUOTED_STRING() { return GetToken(kebnfParser.SINGLE_QUOTED_STRING, 0); } [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { return GetRuleContext(0); } @@ -1014,14 +1024,14 @@ public TerminalContext terminal() { try { EnterOuterAlt(_localctx, 1); { - State = 125; - _localctx.val = value_literal(); - State = 127; + State = 126; + _localctx.val = Match(SINGLE_QUOTED_STRING); + State = 128; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,13,Context) ) { case 1: { - State = 126; + State = 127; _localctx.suffix = suffix_op(); } break; @@ -1042,7 +1052,7 @@ public TerminalContext terminal() { public partial class Non_terminalContext : ParserRuleContext { public IToken name; public Suffix_opContext suffix; - [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(kebnfParser.ID, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode UPPER_ID() { return GetToken(kebnfParser.UPPER_ID, 0); } [System.Diagnostics.DebuggerNonUserCode] public Suffix_opContext suffix_op() { return GetRuleContext(0); } @@ -1076,14 +1086,14 @@ public Non_terminalContext non_terminal() { try { EnterOuterAlt(_localctx, 1); { - State = 129; - _localctx.name = Match(ID); - State = 131; + State = 130; + _localctx.name = Match(UPPER_ID); + State = 132; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { case 1: { - State = 130; + State = 131; _localctx.suffix = suffix_op(); } break; @@ -1114,6 +1124,9 @@ [System.Diagnostics.DebuggerNonUserCode] public TerminalContext terminal() { [System.Diagnostics.DebuggerNonUserCode] public Non_terminalContext non_terminal() { return GetRuleContext(0); } + [System.Diagnostics.DebuggerNonUserCode] public Value_literalContext value_literal() { + return GetRuleContext(0); + } public Element_coreContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -1142,37 +1155,44 @@ public Element_coreContext element_core() { Element_coreContext _localctx = new Element_coreContext(Context, State); EnterRule(_localctx, 26, RULE_element_core); try { - State = 137; + State = 139; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,15,Context) ) { case 1: EnterOuterAlt(_localctx, 1); { - State = 133; + State = 134; cross_reference(); } break; case 2: EnterOuterAlt(_localctx, 2); { - State = 134; + State = 135; group(); } break; case 3: EnterOuterAlt(_localctx, 3); { - State = 135; + State = 136; terminal(); } break; case 4: EnterOuterAlt(_localctx, 4); { - State = 136; + State = 137; non_terminal(); } break; + case 5: + EnterOuterAlt(_localctx, 5); + { + State = 138; + value_literal(); + } + break; } } catch (RecognitionException re) { @@ -1226,21 +1246,21 @@ public Dotted_idContext dotted_id() { try { EnterOuterAlt(_localctx, 1); { - State = 139; + State = 141; Match(ID); - State = 144; + State = 146; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==DOT) { { { - State = 140; + State = 142; Match(DOT); - State = 141; + State = 143; Match(ID); } } - State = 146; + State = 148; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } @@ -1289,7 +1309,7 @@ public Suffix_opContext suffix_op() { try { EnterOuterAlt(_localctx, 1); { - State = 147; + State = 149; _la = TokenStream.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 14L) != 0)) ) { ErrorHandler.RecoverInline(this); @@ -1315,6 +1335,7 @@ public partial class Value_literalContext : ParserRuleContext { [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(kebnfParser.ID, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode INT() { return GetToken(kebnfParser.INT, 0); } [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode STRING() { return GetToken(kebnfParser.STRING, 0); } + [System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SINGLE_QUOTED_STRING() { return GetToken(kebnfParser.SINGLE_QUOTED_STRING, 0); } public Value_literalContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -1346,9 +1367,9 @@ public Value_literalContext value_literal() { try { EnterOuterAlt(_localctx, 1); { - State = 149; + State = 151; _la = TokenStream.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 58720496L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 251658480L) != 0)) ) { ErrorHandler.RecoverInline(this); } else { @@ -1369,53 +1390,54 @@ public Value_literalContext value_literal() { } private static int[] _serializedATN = { - 4,1,29,152,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7, + 4,1,31,154,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7, 7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14, 2,15,7,15,2,16,7,16,1,0,5,0,36,8,0,10,0,12,0,39,9,0,1,0,4,0,42,8,0,11, 0,12,0,43,1,0,1,0,1,1,1,1,3,1,50,8,1,1,1,1,1,3,1,54,8,1,1,1,1,1,1,1,3, 1,59,8,1,1,1,4,1,62,8,1,11,1,12,1,63,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1, 3,5,3,75,8,3,10,3,12,3,78,9,3,1,4,5,4,81,8,4,10,4,12,4,84,9,4,1,5,1,5, - 1,5,1,5,1,5,1,5,1,5,3,5,93,8,5,1,6,1,6,1,6,3,6,98,8,6,1,6,1,6,3,6,102, - 8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,9,3,9,114,8,9,1,9,1,9,1,9,1, - 9,1,10,1,10,1,10,1,10,3,10,124,8,10,1,11,1,11,3,11,128,8,11,1,12,1,12, - 3,12,132,8,12,1,13,1,13,1,13,1,13,3,13,138,8,13,1,14,1,14,1,14,5,14,143, - 8,14,10,14,12,14,146,9,14,1,15,1,15,1,16,1,16,1,16,0,0,17,0,2,4,6,8,10, - 12,14,16,18,20,22,24,26,28,30,32,0,4,1,0,8,10,1,0,8,9,1,0,1,3,2,0,4,7, - 23,25,158,0,37,1,0,0,0,2,47,1,0,0,0,4,65,1,0,0,0,6,71,1,0,0,0,8,82,1,0, - 0,0,10,92,1,0,0,0,12,94,1,0,0,0,14,103,1,0,0,0,16,109,1,0,0,0,18,113,1, - 0,0,0,20,119,1,0,0,0,22,125,1,0,0,0,24,129,1,0,0,0,26,137,1,0,0,0,28,139, - 1,0,0,0,30,147,1,0,0,0,32,149,1,0,0,0,34,36,5,29,0,0,35,34,1,0,0,0,36, - 39,1,0,0,0,37,35,1,0,0,0,37,38,1,0,0,0,38,41,1,0,0,0,39,37,1,0,0,0,40, - 42,3,2,1,0,41,40,1,0,0,0,42,43,1,0,0,0,43,41,1,0,0,0,43,44,1,0,0,0,44, - 45,1,0,0,0,45,46,5,0,0,1,46,1,1,0,0,0,47,49,5,23,0,0,48,50,3,4,2,0,49, - 48,1,0,0,0,49,50,1,0,0,0,50,53,1,0,0,0,51,52,5,12,0,0,52,54,5,23,0,0,53, - 51,1,0,0,0,53,54,1,0,0,0,54,55,1,0,0,0,55,56,5,8,0,0,56,58,3,6,3,0,57, - 59,5,13,0,0,58,57,1,0,0,0,58,59,1,0,0,0,59,61,1,0,0,0,60,62,5,29,0,0,61, - 60,1,0,0,0,62,63,1,0,0,0,63,61,1,0,0,0,63,64,1,0,0,0,64,3,1,0,0,0,65,66, - 5,15,0,0,66,67,5,23,0,0,67,68,5,12,0,0,68,69,5,23,0,0,69,70,5,16,0,0,70, - 5,1,0,0,0,71,76,3,8,4,0,72,73,5,11,0,0,73,75,3,8,4,0,74,72,1,0,0,0,75, - 78,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,0,77,7,1,0,0,0,78,76,1,0,0,0,79,81, - 3,10,5,0,80,79,1,0,0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83,1,0,0,0,83,9, - 1,0,0,0,84,82,1,0,0,0,85,93,3,12,6,0,86,93,3,14,7,0,87,93,3,16,8,0,88, - 93,3,18,9,0,89,93,3,20,10,0,90,93,3,22,11,0,91,93,3,24,12,0,92,85,1,0, - 0,0,92,86,1,0,0,0,92,87,1,0,0,0,92,88,1,0,0,0,92,89,1,0,0,0,92,90,1,0, - 0,0,92,91,1,0,0,0,93,11,1,0,0,0,94,95,3,28,14,0,95,97,7,0,0,0,96,98,5, - 22,0,0,97,96,1,0,0,0,97,98,1,0,0,0,98,99,1,0,0,0,99,101,3,26,13,0,100, - 102,3,30,15,0,101,100,1,0,0,0,101,102,1,0,0,0,102,13,1,0,0,0,103,104,5, - 19,0,0,104,105,3,28,14,0,105,106,7,1,0,0,106,107,3,32,16,0,107,108,5,20, - 0,0,108,15,1,0,0,0,109,110,5,19,0,0,110,111,5,20,0,0,111,17,1,0,0,0,112, - 114,5,22,0,0,113,112,1,0,0,0,113,114,1,0,0,0,114,115,1,0,0,0,115,116,5, - 17,0,0,116,117,5,23,0,0,117,118,5,18,0,0,118,19,1,0,0,0,119,120,5,15,0, - 0,120,121,3,6,3,0,121,123,5,16,0,0,122,124,3,30,15,0,123,122,1,0,0,0,123, - 124,1,0,0,0,124,21,1,0,0,0,125,127,3,32,16,0,126,128,3,30,15,0,127,126, - 1,0,0,0,127,128,1,0,0,0,128,23,1,0,0,0,129,131,5,23,0,0,130,132,3,30,15, - 0,131,130,1,0,0,0,131,132,1,0,0,0,132,25,1,0,0,0,133,138,3,18,9,0,134, - 138,3,20,10,0,135,138,3,22,11,0,136,138,3,24,12,0,137,133,1,0,0,0,137, - 134,1,0,0,0,137,135,1,0,0,0,137,136,1,0,0,0,138,27,1,0,0,0,139,144,5,23, - 0,0,140,141,5,21,0,0,141,143,5,23,0,0,142,140,1,0,0,0,143,146,1,0,0,0, - 144,142,1,0,0,0,144,145,1,0,0,0,145,29,1,0,0,0,146,144,1,0,0,0,147,148, - 7,2,0,0,148,31,1,0,0,0,149,150,7,3,0,0,150,33,1,0,0,0,17,37,43,49,53,58, - 63,76,82,92,97,101,113,123,127,131,137,144 + 1,5,1,5,1,5,1,5,1,5,1,5,3,5,94,8,5,1,6,1,6,1,6,3,6,99,8,6,1,6,1,6,3,6, + 103,8,6,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,9,3,9,115,8,9,1,9,1,9,1, + 9,1,9,1,10,1,10,1,10,1,10,3,10,125,8,10,1,11,1,11,3,11,129,8,11,1,12,1, + 12,3,12,133,8,12,1,13,1,13,1,13,1,13,1,13,3,13,140,8,13,1,14,1,14,1,14, + 5,14,145,8,14,10,14,12,14,148,9,14,1,15,1,15,1,16,1,16,1,16,0,0,17,0,2, + 4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,1,0,8,10,1,0,8,9,1,0,1,3, + 2,0,4,7,24,27,162,0,37,1,0,0,0,2,47,1,0,0,0,4,65,1,0,0,0,6,71,1,0,0,0, + 8,82,1,0,0,0,10,93,1,0,0,0,12,95,1,0,0,0,14,104,1,0,0,0,16,110,1,0,0,0, + 18,114,1,0,0,0,20,120,1,0,0,0,22,126,1,0,0,0,24,130,1,0,0,0,26,139,1,0, + 0,0,28,141,1,0,0,0,30,149,1,0,0,0,32,151,1,0,0,0,34,36,5,31,0,0,35,34, + 1,0,0,0,36,39,1,0,0,0,37,35,1,0,0,0,37,38,1,0,0,0,38,41,1,0,0,0,39,37, + 1,0,0,0,40,42,3,2,1,0,41,40,1,0,0,0,42,43,1,0,0,0,43,41,1,0,0,0,43,44, + 1,0,0,0,44,45,1,0,0,0,45,46,5,0,0,1,46,1,1,0,0,0,47,49,5,23,0,0,48,50, + 3,4,2,0,49,48,1,0,0,0,49,50,1,0,0,0,50,53,1,0,0,0,51,52,5,12,0,0,52,54, + 5,23,0,0,53,51,1,0,0,0,53,54,1,0,0,0,54,55,1,0,0,0,55,56,5,8,0,0,56,58, + 3,6,3,0,57,59,5,13,0,0,58,57,1,0,0,0,58,59,1,0,0,0,59,61,1,0,0,0,60,62, + 5,31,0,0,61,60,1,0,0,0,62,63,1,0,0,0,63,61,1,0,0,0,63,64,1,0,0,0,64,3, + 1,0,0,0,65,66,5,15,0,0,66,67,5,24,0,0,67,68,5,12,0,0,68,69,5,24,0,0,69, + 70,5,16,0,0,70,5,1,0,0,0,71,76,3,8,4,0,72,73,5,11,0,0,73,75,3,8,4,0,74, + 72,1,0,0,0,75,78,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,0,77,7,1,0,0,0,78,76, + 1,0,0,0,79,81,3,10,5,0,80,79,1,0,0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83, + 1,0,0,0,83,9,1,0,0,0,84,82,1,0,0,0,85,94,3,12,6,0,86,94,3,14,7,0,87,94, + 3,16,8,0,88,94,3,18,9,0,89,94,3,20,10,0,90,94,3,22,11,0,91,94,3,24,12, + 0,92,94,3,32,16,0,93,85,1,0,0,0,93,86,1,0,0,0,93,87,1,0,0,0,93,88,1,0, + 0,0,93,89,1,0,0,0,93,90,1,0,0,0,93,91,1,0,0,0,93,92,1,0,0,0,94,11,1,0, + 0,0,95,96,3,28,14,0,96,98,7,0,0,0,97,99,5,22,0,0,98,97,1,0,0,0,98,99,1, + 0,0,0,99,100,1,0,0,0,100,102,3,26,13,0,101,103,3,30,15,0,102,101,1,0,0, + 0,102,103,1,0,0,0,103,13,1,0,0,0,104,105,5,19,0,0,105,106,3,28,14,0,106, + 107,7,1,0,0,107,108,3,32,16,0,108,109,5,20,0,0,109,15,1,0,0,0,110,111, + 5,19,0,0,111,112,5,20,0,0,112,17,1,0,0,0,113,115,5,22,0,0,114,113,1,0, + 0,0,114,115,1,0,0,0,115,116,1,0,0,0,116,117,5,17,0,0,117,118,5,24,0,0, + 118,119,5,18,0,0,119,19,1,0,0,0,120,121,5,15,0,0,121,122,3,6,3,0,122,124, + 5,16,0,0,123,125,3,30,15,0,124,123,1,0,0,0,124,125,1,0,0,0,125,21,1,0, + 0,0,126,128,5,25,0,0,127,129,3,30,15,0,128,127,1,0,0,0,128,129,1,0,0,0, + 129,23,1,0,0,0,130,132,5,23,0,0,131,133,3,30,15,0,132,131,1,0,0,0,132, + 133,1,0,0,0,133,25,1,0,0,0,134,140,3,18,9,0,135,140,3,20,10,0,136,140, + 3,22,11,0,137,140,3,24,12,0,138,140,3,32,16,0,139,134,1,0,0,0,139,135, + 1,0,0,0,139,136,1,0,0,0,139,137,1,0,0,0,139,138,1,0,0,0,140,27,1,0,0,0, + 141,146,5,24,0,0,142,143,5,21,0,0,143,145,5,24,0,0,144,142,1,0,0,0,145, + 148,1,0,0,0,146,144,1,0,0,0,146,147,1,0,0,0,147,29,1,0,0,0,148,146,1,0, + 0,0,149,150,7,2,0,0,150,31,1,0,0,0,151,152,7,3,0,0,152,33,1,0,0,0,17,37, + 43,49,53,58,63,76,82,93,98,102,114,124,128,132,139,146 }; public static readonly ATN _ATN = diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs similarity index 100% rename from SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfVisitor.cs rename to SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfVisitor.cs diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.interp deleted file mode 100644 index c34fc53c..00000000 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnf.interp +++ /dev/null @@ -1,86 +0,0 @@ -token literal names: -null -'*' -'+' -'?' -'true' -'false' -'this' -'[QualifiedName]' -null -'+=' -'?=' -'|' -':' -';' -',' -'(' -')' -'[' -']' -'{' -'}' -'.' -'~' -null -null -null -null -null -null -null - -token symbolic names: -null -null -null -null -null -null -null -null -ASSIGN -ADD_ASSIGN -BOOL_ASSIGN -PIPE -COLON -SEMICOLON -COMMA -LPAREN -RPAREN -LBRACK -RBRACK -LBRACE -RBRACE -DOT -TILDE -ID -INT -STRING -COMMENT -WS -CONTINUATION -NL - -rule names: -specification -rule_definition -parameter_list -alternatives -alternative -element -assignment -non_parsing_assignment -non_parsing_empty -cross_reference -group -terminal -non_terminal -element_core -dotted_id -suffix_op -value_literal - - -atn: -[4, 1, 29, 152, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0, 5, 0, 36, 8, 0, 10, 0, 12, 0, 39, 9, 0, 1, 0, 4, 0, 42, 8, 0, 11, 0, 12, 0, 43, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 50, 8, 1, 1, 1, 1, 1, 3, 1, 54, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 59, 8, 1, 1, 1, 4, 1, 62, 8, 1, 11, 1, 12, 1, 63, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 75, 8, 3, 10, 3, 12, 3, 78, 9, 3, 1, 4, 5, 4, 81, 8, 4, 10, 4, 12, 4, 84, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 93, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 98, 8, 6, 1, 6, 1, 6, 3, 6, 102, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 3, 9, 114, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 124, 8, 10, 1, 11, 1, 11, 3, 11, 128, 8, 11, 1, 12, 1, 12, 3, 12, 132, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 138, 8, 13, 1, 14, 1, 14, 1, 14, 5, 14, 143, 8, 14, 10, 14, 12, 14, 146, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 0, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 4, 1, 0, 8, 10, 1, 0, 8, 9, 1, 0, 1, 3, 2, 0, 4, 7, 23, 25, 158, 0, 37, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 65, 1, 0, 0, 0, 6, 71, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 92, 1, 0, 0, 0, 12, 94, 1, 0, 0, 0, 14, 103, 1, 0, 0, 0, 16, 109, 1, 0, 0, 0, 18, 113, 1, 0, 0, 0, 20, 119, 1, 0, 0, 0, 22, 125, 1, 0, 0, 0, 24, 129, 1, 0, 0, 0, 26, 137, 1, 0, 0, 0, 28, 139, 1, 0, 0, 0, 30, 147, 1, 0, 0, 0, 32, 149, 1, 0, 0, 0, 34, 36, 5, 29, 0, 0, 35, 34, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 41, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 42, 3, 2, 1, 0, 41, 40, 1, 0, 0, 0, 42, 43, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 43, 44, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 46, 5, 0, 0, 1, 46, 1, 1, 0, 0, 0, 47, 49, 5, 23, 0, 0, 48, 50, 3, 4, 2, 0, 49, 48, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 52, 5, 12, 0, 0, 52, 54, 5, 23, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 55, 1, 0, 0, 0, 55, 56, 5, 8, 0, 0, 56, 58, 3, 6, 3, 0, 57, 59, 5, 13, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 61, 1, 0, 0, 0, 60, 62, 5, 29, 0, 0, 61, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 3, 1, 0, 0, 0, 65, 66, 5, 15, 0, 0, 66, 67, 5, 23, 0, 0, 67, 68, 5, 12, 0, 0, 68, 69, 5, 23, 0, 0, 69, 70, 5, 16, 0, 0, 70, 5, 1, 0, 0, 0, 71, 76, 3, 8, 4, 0, 72, 73, 5, 11, 0, 0, 73, 75, 3, 8, 4, 0, 74, 72, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 7, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 81, 3, 10, 5, 0, 80, 79, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 93, 3, 12, 6, 0, 86, 93, 3, 14, 7, 0, 87, 93, 3, 16, 8, 0, 88, 93, 3, 18, 9, 0, 89, 93, 3, 20, 10, 0, 90, 93, 3, 22, 11, 0, 91, 93, 3, 24, 12, 0, 92, 85, 1, 0, 0, 0, 92, 86, 1, 0, 0, 0, 92, 87, 1, 0, 0, 0, 92, 88, 1, 0, 0, 0, 92, 89, 1, 0, 0, 0, 92, 90, 1, 0, 0, 0, 92, 91, 1, 0, 0, 0, 93, 11, 1, 0, 0, 0, 94, 95, 3, 28, 14, 0, 95, 97, 7, 0, 0, 0, 96, 98, 5, 22, 0, 0, 97, 96, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 101, 3, 26, 13, 0, 100, 102, 3, 30, 15, 0, 101, 100, 1, 0, 0, 0, 101, 102, 1, 0, 0, 0, 102, 13, 1, 0, 0, 0, 103, 104, 5, 19, 0, 0, 104, 105, 3, 28, 14, 0, 105, 106, 7, 1, 0, 0, 106, 107, 3, 32, 16, 0, 107, 108, 5, 20, 0, 0, 108, 15, 1, 0, 0, 0, 109, 110, 5, 19, 0, 0, 110, 111, 5, 20, 0, 0, 111, 17, 1, 0, 0, 0, 112, 114, 5, 22, 0, 0, 113, 112, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 5, 17, 0, 0, 116, 117, 5, 23, 0, 0, 117, 118, 5, 18, 0, 0, 118, 19, 1, 0, 0, 0, 119, 120, 5, 15, 0, 0, 120, 121, 3, 6, 3, 0, 121, 123, 5, 16, 0, 0, 122, 124, 3, 30, 15, 0, 123, 122, 1, 0, 0, 0, 123, 124, 1, 0, 0, 0, 124, 21, 1, 0, 0, 0, 125, 127, 3, 32, 16, 0, 126, 128, 3, 30, 15, 0, 127, 126, 1, 0, 0, 0, 127, 128, 1, 0, 0, 0, 128, 23, 1, 0, 0, 0, 129, 131, 5, 23, 0, 0, 130, 132, 3, 30, 15, 0, 131, 130, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 25, 1, 0, 0, 0, 133, 138, 3, 18, 9, 0, 134, 138, 3, 20, 10, 0, 135, 138, 3, 22, 11, 0, 136, 138, 3, 24, 12, 0, 137, 133, 1, 0, 0, 0, 137, 134, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 136, 1, 0, 0, 0, 138, 27, 1, 0, 0, 0, 139, 144, 5, 23, 0, 0, 140, 141, 5, 21, 0, 0, 141, 143, 5, 23, 0, 0, 142, 140, 1, 0, 0, 0, 143, 146, 1, 0, 0, 0, 144, 142, 1, 0, 0, 0, 144, 145, 1, 0, 0, 0, 145, 29, 1, 0, 0, 0, 146, 144, 1, 0, 0, 0, 147, 148, 7, 2, 0, 0, 148, 31, 1, 0, 0, 0, 149, 150, 7, 3, 0, 0, 150, 33, 1, 0, 0, 0, 17, 37, 43, 49, 53, 58, 63, 76, 82, 92, 97, 101, 113, 123, 127, 131, 137, 144] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.cs deleted file mode 100644 index 9f980ce9..00000000 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.cs +++ /dev/null @@ -1,174 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// ANTLR Version: 4.13.2 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// Generated from C:/CODE/SysML2.NET/Resources/kebnf.g4 by ANTLR 4.13.2 - -// Unreachable code detected -#pragma warning disable 0162 -// The variable '...' is assigned but its value is never used -#pragma warning disable 0219 -// Missing XML comment for publicly visible type or member '...' -#pragma warning disable 1591 -// Ambiguous reference in cref attribute -#pragma warning disable 419 - -namespace SysML2.NET.CodeGenerator.Grammar { -using System; -using System.IO; -using System.Text; -using Antlr4.Runtime; -using Antlr4.Runtime.Atn; -using Antlr4.Runtime.Misc; -using DFA = Antlr4.Runtime.Dfa.DFA; - -[System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.2")] -[System.CLSCompliant(false)] -public partial class kebnfLexer : Lexer { - protected static DFA[] decisionToDFA; - protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); - public const int - T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, ASSIGN=8, ADD_ASSIGN=9, - BOOL_ASSIGN=10, PIPE=11, COLON=12, SEMICOLON=13, COMMA=14, LPAREN=15, - RPAREN=16, LBRACK=17, RBRACK=18, LBRACE=19, RBRACE=20, DOT=21, TILDE=22, - ID=23, INT=24, STRING=25, COMMENT=26, WS=27, CONTINUATION=28, NL=29; - public static string[] channelNames = { - "DEFAULT_TOKEN_CHANNEL", "HIDDEN" - }; - - public static string[] modeNames = { - "DEFAULT_MODE" - }; - - public static readonly string[] ruleNames = { - "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "ASSIGN", "ADD_ASSIGN", - "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", - "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "ID", "INT", "STRING", - "COMMENT", "WS", "CONTINUATION", "NL" - }; - - - public kebnfLexer(ICharStream input) - : this(input, Console.Out, Console.Error) { } - - public kebnfLexer(ICharStream input, TextWriter output, TextWriter errorOutput) - : base(input, output, errorOutput) - { - Interpreter = new LexerATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); - } - - private static readonly string[] _LiteralNames = { - null, "'*'", "'+'", "'?'", "'true'", "'false'", "'this'", "'[QualifiedName]'", - null, "'+='", "'?='", "'|'", "':'", "';'", "','", "'('", "')'", "'['", - "']'", "'{'", "'}'", "'.'", "'~'" - }; - private static readonly string[] _SymbolicNames = { - null, null, null, null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", - "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", - "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "ID", "INT", "STRING", - "COMMENT", "WS", "CONTINUATION", "NL" - }; - public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); - - [NotNull] - public override IVocabulary Vocabulary - { - get - { - return DefaultVocabulary; - } - } - - public override string GrammarFileName { get { return "kebnf.g4"; } } - - public override string[] RuleNames { get { return ruleNames; } } - - public override string[] ChannelNames { get { return channelNames; } } - - public override string[] ModeNames { get { return modeNames; } } - - public override int[] SerializedAtn { get { return _serializedATN; } } - - static kebnfLexer() { - decisionToDFA = new DFA[_ATN.NumberOfDecisions]; - for (int i = 0; i < _ATN.NumberOfDecisions; i++) { - decisionToDFA[i] = new DFA(_ATN.GetDecisionState(i), i); - } - } - private static int[] _serializedATN = { - 4,0,29,190,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, - 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, - 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, - 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28, - 7,28,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1, - 4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6, - 1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,3,7,102,8,7,1,8,1,8,1,8,1,9,1,9,1,9,1, - 10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1, - 17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,5,22,136,8,22, - 10,22,12,22,139,9,22,1,23,4,23,142,8,23,11,23,12,23,143,1,24,1,24,1,24, - 1,24,5,24,150,8,24,10,24,12,24,153,9,24,1,24,1,24,1,25,1,25,1,25,1,25, - 5,25,161,8,25,10,25,12,25,164,9,25,1,25,1,25,1,26,4,26,169,8,26,11,26, - 12,26,170,1,26,1,26,1,27,3,27,176,8,27,1,27,1,27,4,27,180,8,27,11,27,12, - 27,181,1,27,1,27,1,28,3,28,187,8,28,1,28,1,28,0,0,29,1,1,3,2,5,3,7,4,9, - 5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17, - 35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29, - 1,0,6,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,1,0,48,57,2, - 0,39,39,92,92,2,0,10,10,13,13,2,0,9,9,32,32,199,0,1,1,0,0,0,0,3,1,0,0, - 0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1, - 0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0, - 0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37, - 1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0, - 0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,1,59, - 1,0,0,0,3,61,1,0,0,0,5,63,1,0,0,0,7,65,1,0,0,0,9,70,1,0,0,0,11,76,1,0, - 0,0,13,81,1,0,0,0,15,101,1,0,0,0,17,103,1,0,0,0,19,106,1,0,0,0,21,109, - 1,0,0,0,23,111,1,0,0,0,25,113,1,0,0,0,27,115,1,0,0,0,29,117,1,0,0,0,31, - 119,1,0,0,0,33,121,1,0,0,0,35,123,1,0,0,0,37,125,1,0,0,0,39,127,1,0,0, - 0,41,129,1,0,0,0,43,131,1,0,0,0,45,133,1,0,0,0,47,141,1,0,0,0,49,145,1, - 0,0,0,51,156,1,0,0,0,53,168,1,0,0,0,55,175,1,0,0,0,57,186,1,0,0,0,59,60, - 5,42,0,0,60,2,1,0,0,0,61,62,5,43,0,0,62,4,1,0,0,0,63,64,5,63,0,0,64,6, - 1,0,0,0,65,66,5,116,0,0,66,67,5,114,0,0,67,68,5,117,0,0,68,69,5,101,0, - 0,69,8,1,0,0,0,70,71,5,102,0,0,71,72,5,97,0,0,72,73,5,108,0,0,73,74,5, - 115,0,0,74,75,5,101,0,0,75,10,1,0,0,0,76,77,5,116,0,0,77,78,5,104,0,0, - 78,79,5,105,0,0,79,80,5,115,0,0,80,12,1,0,0,0,81,82,5,91,0,0,82,83,5,81, - 0,0,83,84,5,117,0,0,84,85,5,97,0,0,85,86,5,108,0,0,86,87,5,105,0,0,87, - 88,5,102,0,0,88,89,5,105,0,0,89,90,5,101,0,0,90,91,5,100,0,0,91,92,5,78, - 0,0,92,93,5,97,0,0,93,94,5,109,0,0,94,95,5,101,0,0,95,96,5,93,0,0,96,14, - 1,0,0,0,97,98,5,58,0,0,98,99,5,58,0,0,99,102,5,61,0,0,100,102,5,61,0,0, - 101,97,1,0,0,0,101,100,1,0,0,0,102,16,1,0,0,0,103,104,5,43,0,0,104,105, - 5,61,0,0,105,18,1,0,0,0,106,107,5,63,0,0,107,108,5,61,0,0,108,20,1,0,0, - 0,109,110,5,124,0,0,110,22,1,0,0,0,111,112,5,58,0,0,112,24,1,0,0,0,113, - 114,5,59,0,0,114,26,1,0,0,0,115,116,5,44,0,0,116,28,1,0,0,0,117,118,5, - 40,0,0,118,30,1,0,0,0,119,120,5,41,0,0,120,32,1,0,0,0,121,122,5,91,0,0, - 122,34,1,0,0,0,123,124,5,93,0,0,124,36,1,0,0,0,125,126,5,123,0,0,126,38, - 1,0,0,0,127,128,5,125,0,0,128,40,1,0,0,0,129,130,5,46,0,0,130,42,1,0,0, - 0,131,132,5,126,0,0,132,44,1,0,0,0,133,137,7,0,0,0,134,136,7,1,0,0,135, - 134,1,0,0,0,136,139,1,0,0,0,137,135,1,0,0,0,137,138,1,0,0,0,138,46,1,0, - 0,0,139,137,1,0,0,0,140,142,7,2,0,0,141,140,1,0,0,0,142,143,1,0,0,0,143, - 141,1,0,0,0,143,144,1,0,0,0,144,48,1,0,0,0,145,151,5,39,0,0,146,150,8, - 3,0,0,147,148,5,92,0,0,148,150,9,0,0,0,149,146,1,0,0,0,149,147,1,0,0,0, - 150,153,1,0,0,0,151,149,1,0,0,0,151,152,1,0,0,0,152,154,1,0,0,0,153,151, - 1,0,0,0,154,155,5,39,0,0,155,50,1,0,0,0,156,157,5,47,0,0,157,158,5,47, - 0,0,158,162,1,0,0,0,159,161,8,4,0,0,160,159,1,0,0,0,161,164,1,0,0,0,162, - 160,1,0,0,0,162,163,1,0,0,0,163,165,1,0,0,0,164,162,1,0,0,0,165,166,6, - 25,0,0,166,52,1,0,0,0,167,169,7,5,0,0,168,167,1,0,0,0,169,170,1,0,0,0, - 170,168,1,0,0,0,170,171,1,0,0,0,171,172,1,0,0,0,172,173,6,26,0,0,173,54, - 1,0,0,0,174,176,5,13,0,0,175,174,1,0,0,0,175,176,1,0,0,0,176,177,1,0,0, - 0,177,179,5,10,0,0,178,180,7,5,0,0,179,178,1,0,0,0,180,181,1,0,0,0,181, - 179,1,0,0,0,181,182,1,0,0,0,182,183,1,0,0,0,183,184,6,27,0,0,184,56,1, - 0,0,0,185,187,5,13,0,0,186,185,1,0,0,0,186,187,1,0,0,0,187,188,1,0,0,0, - 188,189,5,10,0,0,189,58,1,0,0,0,11,0,101,137,143,149,151,162,170,175,181, - 186,1,6,0,0 - }; - - public static readonly ATN _ATN = - new ATNDeserializer().Deserialize(_serializedATN); - - -} -} // namespace SysML2.NET.CodeGenerator.Grammar diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.interp deleted file mode 100644 index f5467a47..00000000 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/kebnfLexer.interp +++ /dev/null @@ -1,104 +0,0 @@ -token literal names: -null -'*' -'+' -'?' -'true' -'false' -'this' -'[QualifiedName]' -null -'+=' -'?=' -'|' -':' -';' -',' -'(' -')' -'[' -']' -'{' -'}' -'.' -'~' -null -null -null -null -null -null -null - -token symbolic names: -null -null -null -null -null -null -null -null -ASSIGN -ADD_ASSIGN -BOOL_ASSIGN -PIPE -COLON -SEMICOLON -COMMA -LPAREN -RPAREN -LBRACK -RBRACK -LBRACE -RBRACE -DOT -TILDE -ID -INT -STRING -COMMENT -WS -CONTINUATION -NL - -rule names: -T__0 -T__1 -T__2 -T__3 -T__4 -T__5 -T__6 -ASSIGN -ADD_ASSIGN -BOOL_ASSIGN -PIPE -COLON -SEMICOLON -COMMA -LPAREN -RPAREN -LBRACK -RBRACK -LBRACE -RBRACE -DOT -TILDE -ID -INT -STRING -COMMENT -WS -CONTINUATION -NL - -channel names: -DEFAULT_TOKEN_CHANNEL -HIDDEN - -mode names: -DEFAULT_MODE - -atn: -[4, 0, 29, 190, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 102, 8, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 5, 22, 136, 8, 22, 10, 22, 12, 22, 139, 9, 22, 1, 23, 4, 23, 142, 8, 23, 11, 23, 12, 23, 143, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 150, 8, 24, 10, 24, 12, 24, 153, 9, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 5, 25, 161, 8, 25, 10, 25, 12, 25, 164, 9, 25, 1, 25, 1, 25, 1, 26, 4, 26, 169, 8, 26, 11, 26, 12, 26, 170, 1, 26, 1, 26, 1, 27, 3, 27, 176, 8, 27, 1, 27, 1, 27, 4, 27, 180, 8, 27, 11, 27, 12, 27, 181, 1, 27, 1, 27, 1, 28, 3, 28, 187, 8, 28, 1, 28, 1, 28, 0, 0, 29, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 1, 0, 6, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 48, 57, 2, 0, 39, 39, 92, 92, 2, 0, 10, 10, 13, 13, 2, 0, 9, 9, 32, 32, 199, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 1, 59, 1, 0, 0, 0, 3, 61, 1, 0, 0, 0, 5, 63, 1, 0, 0, 0, 7, 65, 1, 0, 0, 0, 9, 70, 1, 0, 0, 0, 11, 76, 1, 0, 0, 0, 13, 81, 1, 0, 0, 0, 15, 101, 1, 0, 0, 0, 17, 103, 1, 0, 0, 0, 19, 106, 1, 0, 0, 0, 21, 109, 1, 0, 0, 0, 23, 111, 1, 0, 0, 0, 25, 113, 1, 0, 0, 0, 27, 115, 1, 0, 0, 0, 29, 117, 1, 0, 0, 0, 31, 119, 1, 0, 0, 0, 33, 121, 1, 0, 0, 0, 35, 123, 1, 0, 0, 0, 37, 125, 1, 0, 0, 0, 39, 127, 1, 0, 0, 0, 41, 129, 1, 0, 0, 0, 43, 131, 1, 0, 0, 0, 45, 133, 1, 0, 0, 0, 47, 141, 1, 0, 0, 0, 49, 145, 1, 0, 0, 0, 51, 156, 1, 0, 0, 0, 53, 168, 1, 0, 0, 0, 55, 175, 1, 0, 0, 0, 57, 186, 1, 0, 0, 0, 59, 60, 5, 42, 0, 0, 60, 2, 1, 0, 0, 0, 61, 62, 5, 43, 0, 0, 62, 4, 1, 0, 0, 0, 63, 64, 5, 63, 0, 0, 64, 6, 1, 0, 0, 0, 65, 66, 5, 116, 0, 0, 66, 67, 5, 114, 0, 0, 67, 68, 5, 117, 0, 0, 68, 69, 5, 101, 0, 0, 69, 8, 1, 0, 0, 0, 70, 71, 5, 102, 0, 0, 71, 72, 5, 97, 0, 0, 72, 73, 5, 108, 0, 0, 73, 74, 5, 115, 0, 0, 74, 75, 5, 101, 0, 0, 75, 10, 1, 0, 0, 0, 76, 77, 5, 116, 0, 0, 77, 78, 5, 104, 0, 0, 78, 79, 5, 105, 0, 0, 79, 80, 5, 115, 0, 0, 80, 12, 1, 0, 0, 0, 81, 82, 5, 91, 0, 0, 82, 83, 5, 81, 0, 0, 83, 84, 5, 117, 0, 0, 84, 85, 5, 97, 0, 0, 85, 86, 5, 108, 0, 0, 86, 87, 5, 105, 0, 0, 87, 88, 5, 102, 0, 0, 88, 89, 5, 105, 0, 0, 89, 90, 5, 101, 0, 0, 90, 91, 5, 100, 0, 0, 91, 92, 5, 78, 0, 0, 92, 93, 5, 97, 0, 0, 93, 94, 5, 109, 0, 0, 94, 95, 5, 101, 0, 0, 95, 96, 5, 93, 0, 0, 96, 14, 1, 0, 0, 0, 97, 98, 5, 58, 0, 0, 98, 99, 5, 58, 0, 0, 99, 102, 5, 61, 0, 0, 100, 102, 5, 61, 0, 0, 101, 97, 1, 0, 0, 0, 101, 100, 1, 0, 0, 0, 102, 16, 1, 0, 0, 0, 103, 104, 5, 43, 0, 0, 104, 105, 5, 61, 0, 0, 105, 18, 1, 0, 0, 0, 106, 107, 5, 63, 0, 0, 107, 108, 5, 61, 0, 0, 108, 20, 1, 0, 0, 0, 109, 110, 5, 124, 0, 0, 110, 22, 1, 0, 0, 0, 111, 112, 5, 58, 0, 0, 112, 24, 1, 0, 0, 0, 113, 114, 5, 59, 0, 0, 114, 26, 1, 0, 0, 0, 115, 116, 5, 44, 0, 0, 116, 28, 1, 0, 0, 0, 117, 118, 5, 40, 0, 0, 118, 30, 1, 0, 0, 0, 119, 120, 5, 41, 0, 0, 120, 32, 1, 0, 0, 0, 121, 122, 5, 91, 0, 0, 122, 34, 1, 0, 0, 0, 123, 124, 5, 93, 0, 0, 124, 36, 1, 0, 0, 0, 125, 126, 5, 123, 0, 0, 126, 38, 1, 0, 0, 0, 127, 128, 5, 125, 0, 0, 128, 40, 1, 0, 0, 0, 129, 130, 5, 46, 0, 0, 130, 42, 1, 0, 0, 0, 131, 132, 5, 126, 0, 0, 132, 44, 1, 0, 0, 0, 133, 137, 7, 0, 0, 0, 134, 136, 7, 1, 0, 0, 135, 134, 1, 0, 0, 0, 136, 139, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 46, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 140, 142, 7, 2, 0, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 48, 1, 0, 0, 0, 145, 151, 5, 39, 0, 0, 146, 150, 8, 3, 0, 0, 147, 148, 5, 92, 0, 0, 148, 150, 9, 0, 0, 0, 149, 146, 1, 0, 0, 0, 149, 147, 1, 0, 0, 0, 150, 153, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 154, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 154, 155, 5, 39, 0, 0, 155, 50, 1, 0, 0, 0, 156, 157, 5, 47, 0, 0, 157, 158, 5, 47, 0, 0, 158, 162, 1, 0, 0, 0, 159, 161, 8, 4, 0, 0, 160, 159, 1, 0, 0, 0, 161, 164, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 165, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 165, 166, 6, 25, 0, 0, 166, 52, 1, 0, 0, 0, 167, 169, 7, 5, 0, 0, 168, 167, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 173, 6, 26, 0, 0, 173, 54, 1, 0, 0, 0, 174, 176, 5, 13, 0, 0, 175, 174, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 179, 5, 10, 0, 0, 178, 180, 7, 5, 0, 0, 179, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 6, 27, 0, 0, 184, 56, 1, 0, 0, 0, 185, 187, 5, 13, 0, 0, 186, 185, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 189, 5, 10, 0, 0, 189, 58, 1, 0, 0, 0, 11, 0, 101, 137, 143, 149, 151, 162, 170, 175, 181, 186, 1, 6, 0, 0] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs index 957fb5d5..f60a6273 100644 --- a/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs +++ b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs @@ -46,5 +46,10 @@ public class TextualNotationRule /// Gets the collection of defined /// public List Elements { get; } = []; + + /// + /// Gets or sets the raw string that declares the rule + /// + public string RawRule { get; set; } } } diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs new file mode 100644 index 00000000..e85b673a --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + /// + /// Defines a that is a value literal + /// + public class ValueLiteralElement: RuleElement + { + /// + /// Gets or sets the literal value + /// + public string Value { get; set; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs index fff2225b..5eb07260 100644 --- a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs +++ b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs @@ -53,7 +53,8 @@ public override object VisitRule_definition(kebnfParser.Rule_definitionContext c var rule = new TextualNotationRule() { RuleName = context.name.Text, - TargetElementName = context.name.Text + TargetElementName = context.target_ast?.Text, + RawRule = context.GetText() }; if (string.IsNullOrWhiteSpace(rule.RuleName)) @@ -81,7 +82,7 @@ public override object VisitRule_definition(kebnfParser.Rule_definitionContext c /// The visitor result, as a collection of public override object VisitAlternatives(kebnfParser.AlternativesContext context) { - return context.alternative().Select(a => (Alternatives)this.Visit(a)).SelectMany(x => x.Elements).ToList(); + return context.alternative().Select(a => (Alternatives)this.Visit(a)).SelectMany(x => x.Elements.Where(e => e!=null)).ToList(); } /// @@ -128,6 +129,23 @@ public override object VisitNon_parsing_assignment(kebnfParser.Non_parsing_assig }; } + /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public override object VisitValue_literal(kebnfParser.Value_literalContext context) + { + return new ValueLiteralElement() + { + Value = context.GetText() + }; + } + /// /// Visit a parse tree produced by . /// @@ -153,7 +171,7 @@ public override object VisitTerminal(kebnfParser.TerminalContext context) { return new TerminalElement() { - Value = context.val.GetText().Trim('\''), + Value = context.val.Text.Trim('\''), Suffix = context.suffix?.GetText() }; } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs new file mode 100644 index 00000000..cddeef09 --- /dev/null +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -0,0 +1,103 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.HandleBarHelpers +{ + using System; + using System.Collections.Generic; + using System.Linq; + + using HandlebarsDotNet; + + using SysML2.NET.CodeGenerator.Grammar.Model; + + using uml4net.StructuredClassifiers; + + /// + /// Provides textual notation rules related helper for + /// + public static class RulesHelper + { + /// + /// Register this helper + /// + /// The context with which the helper needs to be registered + public static void RegisterRulesHelper(this IHandlebars handlebars) + { + handlebars.RegisterHelper("RulesHelper.WriteForPoco", (writer, _, arguments) => + { + if (arguments.Length != 2) + { + throw new ArgumentException("RulesHelper.WriteForPoco expects to have 2 arguments"); + } + + if (arguments[0] is not IClass umlClass) + { + throw new ArgumentException("RulesHelper.WriteForPoco expects IClass as first argument"); + } + + if (arguments[1] is not List rules) + { + throw new ArgumentException("RulesHelper.WriteForPoco expects a list of TextualNotationRule as second argument"); + } + + var canonicalRule = rules.SingleOrDefault(x => x.RuleName == umlClass.Name); + + if (canonicalRule == null) + { + return; + } + + writer.WriteSafeString($"// Rule definition : {canonicalRule.RawRule}"); + WriteForRule(writer, umlClass, canonicalRule, rules); + }); + } + + private static void WriteForRule(EncodedTextWriter writer, IClass umlClass, TextualNotationRule textualRule, List rules) + { + foreach (var textualRuleElement in textualRule.Elements) + { + switch (textualRuleElement) + { + case TerminalElement terminalElement: + writer.WriteSafeString($"stringBuilder.Append(\"{terminalElement.Value} \");"); + break; + case NonTerminalElement nonTerminalElement: + var referencedRule = rules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); + writer.WriteSafeString($"// non Terminal : {nonTerminalElement.Name}; Found rule {referencedRule?.RawRule}"); + break; + case GroupElement groupElement: + writer.WriteSafeString("// Group Element "); + break; + case AssignmentElement assignmentElement: + writer.WriteSafeString($"// Assignment Element : {assignmentElement.Property} {assignmentElement.Operator} {assignmentElement.Value}"); + break; + case NonParsingAssignmentElement nonParsingAssignmentElement: + writer.WriteSafeString($"// Assignment Element : {nonParsingAssignmentElement.PropertyName} {nonParsingAssignmentElement.Operator} {nonParsingAssignmentElement.Value}"); + break; + default: + throw new ArgumentException("Unknown element type"); + } + + writer.WriteSafeString(Environment.NewLine); + } + } + } +} diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs index a057be8f..18473811 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AcceptActionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AcceptActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public AcceptActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.AcceptActionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs index c0a1f991..778d2465 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ActionDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ActionDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public ActionDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ActionDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ActionDefinition=OccurrenceDefinitionPrefix'action''def'DefinitionDeclarationActionBody + + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + stringBuilder.Append("action "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs index 9e9b7320..544a83a7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ActionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public ActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ActionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ActionUsage=OccurrenceUsagePrefix'action'ActionUsageDeclarationActionBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("action "); + // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? + + + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs index fc181961..d43e6335 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ActorMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ActorMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public ActorMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.ActorMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs index 23b3a5d7..66a8ec2a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AllocationDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AllocationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public AllocationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Allocations.AllocationDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : AllocationDefinition=OccurrenceDefinitionPrefix'allocation''def'Definition + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("allocation "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs index cddc6e71..630fa981 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AllocationUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AllocationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public AllocationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Allocations.AllocationUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : AllocationUsage=OccurrenceUsagePrefixAllocationUsageDeclarationUsageBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + // non Terminal : AllocationUsageDeclaration; Found rule AllocationUsageDeclaration:AllocationUsage='allocation'UsageDeclaration('allocate'ConnectorPart)?|'allocate'ConnectorPart + + + + + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs index d376b8d3..5f61ce7e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AnalysisCaseDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AnalysisCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public AnalysisCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : AnalysisCaseDefinition=OccurrenceDefinitionPrefix'analysis''def'DefinitionDeclarationCaseBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("analysis "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs index fd693722..e2c61eba 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AnalysisCaseUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AnalysisCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,27 @@ public AnalysisCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : AnalysisCaseUsage=OccurrenceUsagePrefix'analysis'ConstraintUsageDeclarationCaseBody + + + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("analysis "); + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + + + + + + + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs index 7f9b8724..b312b461 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AnnotatingElementTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AnnotatingElementTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,31 @@ public AnnotatingElementTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.AnnotatingElement poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : AnnotatingElement=Comment|Documentation|TextualRepresentation|MetadataFeature + + + + // non Terminal : Comment; Found rule Comment=('comment'Identification('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?)?('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT + + + // non Terminal : Documentation; Found rule Documentation='doc'Identification('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT + + + + + // non Terminal : TextualRepresentation; Found rule TextualRepresentation=('rep'Identification)?'language'language=STRING_VALUEbody=REGULAR_COMMENT + + + + + + + // non Terminal : MetadataFeature; Found rule MetadataFeature=(ownedRelationship+=PrefixMetadataMember)*('@'|'metadata')MetadataFeatureDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs index 559818d2..ced6d125 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AnnotationTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AnnotationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,12 @@ public AnnotationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.Annotation poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Annotation=annotatedElement=[QualifiedName] + + // Assignment Element : annotatedElement = + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs index a2106272..398b7d80 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AssertConstraintUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AssertConstraintUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,20 @@ public AssertConstraintUsageTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Constraints.AssertConstraintUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : AssertConstraintUsage=OccurrenceUsagePrefix'assert'(isNegated?='not')?(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'constraint'ConstraintUsageDeclaration)CalculationBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("assert "); + // Group Element + // Group Element + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs index 1fc7f5e7..a405b00b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AssignmentActionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AssignmentActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public AssignmentActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.AssignmentActionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs index 30b1950d..9ee85d6d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AssociationStructureTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AssociationStructureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,26 @@ public AssociationStructureTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Associations.AssociationStructure poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : AssociationStructure=TypePrefix'assoc''struct'ClassifierDeclarationTypeBody + + + + + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("assoc "); + stringBuilder.Append("struct "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs index 4f3bfb17..beefd97f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AssociationTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AssociationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public AssociationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Associations.Association poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Association=TypePrefix'assoc'ClassifierDeclarationTypeBody + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("assoc "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs index 0f4ea18f..a09bbf4a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AttributeDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AttributeDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public AttributeDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Attributes.AttributeDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : AttributeDefinition:AttributeDefinition=DefinitionPrefix'attribute''def'Definition + + // non Terminal : DefinitionPrefix; Found rule DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* + + + stringBuilder.Append("attribute "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs index ae50325d..55142496 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class AttributeUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public AttributeUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,20 @@ public AttributeUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Attributes.AttributeUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : AttributeUsage:AttributeUsage=UsagePrefix'attribute'Usage + + + + // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + + + stringBuilder.Append("attribute "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs index 232c3f5e..06db73a0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class BehaviorTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public BehaviorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public BehaviorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : ba /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Behaviors.Behavior poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Behavior=TypePrefix'behavior'ClassifierDeclarationTypeBody + + + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("behavior "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs index ceac3e0b..c3da729c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class BindingConnectorAsUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public BindingConnectorAsUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,24 @@ public BindingConnectorAsUsageTextualNotationBuilder(ITextualNotationBuilderFaca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.BindingConnectorAsUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : BindingConnectorAsUsage=UsagePrefix('binding'UsageDeclaration)?'bind'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMemberUsageBody + + + + // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + + + // Group Element + stringBuilder.Append("bind "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("= "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs index 0bb69c31..6af305cb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class BindingConnectorTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public BindingConnectorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,25 @@ public BindingConnectorTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Connectors.BindingConnector poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : BindingConnector=FeaturePrefix'binding'BindingConnectorDeclarationTypeBody + + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + + + + + stringBuilder.Append("binding "); + // non Terminal : BindingConnectorDeclaration; Found rule BindingConnectorDeclaration:BindingConnector=FeatureDeclaration('of'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)?|(isSufficient?='all')?('of'?ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)? + + + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs index 65c9e7eb..f50b773d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class BooleanExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public BooleanExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,26 @@ public BooleanExpressionTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.BooleanExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : BooleanExpression=FeaturePrefix'bool'FeatureDeclarationValuePart?FunctionBody + + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + + + + + stringBuilder.Append("bool "); + // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + + + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs index 59293bee..8608fea0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class CalculationDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public CalculationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public CalculationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Calculations.CalculationDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : CalculationDefinition=OccurrenceDefinitionPrefix'calc''def'DefinitionDeclarationCalculationBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("calc "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs index 562cdf64..734608f2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class CalculationUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public CalculationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public CalculationUsageTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Calculations.CalculationUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : CalculationUsage:CalculationUsage=OccurrenceUsagePrefix'calc'ActionUsageDeclarationCalculationBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("calc "); + // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? + + + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs index aaffa984..02ab8927 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class CaseDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public CaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public CaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Cases.CaseDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : CaseDefinition=OccurrenceDefinitionPrefix'case''def'DefinitionDeclarationCaseBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("case "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs index 9382d1f7..77a84abb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class CaseUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public CaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,25 @@ public CaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Cases.CaseUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : CaseUsage=OccurrenceUsagePrefix'case'ConstraintUsageDeclarationCaseBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("case "); + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + + + + + + + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs index ac192b74..de09fd90 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ClassTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ClassTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public ClassTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base( /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Classes.Class poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Class=TypePrefix'class'ClassifierDeclarationTypeBody + + + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("class "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs index 45f43954..fb572d82 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ClassifierTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ClassifierTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public ClassifierTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Classifiers.Classifier poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Classifier=TypePrefix'classifier'ClassifierDeclarationTypeBody + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("classifier "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs index 8cc44e44..c6dc6abd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class CollectExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public CollectExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,14 @@ public CollectExpressionTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.CollectExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : CollectExpression=ownedRelationship+=PrimaryArgumentMember'.'ownedRelationship+=BodyArgumentMember + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(". "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs index f2560afd..f3cd16a3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class CommentTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public CommentTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,14 @@ public CommentTextualNotationBuilder(ITextualNotationBuilderFacade facade) : bas /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.Comment poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Comment=('comment'Identification('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?)?('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT + + // Group Element + // Group Element + // Assignment Element : body = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs index 56613677..38bb9bfd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConcernDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConcernDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public ConcernDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.ConcernDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ConcernDefinition=OccurrenceDefinitionPrefix'concern''def'DefinitionDeclarationRequirementBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("concern "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs index d4344613..52cca171 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConcernUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConcernUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,27 @@ public ConcernUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.ConcernUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ConcernUsage=OccurrenceUsagePrefix'concern'ConstraintUsageDeclarationRequirementBody + + + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("concern "); + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + + + + + + + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs index c35af26b..a42c64cd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConjugatedPortDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConjugatedPortDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,12 @@ public ConjugatedPortDefinitionTextualNotationBuilder(ITextualNotationBuilderFac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ConjugatedPortDefinition=ownedRelationship+=PortConjugation + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs index 773c4da5..54256a70 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConjugatedPortTypingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConjugatedPortTypingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,26 @@ public ConjugatedPortTypingTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortTyping poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ConjugatedPortTyping:ConjugatedPortTyping='~'originalPortDefinition=~[QualifiedName] + + + + + + + + + + + + + + + stringBuilder.Append("~ "); + // Assignment Element : originalPortDefinition = + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs index 9f6b63e5..c4fc6bdd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConjugationTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConjugationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,27 @@ public ConjugationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Conjugation poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Conjugation=('conjugation'Identification)?'conjugate'(conjugatedType=[QualifiedName]|conjugatedType=FeatureChain{ownedRelatedElement+=conjugatedType})CONJUGATES(originalType=[QualifiedName]|originalType=FeatureChain{ownedRelatedElement+=originalType})RelationshipBody + + // Group Element + stringBuilder.Append("conjugate "); + // Group Element + // non Terminal : CONJUGATES; Found rule CONJUGATES='~'|'conjugates' + + + + + + + // Group Element + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs index 5ff8d1b9..6ff91ddd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConnectionDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConnectionDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public ConnectionDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.ConnectionDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ConnectionDefinition=OccurrenceDefinitionPrefix'connection''def'Definition + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("connection "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs index 555cc96e..6e3de8c1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConnectionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConnectionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,18 @@ public ConnectionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.ConnectionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ConnectionUsage=OccurrenceUsagePrefix('connection'UsageDeclarationValuePart?('connect'ConnectorPart)?|'connect'ConnectorPart)UsageBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + // Group Element + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs index 28988131..b054e23d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConnectorTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConnectorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public ConnectorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Connectors.Connector poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Connector=FeaturePrefix'connector'(FeatureDeclaration?ValuePart?|ConnectorDeclaration)TypeBody + + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + + + + + stringBuilder.Append("connector "); + // Group Element + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs index 64abd164..e04f227f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConstraintDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConstraintDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public ConstraintDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Constraints.ConstraintDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ConstraintDefinition=OccurrenceDefinitionPrefix'constraint''def'DefinitionDeclarationCalculationBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("constraint "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs index 648cef38..d6ab2b14 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConstraintUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConstraintUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,25 @@ public ConstraintUsageTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Constraints.ConstraintUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ConstraintUsage=OccurrenceUsagePrefix'constraint'ConstraintUsageDeclarationCalculationBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("constraint "); + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + + + + + + + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs index 726aa707..e3ec167c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ConstructorExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ConstructorExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,14 @@ public ConstructorExpressionTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.ConstructorExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ConstructorExpression='new'ownedRelationship+=InstantiatedTypeMemberownedRelationship+=ConstructorResultMember + + stringBuilder.Append("new "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs index d2287a2f..41e0b661 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class CrossSubsettingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public CrossSubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public CrossSubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.CrossSubsetting poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs index 50ee12ae..f31594b4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class DataTypeTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public DataTypeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public DataTypeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : ba /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.DataTypes.DataType poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : DataType=TypePrefix'datatype'ClassifierDeclarationTypeBody + + + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("datatype "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs index b9702f8a..53187f23 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class DecisionNodeTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public DecisionNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public DecisionNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.DecisionNode poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : DecisionNode=ControlNodePrefixisComposite?='decide'UsageDeclarationActionBody + + // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + + + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs index 29ee79ac..1bab9ec6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class DefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public DefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,17 @@ public DefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Definition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Definition=DefinitionDeclarationDefinitionBody + + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs index a8ebe9b6..6a62ac69 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class DependencyTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public DependencyTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,25 @@ public DependencyTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Dependencies.Dependency poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Dependency=(ownedRelationship+=PrefixMetadataAnnotation)*'dependency'DependencyDeclarationRelationshipBody + + // Group Element + stringBuilder.Append("dependency "); + // non Terminal : DependencyDeclaration; Found rule DependencyDeclaration=(Identification'from')?client+=[QualifiedName](','client+=[QualifiedName])*'to'supplier+=[QualifiedName](','supplier+=[QualifiedName])* + + + + + + + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs index 3082177e..befe8581 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class DifferencingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public DifferencingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,15 @@ public DifferencingTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Differencing poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Differencing=differencingType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain + + + + // Assignment Element : differencingType = + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs index 5ceaae51..ca8bc185 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class DisjoiningTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public DisjoiningTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public DisjoiningTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Disjoining poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Disjoining=('disjoining'Identification)?'disjoint'(typeDisjoined=[QualifiedName]|typeDisjoined=FeatureChain{ownedRelatedElement+=typeDisjoined})'from'(disjoiningType=[QualifiedName]|disjoiningType=FeatureChain{ownedRelatedElement+=disjoiningType})RelationshipBody + + // Group Element + stringBuilder.Append("disjoint "); + // Group Element + stringBuilder.Append("from "); + // Group Element + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs index 1ece483a..9f77279d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class DocumentationTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public DocumentationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public DocumentationTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.Documentation poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Documentation='doc'Identification('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT + + + + stringBuilder.Append("doc "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + + + // Group Element + // Assignment Element : body = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs index 04b434fa..c94f4d5a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ElementFilterMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ElementFilterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public ElementFilterMembershipTextualNotationBuilder(ITextualNotationBuilderFaca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Packages.ElementFilterMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs index 6f8d4a1e..aff631e9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class EndFeatureMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public EndFeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public EndFeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.EndFeatureMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs index ad96cb47..6aa8a491 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class EnumerationDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public EnumerationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public EnumerationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : EnumerationDefinition=DefinitionExtensionKeyword*'enum''def'DefinitionDeclarationEnumerationBody + + // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + + + stringBuilder.Append("enum "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : EnumerationBody; Found rule EnumerationBody:EnumerationDefinition=';'|'{'(ownedRelationship+=AnnotatingMember|ownedRelationship+=EnumerationUsageMember)*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs index a834048d..15303836 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class EnumerationUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public EnumerationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public EnumerationUsageTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : EnumerationUsage:EnumerationUsage=UsagePrefix'enum'Usage + + + + + + // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + + + stringBuilder.Append("enum "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs index 3789b0e7..6c8698a2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class EventOccurrenceUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public EventOccurrenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public EventOccurrenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Occurrences.EventOccurrenceUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : EventOccurrenceUsage=OccurrenceUsagePrefix'event'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'occurrence'UsageDeclaration?)UsageCompletion + + + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("event "); + // Group Element + // non Terminal : UsageCompletion; Found rule UsageCompletion:Usage=ValuePart?UsageBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs index df31bfbf..78bc6c40 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ExhibitStateUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ExhibitStateUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,24 @@ public ExhibitStateUsageTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.ExhibitStateUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ExhibitStateUsage=OccurrenceUsagePrefix'exhibit'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'state'UsageDeclaration)ValuePart?StateUsageBody + + + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("exhibit "); + // Group Element + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // non Terminal : StateUsageBody; Found rule StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs index 308497c0..51a81d68 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,28 @@ public ExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Expression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Expression=FeaturePrefix'expr'FeatureDeclarationValuePart?FunctionBody + + + + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + + + + + stringBuilder.Append("expr "); + // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + + + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs index 19670dbc..94789d10 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FeatureChainExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FeatureChainExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,14 @@ public FeatureChainExpressionTextualNotationBuilder(ITextualNotationBuilderFacad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.FeatureChainExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : FeatureChainExpression=ownedRelationship+=NonFeatureChainPrimaryArgumentMember'.'ownedRelationship+=FeatureChainMember + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(". "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs index 18d69384..13e6303f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FeatureChainingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FeatureChainingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public FeatureChainingTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.FeatureChaining poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs index f413882f..1081e8d4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FeatureInvertingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FeatureInvertingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public FeatureInvertingTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.FeatureInverting poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : FeatureInverting=('inverting'Identification?)?'inverse'(featureInverted=[QualifiedName]|featureInverted=OwnedFeatureChain{ownedRelatedElement+=featureInverted})'of'(invertingFeature=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain{ownedRelatedElement+=invertingFeature})RelationshipBody + + // Group Element + stringBuilder.Append("inverse "); + // Group Element + stringBuilder.Append("of "); + // Group Element + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs index 6455eba3..a0ef9280 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FeatureMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public FeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.FeatureMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs index f3168215..ed784336 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FeatureReferenceExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FeatureReferenceExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,13 @@ public FeatureReferenceExpressionTextualNotationBuilder(ITextualNotationBuilderF /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.FeatureReferenceExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : FeatureReferenceExpression:FeatureReferenceExpression=ownedRelationship+=FeatureReferenceMemberownedRelationship+=EmptyResultMember + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs index 06e184cf..4c4f36b9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FeatureTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,20 @@ public FeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : bas /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.Feature poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Feature=(FeaturePrefix('feature'|ownedRelationship+=PrefixMetadataMember)FeatureDeclaration?|(EndFeaturePrefix|BasicFeaturePrefix)FeatureDeclaration)ValuePart?TypeBody + + + + // Group Element + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs index be37e6ff..d9e9034d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FeatureTypingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FeatureTypingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,30 @@ public FeatureTypingTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.FeatureTyping poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : FeatureTyping=OwnedFeatureTyping|ConjugatedPortTyping + + // non Terminal : OwnedFeatureTyping; Found rule OwnedFeatureTyping:FeatureTyping=type=[QualifiedName]|type=OwnedFeatureChain{ownedRelatedElement+=type} + + + // non Terminal : ConjugatedPortTyping; Found rule ConjugatedPortTyping:ConjugatedPortTyping='~'originalPortDefinition=~[QualifiedName] + + + + + + + + + + + + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs index 41f2c911..1a64bd05 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FeatureValueTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FeatureValueTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,18 @@ public FeatureValueTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.FeatureValues.FeatureValue poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : FeatureValue=('='|isInitial?=':='|isDefault?='default'('='|isInitial?=':=')?)ownedRelatedElement+=OwnedExpression + + + + + + + // Group Element + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs index 8bb1986c..e1796899 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FlowDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FlowDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public FlowDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Flows.FlowDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : FlowDefinition=OccurrenceDefinitionPrefix'flow''def'Definition + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("flow "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs index d3d875ab..18b5d6a0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FlowEndTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FlowEndTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,13 @@ public FlowEndTextualNotationBuilder(ITextualNotationBuilderFacade facade) : bas /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.FlowEnd poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : FlowEnd=(ownedRelationship+=FlowEndSubsetting)?ownedRelationship+=FlowFeatureMember + + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs index 7205ef89..83cfede0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FlowTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FlowTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public FlowTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.Flow poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Flow=FeaturePrefix'flow'FlowDeclarationTypeBody + + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + + + + + stringBuilder.Append("flow "); + // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs index 924473af..8a12225f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FlowUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FlowUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public FlowUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Flows.FlowUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : FlowUsage=OccurrenceUsagePrefix'flow'FlowDeclarationDefinitionBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("flow "); + // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + + + // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs index f87ed1bb..c3d723d8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ForLoopActionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ForLoopActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public ForLoopActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade fa /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ForLoopActionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs index 0703248e..80472fca 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ForkNodeTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ForkNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public ForkNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : ba /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ForkNode poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ForkNode=ControlNodePrefixisComposite?='fork'UsageDeclarationActionBody + + + + // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + + + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs index 95b1c3db..dd0b5794 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FramedConcernMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FramedConcernMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public FramedConcernMembershipTextualNotationBuilder(ITextualNotationBuilderFaca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.FramedConcernMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs index 10c29640..bac8b85a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class FunctionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public FunctionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public FunctionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : ba /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Function poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Function=TypePrefix'function'ClassifierDeclarationFunctionBody + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("function "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs index c92456fe..f4c33922 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class IfActionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public IfActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public IfActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.IfActionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs index 2b98ef33..6b4990d3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class IncludeUseCaseUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public IncludeUseCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,26 @@ public IncludeUseCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.UseCases.IncludeUseCaseUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : IncludeUseCaseUsage=OccurrenceUsagePrefix'include'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'use''case'UsageDeclaration)ValuePart?CaseBody + + + + + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("include "); + // Group Element + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs index c0234f57..0ace1535 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class IndexExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public IndexExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,16 @@ public IndexExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.IndexExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : IndexExpression=ownedRelationship+=PrimaryArgumentMember'#''('ownedRelationship+=SequenceExpressionListMember')' + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("# "); + stringBuilder.Append("( "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(") "); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs index 661ecef7..2f1a4f53 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class InteractionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public InteractionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public InteractionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.Interaction poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Interaction=TypePrefix'interaction'ClassifierDeclarationTypeBody + + + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("interaction "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs index 4e4ef98f..7be9e7cf 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class InterfaceDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public InterfaceDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public InterfaceDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : InterfaceDefinition=OccurrenceDefinitionPrefix'interface''def'DefinitionDeclarationInterfaceBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("interface "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : InterfaceBody; Found rule InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs index 5d9c5911..c8503112 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class InterfaceUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public InterfaceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public InterfaceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : InterfaceUsage=OccurrenceUsagePrefix'interface'InterfaceUsageDeclarationInterfaceBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("interface "); + // non Terminal : InterfaceUsageDeclaration; Found rule InterfaceUsageDeclaration:InterfaceUsage=UsageDeclarationValuePart?('connect'InterfacePart)?|InterfacePart + + + // non Terminal : InterfaceBody; Found rule InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs index e637b316..bac35b11 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class IntersectingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public IntersectingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,13 @@ public IntersectingTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Intersecting poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Intersecting=intersectingType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain + + // Assignment Element : intersectingType = + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs index 3823761f..db278abc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class InvariantTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public InvariantTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,31 @@ public InvariantTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Invariant poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Invariant=FeaturePrefix'inv'('true'|isNegated?='false')?FeatureDeclarationValuePart?FunctionBody + + + + + + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + + + + + stringBuilder.Append("inv "); + // Group Element + // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + + + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs index 10001e4e..6b67bfbb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class InvocationExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public InvocationExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,16 @@ public InvocationExpressionTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.InvocationExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : InvocationExpression:InvocationExpression=ownedRelationship+=InstantiatedTypeMemberArgumentListownedRelationship+=EmptyResultMember + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : ArgumentList; Found rule ArgumentList:Feature='('(PositionalArgumentList|NamedArgumentList)?')' + + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs index 27431910..d9fbbedf 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ItemDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ItemDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public ItemDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Items.ItemDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ItemDefinition=OccurrenceDefinitionPrefix'item''def'Definition + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("item "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs index 20a21075..49a66600 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ItemUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ItemUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,20 @@ public ItemUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Items.ItemUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ItemUsage=OccurrenceUsagePrefix'item'Usage + + + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("item "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs index a8acbff3..7debc859 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class JoinNodeTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public JoinNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public JoinNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : ba /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.JoinNode poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : JoinNode=ControlNodePrefixisComposite?='join'UsageDeclarationActionBody + + // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + + + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs index 0d4012b8..0047e9b6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class LibraryPackageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public LibraryPackageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,20 @@ public LibraryPackageTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Packages.LibraryPackage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : LibraryPackage=(isStandard?='standard')'library'(ownedRelationship+=PrefixMetadataMember)*PackageDeclarationPackageBody + + // Group Element + stringBuilder.Append("library "); + // Group Element + // non Terminal : PackageDeclaration; Found rule PackageDeclaration:Package='package'Identification + + + // non Terminal : PackageBody; Found rule PackageBody:Package=';'|'{'PackageBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs index 2a90066f..07718fec 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class LiteralBooleanTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public LiteralBooleanTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,12 @@ public LiteralBooleanTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralBoolean poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : LiteralBoolean=value=BooleanValue + + // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs index ae091cad..bcf9b3e0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class LiteralExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public LiteralExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,30 @@ public LiteralExpressionTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : LiteralExpression=LiteralBoolean|LiteralString|LiteralInteger|LiteralReal|LiteralInfinity + + // non Terminal : LiteralBoolean; Found rule LiteralBoolean=value=BooleanValue + + + // non Terminal : LiteralString; Found rule LiteralString=value=STRING_VALUE + + + // non Terminal : LiteralInteger; Found rule LiteralInteger=value=DECIMAL_VALUE + + + // non Terminal : LiteralReal; Found rule LiteralReal=value=RealValue + + + // non Terminal : LiteralInfinity; Found rule LiteralInfinity='*' + + + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs index 6cf1bb30..f4170c85 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class LiteralInfinityTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public LiteralInfinityTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,16 @@ public LiteralInfinityTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInfinity poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : LiteralInfinity='*' + + + + + + stringBuilder.Append("* "); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs index 147116ae..8fc0645a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class LiteralIntegerTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public LiteralIntegerTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,12 @@ public LiteralIntegerTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInteger poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : LiteralInteger=value=DECIMAL_VALUE + + // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs index c8b499bd..24e82c08 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class LiteralRationalTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public LiteralRationalTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public LiteralRationalTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralRational poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs index 4aff1cff..422861eb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class LiteralStringTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public LiteralStringTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,12 @@ public LiteralStringTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralString poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : LiteralString=value=STRING_VALUE + + // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs index 26b67df2..b39165be 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MembershipExposeTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MembershipExposeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,14 @@ public MembershipExposeTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.MembershipExpose poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : MembershipExpose=MembershipImport + + // non Terminal : MembershipImport; Found rule MembershipImport=importedMembership=[QualifiedName]('::'isRecursive?='**')? + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs index 5f6f73f1..b1269203 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MembershipImportTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MembershipImportTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,13 @@ public MembershipImportTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.MembershipImport poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : MembershipImport=importedMembership=[QualifiedName]('::'isRecursive?='**')? + + // Assignment Element : importedMembership = + // Group Element + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs index 596f0685..42cecd12 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public MembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.Membership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs index 04858ab6..af5187fa 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MergeNodeTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MergeNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public MergeNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.MergeNode poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : MergeNode=ControlNodePrefixisComposite?='merge'UsageDeclarationActionBody + + // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + + + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs index 73f49827..84393832 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MetaclassTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MetaclassTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public MetaclassTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Metadata.Metaclass poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Metaclass=TypePrefix'metaclass'ClassifierDeclarationTypeBody + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("metaclass "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs index 21ad5ee7..d76685f5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MetadataAccessExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MetadataAccessExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,14 @@ public MetadataAccessExpressionTextualNotationBuilder(ITextualNotationBuilderFac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.MetadataAccessExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : MetadataAccessExpression=ownedRelationship+=ElementReferenceMember'.''metadata' + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(". "); + stringBuilder.Append("metadata "); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs index 8551fb97..bc2c8720 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MetadataDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MetadataDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,20 @@ public MetadataDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade fa /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Metadata.MetadataDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : MetadataDefinition=(isAbstract?='abstract')?DefinitionExtensionKeyword*'metadata''def'Definition + + // Group Element + // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + + + stringBuilder.Append("metadata "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs index 74ebcb0d..62236c3a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MetadataFeatureTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MetadataFeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,20 @@ public MetadataFeatureTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Metadata.MetadataFeature poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : MetadataFeature=(ownedRelationship+=PrefixMetadataMember)*('@'|'metadata')MetadataFeatureDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody + + // Group Element + // Group Element + // non Terminal : MetadataFeatureDeclaration; Found rule MetadataFeatureDeclaration:MetadataFeature=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping + + + // Group Element + // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs index d8f44f9d..40519a7d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MetadataUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MetadataUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public MetadataUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Metadata.MetadataUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : MetadataUsage=UsageExtensionKeyword*('@'|'metadata')MetadataUsageDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody + + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + + + // Group Element + // non Terminal : MetadataUsageDeclaration; Found rule MetadataUsageDeclaration:MetadataUsage=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping + + + // Group Element + // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs index 45d03d82..cbecd043 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MultiplicityRangeTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MultiplicityRangeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,15 @@ public MultiplicityRangeTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Multiplicities.MultiplicityRange poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' + + stringBuilder.Append("[ "); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("] "); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs index b12a1877..f35a4ebf 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class MultiplicityTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public MultiplicityTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,17 @@ public MultiplicityTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Multiplicity poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Multiplicity=MultiplicitySubset|MultiplicityRange + + // non Terminal : MultiplicitySubset; Found rule MultiplicitySubset:Multiplicity='multiplicity'IdentificationSubsetsTypeBody + + + // non Terminal : MultiplicityRange; Found rule MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs index b39486ad..23d907dc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class NamespaceExposeTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public NamespaceExposeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,16 @@ public NamespaceExposeTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.NamespaceExpose poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : NamespaceExpose=NamespaceImport + + + + // non Terminal : NamespaceImport; Found rule NamespaceImport=importedNamespace=[QualifiedName]'::''*'('::'isRecursive?='**')?|importedNamespace=FilterPackage{ownedRelatedElement+=importedNamespace} + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs index e3c7988b..67559bb0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class NamespaceImportTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public NamespaceImportTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,17 @@ public NamespaceImportTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.NamespaceImport poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : NamespaceImport=importedNamespace=[QualifiedName]'::''*'('::'isRecursive?='**')?|importedNamespace=FilterPackage{ownedRelatedElement+=importedNamespace} + + // Assignment Element : importedNamespace = + stringBuilder.Append(":: "); + stringBuilder.Append("* "); + // Group Element + // Assignment Element : importedNamespace = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelatedElement += importedNamespace + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs index 9826ab5b..b6d31697 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -46,7 +48,20 @@ public NamespaceTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.Namespace poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Namespace=(ownedRelationship+=PrefixMetadataMember)*NamespaceDeclarationNamespaceBody + + + + // Group Element + // non Terminal : NamespaceDeclaration; Found rule NamespaceDeclaration:Namespace='namespace'Identification + + + // non Terminal : NamespaceBody; Found rule NamespaceBody:Namespace=';'|'{'NamespaceBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs index dc9a2ba4..56fbbf50 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class NullExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public NullExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,14 @@ public NullExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.NullExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : NullExpression:NullExpression='null'|'('')' + + stringBuilder.Append("null "); + stringBuilder.Append("( "); + stringBuilder.Append(") "); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs index 1d345283..ff11b993 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ObjectiveMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ObjectiveMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public ObjectiveMembershipTextualNotationBuilder(ITextualNotationBuilderFacade f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Cases.ObjectiveMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs index 150bd0b3..6873371f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class OccurrenceDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public OccurrenceDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public OccurrenceDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : OccurrenceDefinition=OccurrenceDefinitionPrefix'occurrence''def'Definition + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("occurrence "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs index 4ffded5e..ceb2725b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class OccurrenceUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public OccurrenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,18 @@ public OccurrenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : OccurrenceUsage=OccurrenceUsagePrefix'occurrence'Usage + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("occurrence "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs index 8f42dec7..52d0c1b4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class OperatorExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public OperatorExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public OperatorExpressionTextualNotationBuilder(ITextualNotationBuilderFacade fa /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.OperatorExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs index 2ac702d5..07cc56bc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class OwningMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public OwningMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public OwningMembershipTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs index bf9430be..71aea619 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class PackageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public PackageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,18 @@ public PackageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : bas /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Packages.Package poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Package=(ownedRelationship+=PrefixMetadataMember)*PackageDeclarationPackageBody + + // Group Element + // non Terminal : PackageDeclaration; Found rule PackageDeclaration:Package='package'Identification + + + // non Terminal : PackageBody; Found rule PackageBody:Package=';'|'{'PackageBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs index fdbb5a85..9d64fb11 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ParameterMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ParameterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public ParameterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Behaviors.ParameterMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs index b2035ace..20d9546f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class PartDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public PartDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public PartDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Parts.PartDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : PartDefinition=OccurrenceDefinitionPrefix'part''def'Definition + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("part "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs index 4029b06a..2252af43 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class PartUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public PartUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,20 @@ public PartUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Parts.PartUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : PartUsage=OccurrenceUsagePrefix'part'Usage + + + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("part "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs index 0c2ce859..fa3ac495 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class PayloadFeatureTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public PayloadFeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,24 @@ public PayloadFeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.PayloadFeature poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : PayloadFeature:Feature=Identification?PayloadFeatureSpecializationPartValuePart?|ownedRelationship+=OwnedFeatureTyping(ownedRelationship+=OwnedMultiplicity)?|ownedRelationship+=OwnedMultiplicityownedRelationship+=OwnedFeatureTyping + + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + + + // non Terminal : PayloadFeatureSpecializationPart; Found rule PayloadFeatureSpecializationPart:Feature=(FeatureSpecialization)+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization+ + + + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs index 6b4b19a5..44c02c21 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class PerformActionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public PerformActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public PerformActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade fa /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.PerformActionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : PerformActionUsage=OccurrenceUsagePrefix'perform'PerformActionUsageDeclarationActionBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("perform "); + // non Terminal : PerformActionUsageDeclaration; Found rule PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? + + + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs index 9b135767..b6a7cf10 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class PortConjugationTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public PortConjugationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,11 @@ public PortConjugationTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.PortConjugation poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : PortConjugation={} + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs index d8afb8df..d443a055 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class PortDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public PortDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public PortDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.PortDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : PortDefinition=DefinitionPrefix'port''def'DefinitionownedRelationship+=ConjugatedPortDefinitionMember{conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition=this} + + + + // non Terminal : DefinitionPrefix; Found rule DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* + + + stringBuilder.Append("port "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition = this + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs index 0767bb08..4a0d4854 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class PortUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public PortUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,18 @@ public PortUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.PortUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : PortUsage=OccurrenceUsagePrefix'port'Usage + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("port "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs index e60633c5..b6e0ab28 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class PredicateTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public PredicateTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public PredicateTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Predicate poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Predicate=TypePrefix'predicate'ClassifierDeclarationFunctionBody + + + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("predicate "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs index 417bff22..c381fbd5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class RedefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public RedefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,31 @@ public RedefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.Redefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Redefinition=('specialization'Identification)?'redefinition'SpecificTypeREDEFINESGeneralTypeRelationshipBody + + // Group Element + stringBuilder.Append("redefinition "); + // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} + + + // non Terminal : REDEFINES; Found rule REDEFINES=':>>'|'redefines' + + + + + // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} + + + + + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs index 8f623a0f..378d2a3d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ReferenceSubsettingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ReferenceSubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public ReferenceSubsettingTextualNotationBuilder(ITextualNotationBuilderFacade f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.ReferenceSubsetting poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs index 69cb2e00..19fb28fe 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ReferenceUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ReferenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,16 @@ public ReferenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.ReferenceUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ReferenceUsage=(EndUsagePrefix|RefPrefix)'ref'Usage + + // Group Element + stringBuilder.Append("ref "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs index 45e90e18..d68aeb78 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class RenderingDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public RenderingDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public RenderingDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.RenderingDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : RenderingDefinition=OccurrenceDefinitionPrefix'rendering''def'Definition + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("rendering "); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs index 3ee43fca..0093a76a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class RenderingUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public RenderingUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,20 @@ public RenderingUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.RenderingUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : RenderingUsage=OccurrenceUsagePrefix'rendering'Usage + + + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("rendering "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs index f677c608..3be5c9fa 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class RequirementConstraintMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public RequirementConstraintMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public RequirementConstraintMembershipTextualNotationBuilder(ITextualNotationBui /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.RequirementConstraintMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs index f47ba59d..d891905f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class RequirementDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public RequirementDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public RequirementDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.RequirementDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : RequirementDefinition=OccurrenceDefinitionPrefix'requirement''def'DefinitionDeclarationRequirementBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("requirement "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs index 412d6708..b400dc7c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class RequirementUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public RequirementUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,25 @@ public RequirementUsageTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.RequirementUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : RequirementUsage=OccurrenceUsagePrefix'requirement'ConstraintUsageDeclarationRequirementBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("requirement "); + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + + + + + + + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs index 532a4856..f4a28e3e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class RequirementVerificationMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public RequirementVerificationMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public RequirementVerificationMembershipTextualNotationBuilder(ITextualNotationB /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.VerificationCases.RequirementVerificationMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs index c2fade6a..b4a3e1cd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ResultExpressionMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ResultExpressionMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public ResultExpressionMembershipTextualNotationBuilder(ITextualNotationBuilderF /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.ResultExpressionMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs index 34b0c6c2..c4d4b05a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ReturnParameterMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ReturnParameterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public ReturnParameterMembershipTextualNotationBuilder(ITextualNotationBuilderFa /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.ReturnParameterMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs index faaf6298..c6a117f2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SatisfyRequirementUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SatisfyRequirementUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,25 @@ public SatisfyRequirementUsageTextualNotationBuilder(ITextualNotationBuilderFaca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.SatisfyRequirementUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : SatisfyRequirementUsage=OccurrenceUsagePrefix'assert'(isNegated?='not')'satisfy'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'requirement'UsageDeclaration)ValuePart?('by'ownedRelationship+=SatisfactionSubjectMember)?RequirementBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("assert "); + // Group Element + stringBuilder.Append("satisfy "); + // Group Element + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // Group Element + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs index 0248d379..95ad32bd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SelectExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SelectExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,14 @@ public SelectExpressionTextualNotationBuilder(ITextualNotationBuilderFacade faca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.SelectExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : SelectExpression=ownedRelationship+=PrimaryArgumentMember'.?'ownedRelationship+=BodyArgumentMember + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(".? "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs index 089e72df..d2ba96e3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SendActionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SendActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public SendActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.SendActionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs index 8bcf649f..c2b7ad8d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SpecializationTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SpecializationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,29 @@ public SpecializationTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Specialization poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Specialization=('specialization'Identification)?'subtype'SpecificTypeSPECIALIZESGeneralTypeRelationshipBody + + // Group Element + stringBuilder.Append("subtype "); + // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} + + + // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' + + + // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} + + + + + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs index 1166d807..a30fccb5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class StakeholderMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public StakeholderMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public StakeholderMembershipTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.StakeholderMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs index 595ab509..09f17f2e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class StateDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public StateDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public StateDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.StateDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : StateDefinition=OccurrenceDefinitionPrefix'state''def'DefinitionDeclarationStateDefBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("state "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : StateDefBody; Found rule StateDefBody:StateDefinition=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs index 68e24065..d8693999 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class StateSubactionMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public StateSubactionMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public StateSubactionMembershipTextualNotationBuilder(ITextualNotationBuilderFac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.StateSubactionMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs index a8891cd8..29922472 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class StateUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public StateUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public StateUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.StateUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : StateUsage=OccurrenceUsagePrefix'state'ActionUsageDeclarationStateUsageBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("state "); + // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? + + + // non Terminal : StateUsageBody; Found rule StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs index 23a7d396..fc747a3a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class StepTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public StepTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,30 @@ public StepTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Behaviors.Step poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Step=FeaturePrefix'step'FeatureDeclarationValuePart?TypeBody + + + + + + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + + + + + stringBuilder.Append("step "); + // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + + + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs index c5be5072..12965dac 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class StructureTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public StructureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public StructureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Structures.Structure poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Structure=TypePrefix'struct'ClassifierDeclarationTypeBody + + + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("struct "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs index 2c1f46d7..33cdd0f8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SubclassificationTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SubclassificationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public SubclassificationTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Classifiers.Subclassification poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Subclassification=('specialization'Identification)?'subclassifier'subclassifier=[QualifiedName]SPECIALIZESsuperclassifier=[QualifiedName]RelationshipBody + + // Group Element + stringBuilder.Append("subclassifier "); + // Assignment Element : subclassifier = + // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' + + + // Assignment Element : superclassifier = + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs index 098f9d64..2e048911 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SubjectMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SubjectMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public SubjectMembershipTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.SubjectMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs index 0a4ec260..13ea3ffa 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SubsettingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,29 @@ public SubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.Subsetting poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Subsetting=('specialization'Identification)?'subset'SpecificTypeSUBSETSGeneralTypeRelationshipBody + + // Group Element + stringBuilder.Append("subset "); + // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} + + + // non Terminal : SUBSETS; Found rule SUBSETS=':>'|'subsets' + + + // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} + + + + + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs index 4f273f55..0d22683a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SuccessionAsUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SuccessionAsUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,26 @@ public SuccessionAsUsageTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.SuccessionAsUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : SuccessionAsUsage=UsagePrefix('succession'UsageDeclaration)?'first's.ownedRelationship+=ConnectorEndMember'then's.ownedRelationship+=ConnectorEndMemberUsageBody + + + + + + // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + + + // Group Element + stringBuilder.Append("first "); + // Assignment Element : s.ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("then "); + // Assignment Element : s.ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs index 1e9cc87d..91e59333 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SuccessionFlowTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SuccessionFlowTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,24 @@ public SuccessionFlowTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.SuccessionFlow poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : SuccessionFlow=FeaturePrefix'succession''flow'FlowDeclarationTypeBody + + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + + + + + stringBuilder.Append("succession "); + stringBuilder.Append("flow "); + // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs index 5affca57..130e3c6c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SuccessionFlowUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SuccessionFlowUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public SuccessionFlowUsageTextualNotationBuilder(ITextualNotationBuilderFacade f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Flows.SuccessionFlowUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : SuccessionFlowUsage=OccurrenceUsagePrefix'succession''flow'FlowDeclarationDefinitionBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("succession "); + stringBuilder.Append("flow "); + // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + + + // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs index 6a44b58a..346ac701 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class SuccessionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public SuccessionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,27 @@ public SuccessionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Connectors.Succession poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Succession=FeaturePrefix'succession'SuccessionDeclarationTypeBody + + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + + + + + stringBuilder.Append("succession "); + // non Terminal : SuccessionDeclaration; Found rule SuccessionDeclaration:Succession=FeatureDeclaration('first'ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)?|(s.isSufficient?='all')?('first'?ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)? + + + + + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs index 0631c87b..e59cfd38 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class TerminateActionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public TerminateActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public TerminateActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.TerminateActionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs index f1aaa69c..abc8bde5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class TextualRepresentationTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public TextualRepresentationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,19 @@ public TextualRepresentationTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.TextualRepresentation poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : TextualRepresentation=('rep'Identification)?'language'language=STRING_VALUEbody=REGULAR_COMMENT + + + + + + // Group Element + stringBuilder.Append("language "); + // Assignment Element : language = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : body = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs index e728d6a0..a848734b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class TransitionFeatureMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public TransitionFeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public TransitionFeatureMembershipTextualNotationBuilder(ITextualNotationBuilder /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.TransitionFeatureMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs index 304e45dd..d18e8571 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class TransitionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public TransitionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public TransitionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facad /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.TransitionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : TransitionUsage='transition'(UsageDeclaration'first')?ownedRelationship+=FeatureChainMemberownedRelationship+=EmptyParameterMember(ownedRelationship+=EmptyParameterMemberownedRelationship+=TriggerActionMember)?(ownedRelationship+=GuardExpressionMember)?(ownedRelationship+=EffectBehaviorMember)?'then'ownedRelationship+=TransitionSuccessionMemberActionBody + + stringBuilder.Append("transition "); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + // Group Element + // Group Element + stringBuilder.Append("then "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs index f1936c2c..e92a2caf 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class TriggerInvocationExpressionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public TriggerInvocationExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public TriggerInvocationExpressionTextualNotationBuilder(ITextualNotationBuilder /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.TriggerInvocationExpression poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs index c1ef9236..a6c973f2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class TypeFeaturingTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public TypeFeaturingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public TypeFeaturingTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.TypeFeaturing poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : TypeFeaturing='featuring'(Identification'of')?featureOfType=[QualifiedName]'by'featuringType=[QualifiedName]RelationshipBody + + stringBuilder.Append("featuring "); + // Group Element + // Assignment Element : featureOfType = + stringBuilder.Append("by "); + // Assignment Element : featuringType = + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + + + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs index f01befde..aa3cc3ed 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class TypeTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public TypeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,21 @@ public TypeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Type poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Type=TypePrefix'type'TypeDeclarationTypeBody + + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + + + stringBuilder.Append("type "); + // non Terminal : TypeDeclaration; Found rule TypeDeclaration:Type=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SpecializationPart|ConjugationPart)+TypeRelationshipPart* + + + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs index a970c88e..4e722d83 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class UnioningTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public UnioningTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,13 @@ public UnioningTextualNotationBuilder(ITextualNotationBuilderFacade facade) : ba /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Unioning poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Unioning=unioningType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain + + // Assignment Element : unioningType = + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs index 304340c6..484e83a5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class UsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public UsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,17 @@ public UsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base( /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Usage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : Usage=UsageDeclarationUsageCompletion + + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + + + // non Terminal : UsageCompletion; Found rule UsageCompletion:Usage=ValuePart?UsageBody + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs index aa84e885..c49f7b97 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class UseCaseDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public UseCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,23 @@ public UseCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.UseCases.UseCaseDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : UseCaseDefinition=OccurrenceDefinitionPrefix'use''case''def'DefinitionDeclarationCaseBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("use "); + stringBuilder.Append("case "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs index eaccd628..752d5434 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class UseCaseUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public UseCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,26 @@ public UseCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.UseCases.UseCaseUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : UseCaseUsage=OccurrenceUsagePrefix'use''case'ConstraintUsageDeclarationCaseBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("use "); + stringBuilder.Append("case "); + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + + + + + + + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs index e5e7fbfd..23444e06 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class VariantMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public VariantMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public VariantMembershipTextualNotationBuilder(ITextualNotationBuilderFacade fac /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.VariantMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs index 57667c78..425defbb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class VerificationCaseDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public VerificationCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public VerificationCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderF /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : VerificationCaseDefinition=OccurrenceDefinitionPrefix'verification''def'DefinitionDeclarationCaseBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("verification "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs index cc381b27..64bbaa09 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class VerificationCaseUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public VerificationCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,25 @@ public VerificationCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : VerificationCaseUsage=OccurrenceUsagePrefix'verification'ConstraintUsageDeclarationCaseBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("verification "); + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + + + + + + + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs index fe3b48de..0784a909 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ViewDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ViewDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public ViewDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ViewDefinition=OccurrenceDefinitionPrefix'view''def'DefinitionDeclarationViewDefinitionBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("view "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : ViewDefinitionBody; Found rule ViewDefinitionBody:ViewDefinition=';'|'{'ViewDefinitionBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs index fd6430a6..656522e1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ViewRenderingMembershipTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ViewRenderingMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public ViewRenderingMembershipTextualNotationBuilder(ITextualNotationBuilderFaca /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewRenderingMembership poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs index 294b7954..5da8be3a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ViewUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ViewUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,24 @@ public ViewUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : b /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ViewUsage=OccurrenceUsagePrefix'view'UsageDeclaration?ValuePart?ViewBody + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("view "); + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + + + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + + + // non Terminal : ViewBody; Found rule ViewBody:ViewUsage=';'|'{'ViewBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs index f37f29b6..d5646706 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ViewpointDefinitionTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ViewpointDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,22 @@ public ViewpointDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade f /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewpointDefinition poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ViewpointDefinition=OccurrenceDefinitionPrefix'viewpoint''def'DefinitionDeclarationRequirementBody + + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + + + stringBuilder.Append("viewpoint "); + stringBuilder.Append("def "); + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + + + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs index c61212a5..727f0287 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class ViewpointUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public ViewpointUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,27 @@ public ViewpointUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewpointUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + // Rule definition : ViewpointUsage=OccurrenceUsagePrefix'viewpoint'ConstraintUsageDeclarationRequirementBody + + + + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + + + stringBuilder.Append("viewpoint "); + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + + + + + + + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + + + + return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs index b3bb4567..d4f759d4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs @@ -24,6 +24,8 @@ namespace SysML2.NET.TextualNotation { + using System.Text; + using SysML2.NET.Core.POCO.Root.Elements; /// @@ -32,7 +34,7 @@ namespace SysML2.NET.TextualNotation public class WhileLoopActionUsageTextualNotationBuilder : TextualNotationBuilder { /// - /// Initializes a new instance of a + /// Initializes a new instance of a /// /// The used to query textual notation of referenced public WhileLoopActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) @@ -46,7 +48,9 @@ public WhileLoopActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade /// The built textual notation string public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.WhileLoopActionUsage poco) { - return string.Empty; + var stringBuilder = new StringBuilder(); + + return stringBuilder.ToString(); } } } From 865aff3dc7f870e1420758783bb057a15c1a6fdb Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 20 Feb 2026 16:18:55 +0100 Subject: [PATCH 05/15] [WIP] Eased the value_literal on G4 --- Resources/kebnf.g4 | 2 +- .../NET/CodeGenerator/Grammar/kebnf.interp | 8 +- .../NET/CodeGenerator/Grammar/kebnf.tokens | 84 +++++---- .../NET/CodeGenerator/Grammar/kebnfLexer.cs | 163 +++++++++--------- .../CodeGenerator/Grammar/kebnfLexer.interp | 11 +- .../CodeGenerator/Grammar/kebnfLexer.tokens | 84 +++++---- .../NET/CodeGenerator/Grammar/kebnfParser.cs | 73 ++++---- 7 files changed, 194 insertions(+), 231 deletions(-) diff --git a/Resources/kebnf.g4 b/Resources/kebnf.g4 index b67c94d2..d059914a 100644 --- a/Resources/kebnf.g4 +++ b/Resources/kebnf.g4 @@ -73,7 +73,7 @@ dotted_id suffix_op : '*' | '+' | '?' ; -value_literal : ID | 'true' | 'false' | 'this' | INT | STRING | '[QualifiedName]' | SINGLE_QUOTED_STRING; +value_literal : ID | INT | STRING | '[QualifiedName]' | SINGLE_QUOTED_STRING; // Lexer ASSIGN : '::=' | '=' ; diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp index e16ea718..1291cb77 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.interp @@ -3,9 +3,6 @@ null '*' '+' '?' -'true' -'false' -'this' '[QualifiedName]' null '+=' @@ -38,9 +35,6 @@ null null null null -null -null -null ASSIGN ADD_ASSIGN BOOL_ASSIGN @@ -87,4 +81,4 @@ value_literal atn: -[4, 1, 31, 154, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0, 5, 0, 36, 8, 0, 10, 0, 12, 0, 39, 9, 0, 1, 0, 4, 0, 42, 8, 0, 11, 0, 12, 0, 43, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 50, 8, 1, 1, 1, 1, 1, 3, 1, 54, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 59, 8, 1, 1, 1, 4, 1, 62, 8, 1, 11, 1, 12, 1, 63, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 75, 8, 3, 10, 3, 12, 3, 78, 9, 3, 1, 4, 5, 4, 81, 8, 4, 10, 4, 12, 4, 84, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 94, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 99, 8, 6, 1, 6, 1, 6, 3, 6, 103, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 3, 9, 115, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 125, 8, 10, 1, 11, 1, 11, 3, 11, 129, 8, 11, 1, 12, 1, 12, 3, 12, 133, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 140, 8, 13, 1, 14, 1, 14, 1, 14, 5, 14, 145, 8, 14, 10, 14, 12, 14, 148, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 0, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 4, 1, 0, 8, 10, 1, 0, 8, 9, 1, 0, 1, 3, 2, 0, 4, 7, 24, 27, 162, 0, 37, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 65, 1, 0, 0, 0, 6, 71, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 93, 1, 0, 0, 0, 12, 95, 1, 0, 0, 0, 14, 104, 1, 0, 0, 0, 16, 110, 1, 0, 0, 0, 18, 114, 1, 0, 0, 0, 20, 120, 1, 0, 0, 0, 22, 126, 1, 0, 0, 0, 24, 130, 1, 0, 0, 0, 26, 139, 1, 0, 0, 0, 28, 141, 1, 0, 0, 0, 30, 149, 1, 0, 0, 0, 32, 151, 1, 0, 0, 0, 34, 36, 5, 31, 0, 0, 35, 34, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 41, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 42, 3, 2, 1, 0, 41, 40, 1, 0, 0, 0, 42, 43, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 43, 44, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 46, 5, 0, 0, 1, 46, 1, 1, 0, 0, 0, 47, 49, 5, 23, 0, 0, 48, 50, 3, 4, 2, 0, 49, 48, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 52, 5, 12, 0, 0, 52, 54, 5, 23, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 55, 1, 0, 0, 0, 55, 56, 5, 8, 0, 0, 56, 58, 3, 6, 3, 0, 57, 59, 5, 13, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 61, 1, 0, 0, 0, 60, 62, 5, 31, 0, 0, 61, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 3, 1, 0, 0, 0, 65, 66, 5, 15, 0, 0, 66, 67, 5, 24, 0, 0, 67, 68, 5, 12, 0, 0, 68, 69, 5, 24, 0, 0, 69, 70, 5, 16, 0, 0, 70, 5, 1, 0, 0, 0, 71, 76, 3, 8, 4, 0, 72, 73, 5, 11, 0, 0, 73, 75, 3, 8, 4, 0, 74, 72, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 7, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 81, 3, 10, 5, 0, 80, 79, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 94, 3, 12, 6, 0, 86, 94, 3, 14, 7, 0, 87, 94, 3, 16, 8, 0, 88, 94, 3, 18, 9, 0, 89, 94, 3, 20, 10, 0, 90, 94, 3, 22, 11, 0, 91, 94, 3, 24, 12, 0, 92, 94, 3, 32, 16, 0, 93, 85, 1, 0, 0, 0, 93, 86, 1, 0, 0, 0, 93, 87, 1, 0, 0, 0, 93, 88, 1, 0, 0, 0, 93, 89, 1, 0, 0, 0, 93, 90, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 93, 92, 1, 0, 0, 0, 94, 11, 1, 0, 0, 0, 95, 96, 3, 28, 14, 0, 96, 98, 7, 0, 0, 0, 97, 99, 5, 22, 0, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 102, 3, 26, 13, 0, 101, 103, 3, 30, 15, 0, 102, 101, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 13, 1, 0, 0, 0, 104, 105, 5, 19, 0, 0, 105, 106, 3, 28, 14, 0, 106, 107, 7, 1, 0, 0, 107, 108, 3, 32, 16, 0, 108, 109, 5, 20, 0, 0, 109, 15, 1, 0, 0, 0, 110, 111, 5, 19, 0, 0, 111, 112, 5, 20, 0, 0, 112, 17, 1, 0, 0, 0, 113, 115, 5, 22, 0, 0, 114, 113, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 5, 17, 0, 0, 117, 118, 5, 24, 0, 0, 118, 119, 5, 18, 0, 0, 119, 19, 1, 0, 0, 0, 120, 121, 5, 15, 0, 0, 121, 122, 3, 6, 3, 0, 122, 124, 5, 16, 0, 0, 123, 125, 3, 30, 15, 0, 124, 123, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 21, 1, 0, 0, 0, 126, 128, 5, 25, 0, 0, 127, 129, 3, 30, 15, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 23, 1, 0, 0, 0, 130, 132, 5, 23, 0, 0, 131, 133, 3, 30, 15, 0, 132, 131, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 25, 1, 0, 0, 0, 134, 140, 3, 18, 9, 0, 135, 140, 3, 20, 10, 0, 136, 140, 3, 22, 11, 0, 137, 140, 3, 24, 12, 0, 138, 140, 3, 32, 16, 0, 139, 134, 1, 0, 0, 0, 139, 135, 1, 0, 0, 0, 139, 136, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 138, 1, 0, 0, 0, 140, 27, 1, 0, 0, 0, 141, 146, 5, 24, 0, 0, 142, 143, 5, 21, 0, 0, 143, 145, 5, 24, 0, 0, 144, 142, 1, 0, 0, 0, 145, 148, 1, 0, 0, 0, 146, 144, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 29, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 149, 150, 7, 2, 0, 0, 150, 31, 1, 0, 0, 0, 151, 152, 7, 3, 0, 0, 152, 33, 1, 0, 0, 0, 17, 37, 43, 49, 53, 58, 63, 76, 82, 93, 98, 102, 114, 124, 128, 132, 139, 146] \ No newline at end of file +[4, 1, 28, 154, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 1, 0, 5, 0, 36, 8, 0, 10, 0, 12, 0, 39, 9, 0, 1, 0, 4, 0, 42, 8, 0, 11, 0, 12, 0, 43, 1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 50, 8, 1, 1, 1, 1, 1, 3, 1, 54, 8, 1, 1, 1, 1, 1, 1, 1, 3, 1, 59, 8, 1, 1, 1, 4, 1, 62, 8, 1, 11, 1, 12, 1, 63, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 5, 3, 75, 8, 3, 10, 3, 12, 3, 78, 9, 3, 1, 4, 5, 4, 81, 8, 4, 10, 4, 12, 4, 84, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 94, 8, 5, 1, 6, 1, 6, 1, 6, 3, 6, 99, 8, 6, 1, 6, 1, 6, 3, 6, 103, 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 9, 3, 9, 115, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 125, 8, 10, 1, 11, 1, 11, 3, 11, 129, 8, 11, 1, 12, 1, 12, 3, 12, 133, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 140, 8, 13, 1, 14, 1, 14, 1, 14, 5, 14, 145, 8, 14, 10, 14, 12, 14, 148, 9, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 0, 0, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 4, 1, 0, 5, 7, 1, 0, 5, 6, 1, 0, 1, 3, 2, 0, 4, 4, 21, 24, 162, 0, 37, 1, 0, 0, 0, 2, 47, 1, 0, 0, 0, 4, 65, 1, 0, 0, 0, 6, 71, 1, 0, 0, 0, 8, 82, 1, 0, 0, 0, 10, 93, 1, 0, 0, 0, 12, 95, 1, 0, 0, 0, 14, 104, 1, 0, 0, 0, 16, 110, 1, 0, 0, 0, 18, 114, 1, 0, 0, 0, 20, 120, 1, 0, 0, 0, 22, 126, 1, 0, 0, 0, 24, 130, 1, 0, 0, 0, 26, 139, 1, 0, 0, 0, 28, 141, 1, 0, 0, 0, 30, 149, 1, 0, 0, 0, 32, 151, 1, 0, 0, 0, 34, 36, 5, 28, 0, 0, 35, 34, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 41, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 42, 3, 2, 1, 0, 41, 40, 1, 0, 0, 0, 42, 43, 1, 0, 0, 0, 43, 41, 1, 0, 0, 0, 43, 44, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 46, 5, 0, 0, 1, 46, 1, 1, 0, 0, 0, 47, 49, 5, 20, 0, 0, 48, 50, 3, 4, 2, 0, 49, 48, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 52, 5, 9, 0, 0, 52, 54, 5, 20, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 55, 1, 0, 0, 0, 55, 56, 5, 5, 0, 0, 56, 58, 3, 6, 3, 0, 57, 59, 5, 10, 0, 0, 58, 57, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 61, 1, 0, 0, 0, 60, 62, 5, 28, 0, 0, 61, 60, 1, 0, 0, 0, 62, 63, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 3, 1, 0, 0, 0, 65, 66, 5, 12, 0, 0, 66, 67, 5, 21, 0, 0, 67, 68, 5, 9, 0, 0, 68, 69, 5, 21, 0, 0, 69, 70, 5, 13, 0, 0, 70, 5, 1, 0, 0, 0, 71, 76, 3, 8, 4, 0, 72, 73, 5, 8, 0, 0, 73, 75, 3, 8, 4, 0, 74, 72, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 7, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 81, 3, 10, 5, 0, 80, 79, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 9, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 94, 3, 12, 6, 0, 86, 94, 3, 14, 7, 0, 87, 94, 3, 16, 8, 0, 88, 94, 3, 18, 9, 0, 89, 94, 3, 20, 10, 0, 90, 94, 3, 22, 11, 0, 91, 94, 3, 24, 12, 0, 92, 94, 3, 32, 16, 0, 93, 85, 1, 0, 0, 0, 93, 86, 1, 0, 0, 0, 93, 87, 1, 0, 0, 0, 93, 88, 1, 0, 0, 0, 93, 89, 1, 0, 0, 0, 93, 90, 1, 0, 0, 0, 93, 91, 1, 0, 0, 0, 93, 92, 1, 0, 0, 0, 94, 11, 1, 0, 0, 0, 95, 96, 3, 28, 14, 0, 96, 98, 7, 0, 0, 0, 97, 99, 5, 19, 0, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 102, 3, 26, 13, 0, 101, 103, 3, 30, 15, 0, 102, 101, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 13, 1, 0, 0, 0, 104, 105, 5, 16, 0, 0, 105, 106, 3, 28, 14, 0, 106, 107, 7, 1, 0, 0, 107, 108, 3, 32, 16, 0, 108, 109, 5, 17, 0, 0, 109, 15, 1, 0, 0, 0, 110, 111, 5, 16, 0, 0, 111, 112, 5, 17, 0, 0, 112, 17, 1, 0, 0, 0, 113, 115, 5, 19, 0, 0, 114, 113, 1, 0, 0, 0, 114, 115, 1, 0, 0, 0, 115, 116, 1, 0, 0, 0, 116, 117, 5, 14, 0, 0, 117, 118, 5, 21, 0, 0, 118, 119, 5, 15, 0, 0, 119, 19, 1, 0, 0, 0, 120, 121, 5, 12, 0, 0, 121, 122, 3, 6, 3, 0, 122, 124, 5, 13, 0, 0, 123, 125, 3, 30, 15, 0, 124, 123, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 21, 1, 0, 0, 0, 126, 128, 5, 22, 0, 0, 127, 129, 3, 30, 15, 0, 128, 127, 1, 0, 0, 0, 128, 129, 1, 0, 0, 0, 129, 23, 1, 0, 0, 0, 130, 132, 5, 20, 0, 0, 131, 133, 3, 30, 15, 0, 132, 131, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 25, 1, 0, 0, 0, 134, 140, 3, 18, 9, 0, 135, 140, 3, 20, 10, 0, 136, 140, 3, 22, 11, 0, 137, 140, 3, 24, 12, 0, 138, 140, 3, 32, 16, 0, 139, 134, 1, 0, 0, 0, 139, 135, 1, 0, 0, 0, 139, 136, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 139, 138, 1, 0, 0, 0, 140, 27, 1, 0, 0, 0, 141, 146, 5, 21, 0, 0, 142, 143, 5, 18, 0, 0, 143, 145, 5, 21, 0, 0, 144, 142, 1, 0, 0, 0, 145, 148, 1, 0, 0, 0, 146, 144, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 29, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 149, 150, 7, 2, 0, 0, 150, 31, 1, 0, 0, 0, 151, 152, 7, 3, 0, 0, 152, 33, 1, 0, 0, 0, 17, 37, 43, 49, 53, 58, 63, 76, 82, 93, 98, 102, 114, 124, 128, 132, 139, 146] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens index 07eb9f09..5c28d84e 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnf.tokens @@ -2,51 +2,45 @@ T__0=1 T__1=2 T__2=3 T__3=4 -T__4=5 -T__5=6 -T__6=7 -ASSIGN=8 -ADD_ASSIGN=9 -BOOL_ASSIGN=10 -PIPE=11 -COLON=12 -SEMICOLON=13 -COMMA=14 -LPAREN=15 -RPAREN=16 -LBRACK=17 -RBRACK=18 -LBRACE=19 -RBRACE=20 -DOT=21 -TILDE=22 -UPPER_ID=23 -ID=24 -SINGLE_QUOTED_STRING=25 -INT=26 -STRING=27 -COMMENT=28 -WS=29 -CONTINUATION=30 -NL=31 +ASSIGN=5 +ADD_ASSIGN=6 +BOOL_ASSIGN=7 +PIPE=8 +COLON=9 +SEMICOLON=10 +COMMA=11 +LPAREN=12 +RPAREN=13 +LBRACK=14 +RBRACK=15 +LBRACE=16 +RBRACE=17 +DOT=18 +TILDE=19 +UPPER_ID=20 +ID=21 +SINGLE_QUOTED_STRING=22 +INT=23 +STRING=24 +COMMENT=25 +WS=26 +CONTINUATION=27 +NL=28 '*'=1 '+'=2 '?'=3 -'true'=4 -'false'=5 -'this'=6 -'[QualifiedName]'=7 -'+='=9 -'?='=10 -'|'=11 -':'=12 -';'=13 -','=14 -'('=15 -')'=16 -'['=17 -']'=18 -'{'=19 -'}'=20 -'.'=21 -'~'=22 +'[QualifiedName]'=4 +'+='=6 +'?='=7 +'|'=8 +':'=9 +';'=10 +','=11 +'('=12 +')'=13 +'['=14 +']'=15 +'{'=16 +'}'=17 +'.'=18 +'~'=19 diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs index 42c8411d..bae07a49 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.cs @@ -34,11 +34,11 @@ public partial class kebnfLexer : Lexer { protected static DFA[] decisionToDFA; protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); public const int - T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, ASSIGN=8, ADD_ASSIGN=9, - BOOL_ASSIGN=10, PIPE=11, COLON=12, SEMICOLON=13, COMMA=14, LPAREN=15, - RPAREN=16, LBRACK=17, RBRACK=18, LBRACE=19, RBRACE=20, DOT=21, TILDE=22, - UPPER_ID=23, ID=24, SINGLE_QUOTED_STRING=25, INT=26, STRING=27, COMMENT=28, - WS=29, CONTINUATION=30, NL=31; + T__0=1, T__1=2, T__2=3, T__3=4, ASSIGN=5, ADD_ASSIGN=6, BOOL_ASSIGN=7, + PIPE=8, COLON=9, SEMICOLON=10, COMMA=11, LPAREN=12, RPAREN=13, LBRACK=14, + RBRACK=15, LBRACE=16, RBRACE=17, DOT=18, TILDE=19, UPPER_ID=20, ID=21, + SINGLE_QUOTED_STRING=22, INT=23, STRING=24, COMMENT=25, WS=26, CONTINUATION=27, + NL=28; public static string[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; @@ -48,11 +48,10 @@ public const int }; public static readonly string[] ruleNames = { - "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "ASSIGN", "ADD_ASSIGN", - "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", - "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", - "SINGLE_QUOTED_STRING", "INT", "STRING", "COMMENT", "WS", "CONTINUATION", - "NL" + "T__0", "T__1", "T__2", "T__3", "ASSIGN", "ADD_ASSIGN", "BOOL_ASSIGN", + "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", "LBRACK", "RBRACK", + "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", "SINGLE_QUOTED_STRING", + "INT", "STRING", "COMMENT", "WS", "CONTINUATION", "NL" }; @@ -66,16 +65,15 @@ public kebnfLexer(ICharStream input, TextWriter output, TextWriter errorOutput) } private static readonly string[] _LiteralNames = { - null, "'*'", "'+'", "'?'", "'true'", "'false'", "'this'", "'[QualifiedName]'", - null, "'+='", "'?='", "'|'", "':'", "';'", "','", "'('", "')'", "'['", - "']'", "'{'", "'}'", "'.'", "'~'" + null, "'*'", "'+'", "'?'", "'[QualifiedName]'", null, "'+='", "'?='", + "'|'", "':'", "';'", "','", "'('", "')'", "'['", "']'", "'{'", "'}'", + "'.'", "'~'" }; private static readonly string[] _SymbolicNames = { - null, null, null, null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", - "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", - "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", - "SINGLE_QUOTED_STRING", "INT", "STRING", "COMMENT", "WS", "CONTINUATION", - "NL" + null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", "BOOL_ASSIGN", "PIPE", + "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", "LBRACK", "RBRACK", + "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", "SINGLE_QUOTED_STRING", + "INT", "STRING", "COMMENT", "WS", "CONTINUATION", "NL" }; public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); @@ -105,76 +103,69 @@ static kebnfLexer() { } } private static int[] _serializedATN = { - 4,0,31,212,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 4,0,28,190,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14, 7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21, - 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28, - 7,28,2,29,7,29,2,30,7,30,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1, - 4,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6, - 1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,3,7,106,8,7,1,8,1, - 8,1,8,1,9,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1, - 15,1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21,1, - 22,1,22,5,22,140,8,22,10,22,12,22,143,9,22,1,23,1,23,5,23,147,8,23,10, - 23,12,23,150,9,23,1,24,1,24,1,24,1,24,5,24,156,8,24,10,24,12,24,159,9, - 24,1,24,1,24,1,25,4,25,164,8,25,11,25,12,25,165,1,26,1,26,1,26,1,26,5, - 26,172,8,26,10,26,12,26,175,9,26,1,26,1,26,1,27,1,27,1,27,1,27,5,27,183, - 8,27,10,27,12,27,186,9,27,1,27,1,27,1,28,4,28,191,8,28,11,28,12,28,192, - 1,28,1,28,1,29,3,29,198,8,29,1,29,1,29,4,29,202,8,29,11,29,12,29,203,1, - 29,1,29,1,30,3,30,209,8,30,1,30,1,30,0,0,31,1,1,3,2,5,3,7,4,9,5,11,6,13, - 7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19, - 39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31, - 1,0,7,1,0,65,90,4,0,48,57,65,90,95,95,97,122,3,0,65,90,95,95,97,122,2, - 0,39,39,92,92,1,0,48,57,2,0,10,10,13,13,2,0,9,9,32,32,224,0,1,1,0,0,0, - 0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0, - 0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0, - 25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1, - 0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0, - 0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57, - 1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,1,63,1,0,0,0,3,65,1,0,0,0,5,67,1,0,0, - 0,7,69,1,0,0,0,9,74,1,0,0,0,11,80,1,0,0,0,13,85,1,0,0,0,15,105,1,0,0,0, - 17,107,1,0,0,0,19,110,1,0,0,0,21,113,1,0,0,0,23,115,1,0,0,0,25,117,1,0, - 0,0,27,119,1,0,0,0,29,121,1,0,0,0,31,123,1,0,0,0,33,125,1,0,0,0,35,127, - 1,0,0,0,37,129,1,0,0,0,39,131,1,0,0,0,41,133,1,0,0,0,43,135,1,0,0,0,45, - 137,1,0,0,0,47,144,1,0,0,0,49,151,1,0,0,0,51,163,1,0,0,0,53,167,1,0,0, - 0,55,178,1,0,0,0,57,190,1,0,0,0,59,197,1,0,0,0,61,208,1,0,0,0,63,64,5, - 42,0,0,64,2,1,0,0,0,65,66,5,43,0,0,66,4,1,0,0,0,67,68,5,63,0,0,68,6,1, - 0,0,0,69,70,5,116,0,0,70,71,5,114,0,0,71,72,5,117,0,0,72,73,5,101,0,0, - 73,8,1,0,0,0,74,75,5,102,0,0,75,76,5,97,0,0,76,77,5,108,0,0,77,78,5,115, - 0,0,78,79,5,101,0,0,79,10,1,0,0,0,80,81,5,116,0,0,81,82,5,104,0,0,82,83, - 5,105,0,0,83,84,5,115,0,0,84,12,1,0,0,0,85,86,5,91,0,0,86,87,5,81,0,0, - 87,88,5,117,0,0,88,89,5,97,0,0,89,90,5,108,0,0,90,91,5,105,0,0,91,92,5, - 102,0,0,92,93,5,105,0,0,93,94,5,101,0,0,94,95,5,100,0,0,95,96,5,78,0,0, - 96,97,5,97,0,0,97,98,5,109,0,0,98,99,5,101,0,0,99,100,5,93,0,0,100,14, - 1,0,0,0,101,102,5,58,0,0,102,103,5,58,0,0,103,106,5,61,0,0,104,106,5,61, - 0,0,105,101,1,0,0,0,105,104,1,0,0,0,106,16,1,0,0,0,107,108,5,43,0,0,108, - 109,5,61,0,0,109,18,1,0,0,0,110,111,5,63,0,0,111,112,5,61,0,0,112,20,1, - 0,0,0,113,114,5,124,0,0,114,22,1,0,0,0,115,116,5,58,0,0,116,24,1,0,0,0, - 117,118,5,59,0,0,118,26,1,0,0,0,119,120,5,44,0,0,120,28,1,0,0,0,121,122, - 5,40,0,0,122,30,1,0,0,0,123,124,5,41,0,0,124,32,1,0,0,0,125,126,5,91,0, - 0,126,34,1,0,0,0,127,128,5,93,0,0,128,36,1,0,0,0,129,130,5,123,0,0,130, - 38,1,0,0,0,131,132,5,125,0,0,132,40,1,0,0,0,133,134,5,46,0,0,134,42,1, - 0,0,0,135,136,5,126,0,0,136,44,1,0,0,0,137,141,7,0,0,0,138,140,7,1,0,0, - 139,138,1,0,0,0,140,143,1,0,0,0,141,139,1,0,0,0,141,142,1,0,0,0,142,46, - 1,0,0,0,143,141,1,0,0,0,144,148,7,2,0,0,145,147,7,1,0,0,146,145,1,0,0, - 0,147,150,1,0,0,0,148,146,1,0,0,0,148,149,1,0,0,0,149,48,1,0,0,0,150,148, - 1,0,0,0,151,157,5,39,0,0,152,156,8,3,0,0,153,154,5,92,0,0,154,156,9,0, - 0,0,155,152,1,0,0,0,155,153,1,0,0,0,156,159,1,0,0,0,157,155,1,0,0,0,157, - 158,1,0,0,0,158,160,1,0,0,0,159,157,1,0,0,0,160,161,5,39,0,0,161,50,1, - 0,0,0,162,164,7,4,0,0,163,162,1,0,0,0,164,165,1,0,0,0,165,163,1,0,0,0, - 165,166,1,0,0,0,166,52,1,0,0,0,167,173,5,39,0,0,168,172,8,3,0,0,169,170, - 5,92,0,0,170,172,9,0,0,0,171,168,1,0,0,0,171,169,1,0,0,0,172,175,1,0,0, - 0,173,171,1,0,0,0,173,174,1,0,0,0,174,176,1,0,0,0,175,173,1,0,0,0,176, - 177,5,39,0,0,177,54,1,0,0,0,178,179,5,47,0,0,179,180,5,47,0,0,180,184, - 1,0,0,0,181,183,8,5,0,0,182,181,1,0,0,0,183,186,1,0,0,0,184,182,1,0,0, - 0,184,185,1,0,0,0,185,187,1,0,0,0,186,184,1,0,0,0,187,188,6,27,0,0,188, - 56,1,0,0,0,189,191,7,6,0,0,190,189,1,0,0,0,191,192,1,0,0,0,192,190,1,0, - 0,0,192,193,1,0,0,0,193,194,1,0,0,0,194,195,6,28,0,0,195,58,1,0,0,0,196, - 198,5,13,0,0,197,196,1,0,0,0,197,198,1,0,0,0,198,199,1,0,0,0,199,201,5, - 10,0,0,200,202,7,6,0,0,201,200,1,0,0,0,202,203,1,0,0,0,203,201,1,0,0,0, - 203,204,1,0,0,0,204,205,1,0,0,0,205,206,6,29,0,0,206,60,1,0,0,0,207,209, - 5,13,0,0,208,207,1,0,0,0,208,209,1,0,0,0,209,210,1,0,0,0,210,211,5,10, - 0,0,211,62,1,0,0,0,14,0,105,141,148,155,157,165,171,173,184,192,197,203, - 208,1,6,0,0 + 7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,1,0,1, + 0,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3, + 1,3,1,3,1,3,1,4,1,4,1,4,1,4,3,4,84,8,4,1,5,1,5,1,5,1,6,1,6,1,6,1,7,1,7, + 1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15, + 1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,5,19,118,8,19,10,19,12,19, + 121,9,19,1,20,1,20,5,20,125,8,20,10,20,12,20,128,9,20,1,21,1,21,1,21,1, + 21,5,21,134,8,21,10,21,12,21,137,9,21,1,21,1,21,1,22,4,22,142,8,22,11, + 22,12,22,143,1,23,1,23,1,23,1,23,5,23,150,8,23,10,23,12,23,153,9,23,1, + 23,1,23,1,24,1,24,1,24,1,24,5,24,161,8,24,10,24,12,24,164,9,24,1,24,1, + 24,1,25,4,25,169,8,25,11,25,12,25,170,1,25,1,25,1,26,3,26,176,8,26,1,26, + 1,26,4,26,180,8,26,11,26,12,26,181,1,26,1,26,1,27,3,27,187,8,27,1,27,1, + 27,0,0,28,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25, + 13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49, + 25,51,26,53,27,55,28,1,0,7,1,0,65,90,4,0,48,57,65,90,95,95,97,122,3,0, + 65,90,95,95,97,122,2,0,39,39,92,92,1,0,48,57,2,0,10,10,13,13,2,0,9,9,32, + 32,202,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11, + 1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0, + 0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33, + 1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0, + 0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55, + 1,0,0,0,1,57,1,0,0,0,3,59,1,0,0,0,5,61,1,0,0,0,7,63,1,0,0,0,9,83,1,0,0, + 0,11,85,1,0,0,0,13,88,1,0,0,0,15,91,1,0,0,0,17,93,1,0,0,0,19,95,1,0,0, + 0,21,97,1,0,0,0,23,99,1,0,0,0,25,101,1,0,0,0,27,103,1,0,0,0,29,105,1,0, + 0,0,31,107,1,0,0,0,33,109,1,0,0,0,35,111,1,0,0,0,37,113,1,0,0,0,39,115, + 1,0,0,0,41,122,1,0,0,0,43,129,1,0,0,0,45,141,1,0,0,0,47,145,1,0,0,0,49, + 156,1,0,0,0,51,168,1,0,0,0,53,175,1,0,0,0,55,186,1,0,0,0,57,58,5,42,0, + 0,58,2,1,0,0,0,59,60,5,43,0,0,60,4,1,0,0,0,61,62,5,63,0,0,62,6,1,0,0,0, + 63,64,5,91,0,0,64,65,5,81,0,0,65,66,5,117,0,0,66,67,5,97,0,0,67,68,5,108, + 0,0,68,69,5,105,0,0,69,70,5,102,0,0,70,71,5,105,0,0,71,72,5,101,0,0,72, + 73,5,100,0,0,73,74,5,78,0,0,74,75,5,97,0,0,75,76,5,109,0,0,76,77,5,101, + 0,0,77,78,5,93,0,0,78,8,1,0,0,0,79,80,5,58,0,0,80,81,5,58,0,0,81,84,5, + 61,0,0,82,84,5,61,0,0,83,79,1,0,0,0,83,82,1,0,0,0,84,10,1,0,0,0,85,86, + 5,43,0,0,86,87,5,61,0,0,87,12,1,0,0,0,88,89,5,63,0,0,89,90,5,61,0,0,90, + 14,1,0,0,0,91,92,5,124,0,0,92,16,1,0,0,0,93,94,5,58,0,0,94,18,1,0,0,0, + 95,96,5,59,0,0,96,20,1,0,0,0,97,98,5,44,0,0,98,22,1,0,0,0,99,100,5,40, + 0,0,100,24,1,0,0,0,101,102,5,41,0,0,102,26,1,0,0,0,103,104,5,91,0,0,104, + 28,1,0,0,0,105,106,5,93,0,0,106,30,1,0,0,0,107,108,5,123,0,0,108,32,1, + 0,0,0,109,110,5,125,0,0,110,34,1,0,0,0,111,112,5,46,0,0,112,36,1,0,0,0, + 113,114,5,126,0,0,114,38,1,0,0,0,115,119,7,0,0,0,116,118,7,1,0,0,117,116, + 1,0,0,0,118,121,1,0,0,0,119,117,1,0,0,0,119,120,1,0,0,0,120,40,1,0,0,0, + 121,119,1,0,0,0,122,126,7,2,0,0,123,125,7,1,0,0,124,123,1,0,0,0,125,128, + 1,0,0,0,126,124,1,0,0,0,126,127,1,0,0,0,127,42,1,0,0,0,128,126,1,0,0,0, + 129,135,5,39,0,0,130,134,8,3,0,0,131,132,5,92,0,0,132,134,9,0,0,0,133, + 130,1,0,0,0,133,131,1,0,0,0,134,137,1,0,0,0,135,133,1,0,0,0,135,136,1, + 0,0,0,136,138,1,0,0,0,137,135,1,0,0,0,138,139,5,39,0,0,139,44,1,0,0,0, + 140,142,7,4,0,0,141,140,1,0,0,0,142,143,1,0,0,0,143,141,1,0,0,0,143,144, + 1,0,0,0,144,46,1,0,0,0,145,151,5,39,0,0,146,150,8,3,0,0,147,148,5,92,0, + 0,148,150,9,0,0,0,149,146,1,0,0,0,149,147,1,0,0,0,150,153,1,0,0,0,151, + 149,1,0,0,0,151,152,1,0,0,0,152,154,1,0,0,0,153,151,1,0,0,0,154,155,5, + 39,0,0,155,48,1,0,0,0,156,157,5,47,0,0,157,158,5,47,0,0,158,162,1,0,0, + 0,159,161,8,5,0,0,160,159,1,0,0,0,161,164,1,0,0,0,162,160,1,0,0,0,162, + 163,1,0,0,0,163,165,1,0,0,0,164,162,1,0,0,0,165,166,6,24,0,0,166,50,1, + 0,0,0,167,169,7,6,0,0,168,167,1,0,0,0,169,170,1,0,0,0,170,168,1,0,0,0, + 170,171,1,0,0,0,171,172,1,0,0,0,172,173,6,25,0,0,173,52,1,0,0,0,174,176, + 5,13,0,0,175,174,1,0,0,0,175,176,1,0,0,0,176,177,1,0,0,0,177,179,5,10, + 0,0,178,180,7,6,0,0,179,178,1,0,0,0,180,181,1,0,0,0,181,179,1,0,0,0,181, + 182,1,0,0,0,182,183,1,0,0,0,183,184,6,26,0,0,184,54,1,0,0,0,185,187,5, + 13,0,0,186,185,1,0,0,0,186,187,1,0,0,0,187,188,1,0,0,0,188,189,5,10,0, + 0,189,56,1,0,0,0,14,0,83,119,126,133,135,143,149,151,162,170,175,181,186, + 1,6,0,0 }; public static readonly ATN _ATN = diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp index 72caecf6..753b3d36 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.interp @@ -3,9 +3,6 @@ null '*' '+' '?' -'true' -'false' -'this' '[QualifiedName]' null '+=' @@ -38,9 +35,6 @@ null null null null -null -null -null ASSIGN ADD_ASSIGN BOOL_ASSIGN @@ -71,9 +65,6 @@ T__0 T__1 T__2 T__3 -T__4 -T__5 -T__6 ASSIGN ADD_ASSIGN BOOL_ASSIGN @@ -107,4 +98,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 31, 212, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 106, 8, 7, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 5, 22, 140, 8, 22, 10, 22, 12, 22, 143, 9, 22, 1, 23, 1, 23, 5, 23, 147, 8, 23, 10, 23, 12, 23, 150, 9, 23, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 156, 8, 24, 10, 24, 12, 24, 159, 9, 24, 1, 24, 1, 24, 1, 25, 4, 25, 164, 8, 25, 11, 25, 12, 25, 165, 1, 26, 1, 26, 1, 26, 1, 26, 5, 26, 172, 8, 26, 10, 26, 12, 26, 175, 9, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 5, 27, 183, 8, 27, 10, 27, 12, 27, 186, 9, 27, 1, 27, 1, 27, 1, 28, 4, 28, 191, 8, 28, 11, 28, 12, 28, 192, 1, 28, 1, 28, 1, 29, 3, 29, 198, 8, 29, 1, 29, 1, 29, 4, 29, 202, 8, 29, 11, 29, 12, 29, 203, 1, 29, 1, 29, 1, 30, 3, 30, 209, 8, 30, 1, 30, 1, 30, 0, 0, 31, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 1, 0, 7, 1, 0, 65, 90, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 2, 0, 39, 39, 92, 92, 1, 0, 48, 57, 2, 0, 10, 10, 13, 13, 2, 0, 9, 9, 32, 32, 224, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 1, 63, 1, 0, 0, 0, 3, 65, 1, 0, 0, 0, 5, 67, 1, 0, 0, 0, 7, 69, 1, 0, 0, 0, 9, 74, 1, 0, 0, 0, 11, 80, 1, 0, 0, 0, 13, 85, 1, 0, 0, 0, 15, 105, 1, 0, 0, 0, 17, 107, 1, 0, 0, 0, 19, 110, 1, 0, 0, 0, 21, 113, 1, 0, 0, 0, 23, 115, 1, 0, 0, 0, 25, 117, 1, 0, 0, 0, 27, 119, 1, 0, 0, 0, 29, 121, 1, 0, 0, 0, 31, 123, 1, 0, 0, 0, 33, 125, 1, 0, 0, 0, 35, 127, 1, 0, 0, 0, 37, 129, 1, 0, 0, 0, 39, 131, 1, 0, 0, 0, 41, 133, 1, 0, 0, 0, 43, 135, 1, 0, 0, 0, 45, 137, 1, 0, 0, 0, 47, 144, 1, 0, 0, 0, 49, 151, 1, 0, 0, 0, 51, 163, 1, 0, 0, 0, 53, 167, 1, 0, 0, 0, 55, 178, 1, 0, 0, 0, 57, 190, 1, 0, 0, 0, 59, 197, 1, 0, 0, 0, 61, 208, 1, 0, 0, 0, 63, 64, 5, 42, 0, 0, 64, 2, 1, 0, 0, 0, 65, 66, 5, 43, 0, 0, 66, 4, 1, 0, 0, 0, 67, 68, 5, 63, 0, 0, 68, 6, 1, 0, 0, 0, 69, 70, 5, 116, 0, 0, 70, 71, 5, 114, 0, 0, 71, 72, 5, 117, 0, 0, 72, 73, 5, 101, 0, 0, 73, 8, 1, 0, 0, 0, 74, 75, 5, 102, 0, 0, 75, 76, 5, 97, 0, 0, 76, 77, 5, 108, 0, 0, 77, 78, 5, 115, 0, 0, 78, 79, 5, 101, 0, 0, 79, 10, 1, 0, 0, 0, 80, 81, 5, 116, 0, 0, 81, 82, 5, 104, 0, 0, 82, 83, 5, 105, 0, 0, 83, 84, 5, 115, 0, 0, 84, 12, 1, 0, 0, 0, 85, 86, 5, 91, 0, 0, 86, 87, 5, 81, 0, 0, 87, 88, 5, 117, 0, 0, 88, 89, 5, 97, 0, 0, 89, 90, 5, 108, 0, 0, 90, 91, 5, 105, 0, 0, 91, 92, 5, 102, 0, 0, 92, 93, 5, 105, 0, 0, 93, 94, 5, 101, 0, 0, 94, 95, 5, 100, 0, 0, 95, 96, 5, 78, 0, 0, 96, 97, 5, 97, 0, 0, 97, 98, 5, 109, 0, 0, 98, 99, 5, 101, 0, 0, 99, 100, 5, 93, 0, 0, 100, 14, 1, 0, 0, 0, 101, 102, 5, 58, 0, 0, 102, 103, 5, 58, 0, 0, 103, 106, 5, 61, 0, 0, 104, 106, 5, 61, 0, 0, 105, 101, 1, 0, 0, 0, 105, 104, 1, 0, 0, 0, 106, 16, 1, 0, 0, 0, 107, 108, 5, 43, 0, 0, 108, 109, 5, 61, 0, 0, 109, 18, 1, 0, 0, 0, 110, 111, 5, 63, 0, 0, 111, 112, 5, 61, 0, 0, 112, 20, 1, 0, 0, 0, 113, 114, 5, 124, 0, 0, 114, 22, 1, 0, 0, 0, 115, 116, 5, 58, 0, 0, 116, 24, 1, 0, 0, 0, 117, 118, 5, 59, 0, 0, 118, 26, 1, 0, 0, 0, 119, 120, 5, 44, 0, 0, 120, 28, 1, 0, 0, 0, 121, 122, 5, 40, 0, 0, 122, 30, 1, 0, 0, 0, 123, 124, 5, 41, 0, 0, 124, 32, 1, 0, 0, 0, 125, 126, 5, 91, 0, 0, 126, 34, 1, 0, 0, 0, 127, 128, 5, 93, 0, 0, 128, 36, 1, 0, 0, 0, 129, 130, 5, 123, 0, 0, 130, 38, 1, 0, 0, 0, 131, 132, 5, 125, 0, 0, 132, 40, 1, 0, 0, 0, 133, 134, 5, 46, 0, 0, 134, 42, 1, 0, 0, 0, 135, 136, 5, 126, 0, 0, 136, 44, 1, 0, 0, 0, 137, 141, 7, 0, 0, 0, 138, 140, 7, 1, 0, 0, 139, 138, 1, 0, 0, 0, 140, 143, 1, 0, 0, 0, 141, 139, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 46, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 144, 148, 7, 2, 0, 0, 145, 147, 7, 1, 0, 0, 146, 145, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 48, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 157, 5, 39, 0, 0, 152, 156, 8, 3, 0, 0, 153, 154, 5, 92, 0, 0, 154, 156, 9, 0, 0, 0, 155, 152, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 160, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 160, 161, 5, 39, 0, 0, 161, 50, 1, 0, 0, 0, 162, 164, 7, 4, 0, 0, 163, 162, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 163, 1, 0, 0, 0, 165, 166, 1, 0, 0, 0, 166, 52, 1, 0, 0, 0, 167, 173, 5, 39, 0, 0, 168, 172, 8, 3, 0, 0, 169, 170, 5, 92, 0, 0, 170, 172, 9, 0, 0, 0, 171, 168, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 172, 175, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 176, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 176, 177, 5, 39, 0, 0, 177, 54, 1, 0, 0, 0, 178, 179, 5, 47, 0, 0, 179, 180, 5, 47, 0, 0, 180, 184, 1, 0, 0, 0, 181, 183, 8, 5, 0, 0, 182, 181, 1, 0, 0, 0, 183, 186, 1, 0, 0, 0, 184, 182, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 185, 187, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, 187, 188, 6, 27, 0, 0, 188, 56, 1, 0, 0, 0, 189, 191, 7, 6, 0, 0, 190, 189, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 190, 1, 0, 0, 0, 192, 193, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 195, 6, 28, 0, 0, 195, 58, 1, 0, 0, 0, 196, 198, 5, 13, 0, 0, 197, 196, 1, 0, 0, 0, 197, 198, 1, 0, 0, 0, 198, 199, 1, 0, 0, 0, 199, 201, 5, 10, 0, 0, 200, 202, 7, 6, 0, 0, 201, 200, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 201, 1, 0, 0, 0, 203, 204, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 206, 6, 29, 0, 0, 206, 60, 1, 0, 0, 0, 207, 209, 5, 13, 0, 0, 208, 207, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 211, 5, 10, 0, 0, 211, 62, 1, 0, 0, 0, 14, 0, 105, 141, 148, 155, 157, 165, 171, 173, 184, 192, 197, 203, 208, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 28, 190, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 84, 8, 4, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 5, 19, 118, 8, 19, 10, 19, 12, 19, 121, 9, 19, 1, 20, 1, 20, 5, 20, 125, 8, 20, 10, 20, 12, 20, 128, 9, 20, 1, 21, 1, 21, 1, 21, 1, 21, 5, 21, 134, 8, 21, 10, 21, 12, 21, 137, 9, 21, 1, 21, 1, 21, 1, 22, 4, 22, 142, 8, 22, 11, 22, 12, 22, 143, 1, 23, 1, 23, 1, 23, 1, 23, 5, 23, 150, 8, 23, 10, 23, 12, 23, 153, 9, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 5, 24, 161, 8, 24, 10, 24, 12, 24, 164, 9, 24, 1, 24, 1, 24, 1, 25, 4, 25, 169, 8, 25, 11, 25, 12, 25, 170, 1, 25, 1, 25, 1, 26, 3, 26, 176, 8, 26, 1, 26, 1, 26, 4, 26, 180, 8, 26, 11, 26, 12, 26, 181, 1, 26, 1, 26, 1, 27, 3, 27, 187, 8, 27, 1, 27, 1, 27, 0, 0, 28, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 1, 0, 7, 1, 0, 65, 90, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 65, 90, 95, 95, 97, 122, 2, 0, 39, 39, 92, 92, 1, 0, 48, 57, 2, 0, 10, 10, 13, 13, 2, 0, 9, 9, 32, 32, 202, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 1, 57, 1, 0, 0, 0, 3, 59, 1, 0, 0, 0, 5, 61, 1, 0, 0, 0, 7, 63, 1, 0, 0, 0, 9, 83, 1, 0, 0, 0, 11, 85, 1, 0, 0, 0, 13, 88, 1, 0, 0, 0, 15, 91, 1, 0, 0, 0, 17, 93, 1, 0, 0, 0, 19, 95, 1, 0, 0, 0, 21, 97, 1, 0, 0, 0, 23, 99, 1, 0, 0, 0, 25, 101, 1, 0, 0, 0, 27, 103, 1, 0, 0, 0, 29, 105, 1, 0, 0, 0, 31, 107, 1, 0, 0, 0, 33, 109, 1, 0, 0, 0, 35, 111, 1, 0, 0, 0, 37, 113, 1, 0, 0, 0, 39, 115, 1, 0, 0, 0, 41, 122, 1, 0, 0, 0, 43, 129, 1, 0, 0, 0, 45, 141, 1, 0, 0, 0, 47, 145, 1, 0, 0, 0, 49, 156, 1, 0, 0, 0, 51, 168, 1, 0, 0, 0, 53, 175, 1, 0, 0, 0, 55, 186, 1, 0, 0, 0, 57, 58, 5, 42, 0, 0, 58, 2, 1, 0, 0, 0, 59, 60, 5, 43, 0, 0, 60, 4, 1, 0, 0, 0, 61, 62, 5, 63, 0, 0, 62, 6, 1, 0, 0, 0, 63, 64, 5, 91, 0, 0, 64, 65, 5, 81, 0, 0, 65, 66, 5, 117, 0, 0, 66, 67, 5, 97, 0, 0, 67, 68, 5, 108, 0, 0, 68, 69, 5, 105, 0, 0, 69, 70, 5, 102, 0, 0, 70, 71, 5, 105, 0, 0, 71, 72, 5, 101, 0, 0, 72, 73, 5, 100, 0, 0, 73, 74, 5, 78, 0, 0, 74, 75, 5, 97, 0, 0, 75, 76, 5, 109, 0, 0, 76, 77, 5, 101, 0, 0, 77, 78, 5, 93, 0, 0, 78, 8, 1, 0, 0, 0, 79, 80, 5, 58, 0, 0, 80, 81, 5, 58, 0, 0, 81, 84, 5, 61, 0, 0, 82, 84, 5, 61, 0, 0, 83, 79, 1, 0, 0, 0, 83, 82, 1, 0, 0, 0, 84, 10, 1, 0, 0, 0, 85, 86, 5, 43, 0, 0, 86, 87, 5, 61, 0, 0, 87, 12, 1, 0, 0, 0, 88, 89, 5, 63, 0, 0, 89, 90, 5, 61, 0, 0, 90, 14, 1, 0, 0, 0, 91, 92, 5, 124, 0, 0, 92, 16, 1, 0, 0, 0, 93, 94, 5, 58, 0, 0, 94, 18, 1, 0, 0, 0, 95, 96, 5, 59, 0, 0, 96, 20, 1, 0, 0, 0, 97, 98, 5, 44, 0, 0, 98, 22, 1, 0, 0, 0, 99, 100, 5, 40, 0, 0, 100, 24, 1, 0, 0, 0, 101, 102, 5, 41, 0, 0, 102, 26, 1, 0, 0, 0, 103, 104, 5, 91, 0, 0, 104, 28, 1, 0, 0, 0, 105, 106, 5, 93, 0, 0, 106, 30, 1, 0, 0, 0, 107, 108, 5, 123, 0, 0, 108, 32, 1, 0, 0, 0, 109, 110, 5, 125, 0, 0, 110, 34, 1, 0, 0, 0, 111, 112, 5, 46, 0, 0, 112, 36, 1, 0, 0, 0, 113, 114, 5, 126, 0, 0, 114, 38, 1, 0, 0, 0, 115, 119, 7, 0, 0, 0, 116, 118, 7, 1, 0, 0, 117, 116, 1, 0, 0, 0, 118, 121, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 40, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 122, 126, 7, 2, 0, 0, 123, 125, 7, 1, 0, 0, 124, 123, 1, 0, 0, 0, 125, 128, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 42, 1, 0, 0, 0, 128, 126, 1, 0, 0, 0, 129, 135, 5, 39, 0, 0, 130, 134, 8, 3, 0, 0, 131, 132, 5, 92, 0, 0, 132, 134, 9, 0, 0, 0, 133, 130, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 134, 137, 1, 0, 0, 0, 135, 133, 1, 0, 0, 0, 135, 136, 1, 0, 0, 0, 136, 138, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 138, 139, 5, 39, 0, 0, 139, 44, 1, 0, 0, 0, 140, 142, 7, 4, 0, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 46, 1, 0, 0, 0, 145, 151, 5, 39, 0, 0, 146, 150, 8, 3, 0, 0, 147, 148, 5, 92, 0, 0, 148, 150, 9, 0, 0, 0, 149, 146, 1, 0, 0, 0, 149, 147, 1, 0, 0, 0, 150, 153, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 154, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 154, 155, 5, 39, 0, 0, 155, 48, 1, 0, 0, 0, 156, 157, 5, 47, 0, 0, 157, 158, 5, 47, 0, 0, 158, 162, 1, 0, 0, 0, 159, 161, 8, 5, 0, 0, 160, 159, 1, 0, 0, 0, 161, 164, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 165, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 165, 166, 6, 24, 0, 0, 166, 50, 1, 0, 0, 0, 167, 169, 7, 6, 0, 0, 168, 167, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 173, 6, 25, 0, 0, 173, 52, 1, 0, 0, 0, 174, 176, 5, 13, 0, 0, 175, 174, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 177, 1, 0, 0, 0, 177, 179, 5, 10, 0, 0, 178, 180, 7, 6, 0, 0, 179, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 179, 1, 0, 0, 0, 181, 182, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 184, 6, 26, 0, 0, 184, 54, 1, 0, 0, 0, 185, 187, 5, 13, 0, 0, 186, 185, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 189, 5, 10, 0, 0, 189, 56, 1, 0, 0, 0, 14, 0, 83, 119, 126, 133, 135, 143, 149, 151, 162, 170, 175, 181, 186, 1, 6, 0, 0] \ No newline at end of file diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens index 07eb9f09..5c28d84e 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfLexer.tokens @@ -2,51 +2,45 @@ T__0=1 T__1=2 T__2=3 T__3=4 -T__4=5 -T__5=6 -T__6=7 -ASSIGN=8 -ADD_ASSIGN=9 -BOOL_ASSIGN=10 -PIPE=11 -COLON=12 -SEMICOLON=13 -COMMA=14 -LPAREN=15 -RPAREN=16 -LBRACK=17 -RBRACK=18 -LBRACE=19 -RBRACE=20 -DOT=21 -TILDE=22 -UPPER_ID=23 -ID=24 -SINGLE_QUOTED_STRING=25 -INT=26 -STRING=27 -COMMENT=28 -WS=29 -CONTINUATION=30 -NL=31 +ASSIGN=5 +ADD_ASSIGN=6 +BOOL_ASSIGN=7 +PIPE=8 +COLON=9 +SEMICOLON=10 +COMMA=11 +LPAREN=12 +RPAREN=13 +LBRACK=14 +RBRACK=15 +LBRACE=16 +RBRACE=17 +DOT=18 +TILDE=19 +UPPER_ID=20 +ID=21 +SINGLE_QUOTED_STRING=22 +INT=23 +STRING=24 +COMMENT=25 +WS=26 +CONTINUATION=27 +NL=28 '*'=1 '+'=2 '?'=3 -'true'=4 -'false'=5 -'this'=6 -'[QualifiedName]'=7 -'+='=9 -'?='=10 -'|'=11 -':'=12 -';'=13 -','=14 -'('=15 -')'=16 -'['=17 -']'=18 -'{'=19 -'}'=20 -'.'=21 -'~'=22 +'[QualifiedName]'=4 +'+='=6 +'?='=7 +'|'=8 +':'=9 +';'=10 +','=11 +'('=12 +')'=13 +'['=14 +']'=15 +'{'=16 +'}'=17 +'.'=18 +'~'=19 diff --git a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs index 8aa8cab1..7cfb9dad 100644 --- a/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs +++ b/SysML2.NET.CodeGenerator/Grammar/AutoGenGrammar/SysML2/NET/CodeGenerator/Grammar/kebnfParser.cs @@ -37,11 +37,11 @@ public partial class kebnfParser : Parser { protected static DFA[] decisionToDFA; protected static PredictionContextCache sharedContextCache = new PredictionContextCache(); public const int - T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, ASSIGN=8, ADD_ASSIGN=9, - BOOL_ASSIGN=10, PIPE=11, COLON=12, SEMICOLON=13, COMMA=14, LPAREN=15, - RPAREN=16, LBRACK=17, RBRACK=18, LBRACE=19, RBRACE=20, DOT=21, TILDE=22, - UPPER_ID=23, ID=24, SINGLE_QUOTED_STRING=25, INT=26, STRING=27, COMMENT=28, - WS=29, CONTINUATION=30, NL=31; + T__0=1, T__1=2, T__2=3, T__3=4, ASSIGN=5, ADD_ASSIGN=6, BOOL_ASSIGN=7, + PIPE=8, COLON=9, SEMICOLON=10, COMMA=11, LPAREN=12, RPAREN=13, LBRACK=14, + RBRACK=15, LBRACE=16, RBRACE=17, DOT=18, TILDE=19, UPPER_ID=20, ID=21, + SINGLE_QUOTED_STRING=22, INT=23, STRING=24, COMMENT=25, WS=26, CONTINUATION=27, + NL=28; public const int RULE_specification = 0, RULE_rule_definition = 1, RULE_parameter_list = 2, RULE_alternatives = 3, RULE_alternative = 4, RULE_element = 5, RULE_assignment = 6, @@ -56,16 +56,15 @@ public const int }; private static readonly string[] _LiteralNames = { - null, "'*'", "'+'", "'?'", "'true'", "'false'", "'this'", "'[QualifiedName]'", - null, "'+='", "'?='", "'|'", "':'", "';'", "','", "'('", "')'", "'['", - "']'", "'{'", "'}'", "'.'", "'~'" + null, "'*'", "'+'", "'?'", "'[QualifiedName]'", null, "'+='", "'?='", + "'|'", "':'", "';'", "','", "'('", "')'", "'['", "']'", "'{'", "'}'", + "'.'", "'~'" }; private static readonly string[] _SymbolicNames = { - null, null, null, null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", - "BOOL_ASSIGN", "PIPE", "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", - "LBRACK", "RBRACK", "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", - "SINGLE_QUOTED_STRING", "INT", "STRING", "COMMENT", "WS", "CONTINUATION", - "NL" + null, null, null, null, null, "ASSIGN", "ADD_ASSIGN", "BOOL_ASSIGN", "PIPE", + "COLON", "SEMICOLON", "COMMA", "LPAREN", "RPAREN", "LBRACK", "RBRACK", + "LBRACE", "RBRACE", "DOT", "TILDE", "UPPER_ID", "ID", "SINGLE_QUOTED_STRING", + "INT", "STRING", "COMMENT", "WS", "CONTINUATION", "NL" }; public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); @@ -480,7 +479,7 @@ public AlternativeContext alternative() { State = 82; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 264929520L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 33116176L) != 0)) { { { State = 79; @@ -684,7 +683,7 @@ public AssignmentContext assignment() { State = 96; _localctx.op = TokenStream.LT(1); _la = TokenStream.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 1792L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 224L) != 0)) ) { _localctx.op = ErrorHandler.RecoverInline(this); } else { @@ -1369,7 +1368,7 @@ public Value_literalContext value_literal() { { State = 151; _la = TokenStream.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 251658480L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 31457296L) != 0)) ) { ErrorHandler.RecoverInline(this); } else { @@ -1390,7 +1389,7 @@ public Value_literalContext value_literal() { } private static int[] _serializedATN = { - 4,1,31,154,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7, + 4,1,28,154,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7, 7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14, 2,15,7,15,2,16,7,16,1,0,5,0,36,8,0,10,0,12,0,39,9,0,1,0,4,0,42,8,0,11, 0,12,0,43,1,0,1,0,1,1,1,1,3,1,50,8,1,1,1,1,1,3,1,54,8,1,1,1,1,1,1,1,3, @@ -1401,40 +1400,40 @@ public Value_literalContext value_literal() { 9,1,9,1,10,1,10,1,10,1,10,3,10,125,8,10,1,11,1,11,3,11,129,8,11,1,12,1, 12,3,12,133,8,12,1,13,1,13,1,13,1,13,1,13,3,13,140,8,13,1,14,1,14,1,14, 5,14,145,8,14,10,14,12,14,148,9,14,1,15,1,15,1,16,1,16,1,16,0,0,17,0,2, - 4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,1,0,8,10,1,0,8,9,1,0,1,3, - 2,0,4,7,24,27,162,0,37,1,0,0,0,2,47,1,0,0,0,4,65,1,0,0,0,6,71,1,0,0,0, + 4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,0,4,1,0,5,7,1,0,5,6,1,0,1,3, + 2,0,4,4,21,24,162,0,37,1,0,0,0,2,47,1,0,0,0,4,65,1,0,0,0,6,71,1,0,0,0, 8,82,1,0,0,0,10,93,1,0,0,0,12,95,1,0,0,0,14,104,1,0,0,0,16,110,1,0,0,0, 18,114,1,0,0,0,20,120,1,0,0,0,22,126,1,0,0,0,24,130,1,0,0,0,26,139,1,0, - 0,0,28,141,1,0,0,0,30,149,1,0,0,0,32,151,1,0,0,0,34,36,5,31,0,0,35,34, + 0,0,28,141,1,0,0,0,30,149,1,0,0,0,32,151,1,0,0,0,34,36,5,28,0,0,35,34, 1,0,0,0,36,39,1,0,0,0,37,35,1,0,0,0,37,38,1,0,0,0,38,41,1,0,0,0,39,37, 1,0,0,0,40,42,3,2,1,0,41,40,1,0,0,0,42,43,1,0,0,0,43,41,1,0,0,0,43,44, - 1,0,0,0,44,45,1,0,0,0,45,46,5,0,0,1,46,1,1,0,0,0,47,49,5,23,0,0,48,50, - 3,4,2,0,49,48,1,0,0,0,49,50,1,0,0,0,50,53,1,0,0,0,51,52,5,12,0,0,52,54, - 5,23,0,0,53,51,1,0,0,0,53,54,1,0,0,0,54,55,1,0,0,0,55,56,5,8,0,0,56,58, - 3,6,3,0,57,59,5,13,0,0,58,57,1,0,0,0,58,59,1,0,0,0,59,61,1,0,0,0,60,62, - 5,31,0,0,61,60,1,0,0,0,62,63,1,0,0,0,63,61,1,0,0,0,63,64,1,0,0,0,64,3, - 1,0,0,0,65,66,5,15,0,0,66,67,5,24,0,0,67,68,5,12,0,0,68,69,5,24,0,0,69, - 70,5,16,0,0,70,5,1,0,0,0,71,76,3,8,4,0,72,73,5,11,0,0,73,75,3,8,4,0,74, + 1,0,0,0,44,45,1,0,0,0,45,46,5,0,0,1,46,1,1,0,0,0,47,49,5,20,0,0,48,50, + 3,4,2,0,49,48,1,0,0,0,49,50,1,0,0,0,50,53,1,0,0,0,51,52,5,9,0,0,52,54, + 5,20,0,0,53,51,1,0,0,0,53,54,1,0,0,0,54,55,1,0,0,0,55,56,5,5,0,0,56,58, + 3,6,3,0,57,59,5,10,0,0,58,57,1,0,0,0,58,59,1,0,0,0,59,61,1,0,0,0,60,62, + 5,28,0,0,61,60,1,0,0,0,62,63,1,0,0,0,63,61,1,0,0,0,63,64,1,0,0,0,64,3, + 1,0,0,0,65,66,5,12,0,0,66,67,5,21,0,0,67,68,5,9,0,0,68,69,5,21,0,0,69, + 70,5,13,0,0,70,5,1,0,0,0,71,76,3,8,4,0,72,73,5,8,0,0,73,75,3,8,4,0,74, 72,1,0,0,0,75,78,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,0,77,7,1,0,0,0,78,76, 1,0,0,0,79,81,3,10,5,0,80,79,1,0,0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83, 1,0,0,0,83,9,1,0,0,0,84,82,1,0,0,0,85,94,3,12,6,0,86,94,3,14,7,0,87,94, 3,16,8,0,88,94,3,18,9,0,89,94,3,20,10,0,90,94,3,22,11,0,91,94,3,24,12, 0,92,94,3,32,16,0,93,85,1,0,0,0,93,86,1,0,0,0,93,87,1,0,0,0,93,88,1,0, 0,0,93,89,1,0,0,0,93,90,1,0,0,0,93,91,1,0,0,0,93,92,1,0,0,0,94,11,1,0, - 0,0,95,96,3,28,14,0,96,98,7,0,0,0,97,99,5,22,0,0,98,97,1,0,0,0,98,99,1, + 0,0,95,96,3,28,14,0,96,98,7,0,0,0,97,99,5,19,0,0,98,97,1,0,0,0,98,99,1, 0,0,0,99,100,1,0,0,0,100,102,3,26,13,0,101,103,3,30,15,0,102,101,1,0,0, - 0,102,103,1,0,0,0,103,13,1,0,0,0,104,105,5,19,0,0,105,106,3,28,14,0,106, - 107,7,1,0,0,107,108,3,32,16,0,108,109,5,20,0,0,109,15,1,0,0,0,110,111, - 5,19,0,0,111,112,5,20,0,0,112,17,1,0,0,0,113,115,5,22,0,0,114,113,1,0, - 0,0,114,115,1,0,0,0,115,116,1,0,0,0,116,117,5,17,0,0,117,118,5,24,0,0, - 118,119,5,18,0,0,119,19,1,0,0,0,120,121,5,15,0,0,121,122,3,6,3,0,122,124, - 5,16,0,0,123,125,3,30,15,0,124,123,1,0,0,0,124,125,1,0,0,0,125,21,1,0, - 0,0,126,128,5,25,0,0,127,129,3,30,15,0,128,127,1,0,0,0,128,129,1,0,0,0, - 129,23,1,0,0,0,130,132,5,23,0,0,131,133,3,30,15,0,132,131,1,0,0,0,132, + 0,102,103,1,0,0,0,103,13,1,0,0,0,104,105,5,16,0,0,105,106,3,28,14,0,106, + 107,7,1,0,0,107,108,3,32,16,0,108,109,5,17,0,0,109,15,1,0,0,0,110,111, + 5,16,0,0,111,112,5,17,0,0,112,17,1,0,0,0,113,115,5,19,0,0,114,113,1,0, + 0,0,114,115,1,0,0,0,115,116,1,0,0,0,116,117,5,14,0,0,117,118,5,21,0,0, + 118,119,5,15,0,0,119,19,1,0,0,0,120,121,5,12,0,0,121,122,3,6,3,0,122,124, + 5,13,0,0,123,125,3,30,15,0,124,123,1,0,0,0,124,125,1,0,0,0,125,21,1,0, + 0,0,126,128,5,22,0,0,127,129,3,30,15,0,128,127,1,0,0,0,128,129,1,0,0,0, + 129,23,1,0,0,0,130,132,5,20,0,0,131,133,3,30,15,0,132,131,1,0,0,0,132, 133,1,0,0,0,133,25,1,0,0,0,134,140,3,18,9,0,135,140,3,20,10,0,136,140, 3,22,11,0,137,140,3,24,12,0,138,140,3,32,16,0,139,134,1,0,0,0,139,135, 1,0,0,0,139,136,1,0,0,0,139,137,1,0,0,0,139,138,1,0,0,0,140,27,1,0,0,0, - 141,146,5,24,0,0,142,143,5,21,0,0,143,145,5,24,0,0,144,142,1,0,0,0,145, + 141,146,5,21,0,0,142,143,5,18,0,0,143,145,5,21,0,0,144,142,1,0,0,0,145, 148,1,0,0,0,146,144,1,0,0,0,146,147,1,0,0,0,147,29,1,0,0,0,148,146,1,0, 0,0,149,150,7,2,0,0,150,31,1,0,0,0,151,152,7,3,0,0,152,33,1,0,0,0,17,37, 43,49,53,58,63,76,82,93,98,102,114,124,128,132,139,146 From 68c92f516b63822bbf5d136d815d0ce670e57c0f Mon Sep 17 00:00:00 2001 From: atheate Date: Wed, 25 Feb 2026 14:09:26 +0100 Subject: [PATCH 06/15] [WIP] All rules have method, some logic put on rule Element processing --- .../Extensions/NamedElementExtensions.cs | 33 + .../UmlCoreTextualNotationBuilderGenerator.cs | 41 +- .../Grammar/Model/Alternatives.cs | 18 +- .../Grammar/Model/AssignmentElement.cs | 2 +- .../Grammar/Model/GroupElement.cs | 4 +- .../Grammar/Model/TextualNotationRule.cs | 8 +- .../TextualNotationSpecificationVisitor.cs | 32 +- .../HandleBarHelpers/NamedElementHelper.cs | 10 + .../HandleBarHelpers/RulesHelper.cs | 146 +++- ...core-textual-notation-builder-template.hbs | 40 +- ...AcceptActionUsageTextualNotationBuilder.cs | 100 ++- .../ActionDefinitionTextualNotationBuilder.cs | 40 +- .../ActionUsageTextualNotationBuilder.cs | 147 +++- .../ActorMembershipTextualNotationBuilder.cs | 27 +- ...ocationDefinitionTextualNotationBuilder.cs | 35 +- .../AllocationUsageTextualNotationBuilder.cs | 43 +- ...sisCaseDefinitionTextualNotationBuilder.cs | 40 +- ...AnalysisCaseUsageTextualNotationBuilder.cs | 48 +- ...AnnotatingElementTextualNotationBuilder.cs | 47 +- .../AnnotationTextualNotationBuilder.cs | 44 +- ...rtConstraintUsageTextualNotationBuilder.cs | 41 +- ...gnmentActionUsageTextualNotationBuilder.cs | 53 +- ...ociationStructureTextualNotationBuilder.cs | 44 +- .../AssociationTextualNotationBuilder.cs | 40 +- ...tributeDefinitionTextualNotationBuilder.cs | 35 +- .../AttributeUsageTextualNotationBuilder.cs | 37 +- .../BehaviorTextualNotationBuilder.cs | 42 +- ...gConnectorAsUsageTextualNotationBuilder.cs | 43 +- .../BindingConnectorTextualNotationBuilder.cs | 47 +- ...BooleanExpressionTextualNotationBuilder.cs | 49 +- ...ulationDefinitionTextualNotationBuilder.cs | 40 +- .../CalculationUsageTextualNotationBuilder.cs | 40 +- .../CaseDefinitionTextualNotationBuilder.cs | 40 +- .../CaseUsageTextualNotationBuilder.cs | 46 +- .../ClassTextualNotationBuilder.cs | 42 +- .../ClassifierTextualNotationBuilder.cs | 83 +- ...CollectExpressionTextualNotationBuilder.cs | 27 +- .../CommentTextualNotationBuilder.cs | 44 +- ...ConcernDefinitionTextualNotationBuilder.cs | 40 +- .../ConcernUsageTextualNotationBuilder.cs | 47 +- ...tedPortDefinitionTextualNotationBuilder.cs | 26 +- ...jugatedPortTypingTextualNotationBuilder.cs | 41 +- .../ConjugationTextualNotationBuilder.cs | 52 +- ...nectionDefinitionTextualNotationBuilder.cs | 35 +- .../ConnectionUsageTextualNotationBuilder.cs | 68 +- .../ConnectorTextualNotationBuilder.cs | 78 +- ...straintDefinitionTextualNotationBuilder.cs | 40 +- .../ConstraintUsageTextualNotationBuilder.cs | 58 +- ...tructorExpressionTextualNotationBuilder.cs | 27 +- ...s => ControlNodeTextualNotationBuilder.cs} | 27 +- .../CrossSubsettingTextualNotationBuilder.cs | 25 +- .../DataTypeTextualNotationBuilder.cs | 42 +- .../DecisionNodeTextualNotationBuilder.cs | 41 +- .../DefinitionTextualNotationBuilder.cs | 76 +- .../DependencyTextualNotationBuilder.cs | 64 +- .../DifferencingTextualNotationBuilder.cs | 31 +- .../DisjoiningTextualNotationBuilder.cs | 43 +- .../DocumentationTextualNotationBuilder.cs | 37 +- ...tFilterMembershipTextualNotationBuilder.cs | 34 +- .../ElementTextualNotationBuilder.cs | 105 +++ ...FeatureMembershipTextualNotationBuilder.cs | 67 +- ...erationDefinitionTextualNotationBuilder.cs | 41 +- .../EnumerationUsageTextualNotationBuilder.cs | 43 +- ...ntOccurrenceUsageTextualNotationBuilder.cs | 43 +- ...ExhibitStateUsageTextualNotationBuilder.cs | 45 +- .../ExposeTextualNotationBuilder.cs | 56 ++ .../ExpressionTextualNotationBuilder.cs | 121 ++- ...reChainExpressionTextualNotationBuilder.cs | 27 +- .../FeatureChainingTextualNotationBuilder.cs | 25 +- ...tureDirectionKindTextualNotationBuilder.cs | 51 ++ .../FeatureInvertingTextualNotationBuilder.cs | 43 +- ...FeatureMembershipTextualNotationBuilder.cs | 397 +++++++++- ...ferenceExpressionTextualNotationBuilder.cs | 67 +- .../FeatureTextualNotationBuilder.cs | 658 +++++++++++++++- .../FeatureTypingTextualNotationBuilder.cs | 56 +- .../FeatureValueTextualNotationBuilder.cs | 155 +++- .../FlowDefinitionTextualNotationBuilder.cs | 35 +- .../FlowEndTextualNotationBuilder.cs | 29 +- .../FlowTextualNotationBuilder.cs | 44 +- .../FlowUsageTextualNotationBuilder.cs | 67 +- ...orLoopActionUsageTextualNotationBuilder.cs | 33 +- .../ForkNodeTextualNotationBuilder.cs | 43 +- ...ConcernMembershipTextualNotationBuilder.cs | 28 +- .../FunctionTextualNotationBuilder.cs | 40 +- .../IfActionUsageTextualNotationBuilder.cs | 33 +- .../ImportTextualNotationBuilder.cs | 73 ++ ...cludeUseCaseUsageTextualNotationBuilder.cs | 47 +- .../IndexExpressionTextualNotationBuilder.cs | 27 +- .../InteractionTextualNotationBuilder.cs | 42 +- ...terfaceDefinitionTextualNotationBuilder.cs | 40 +- .../InterfaceUsageTextualNotationBuilder.cs | 81 +- .../IntersectingTextualNotationBuilder.cs | 29 +- .../InvariantTextualNotationBuilder.cs | 56 +- ...ocationExpressionTextualNotationBuilder.cs | 42 +- .../ItemDefinitionTextualNotationBuilder.cs | 35 +- .../ItemUsageTextualNotationBuilder.cs | 37 +- .../JoinNodeTextualNotationBuilder.cs | 41 +- .../LibraryPackageTextualNotationBuilder.cs | 41 +- .../LiteralBooleanTextualNotationBuilder.cs | 26 +- ...LiteralExpressionTextualNotationBuilder.cs | 46 +- .../LiteralInfinityTextualNotationBuilder.cs | 29 +- .../LiteralIntegerTextualNotationBuilder.cs | 26 +- .../LiteralStringTextualNotationBuilder.cs | 26 +- .../MembershipExposeTextualNotationBuilder.cs | 30 +- .../MembershipImportTextualNotationBuilder.cs | 32 +- .../MembershipTextualNotationBuilder.cs | 105 ++- .../MergeNodeTextualNotationBuilder.cs | 41 +- .../MetaclassTextualNotationBuilder.cs | 40 +- ...aAccessExpressionTextualNotationBuilder.cs | 29 +- ...etadataDefinitionTextualNotationBuilder.cs | 38 +- .../MetadataFeatureTextualNotationBuilder.cs | 66 +- .../MetadataUsageTextualNotationBuilder.cs | 66 +- ...MultiplicityRangeTextualNotationBuilder.cs | 53 +- .../MultiplicityTextualNotationBuilder.cs | 48 +- .../NamespaceExposeTextualNotationBuilder.cs | 32 +- .../NamespaceImportTextualNotationBuilder.cs | 33 +- .../NamespaceTextualNotationBuilder.cs | 71 +- .../NullExpressionTextualNotationBuilder.cs | 30 +- ...jectiveMembershipTextualNotationBuilder.cs | 28 +- ...urrenceDefinitionTextualNotationBuilder.cs | 64 +- .../OccurrenceUsageTextualNotationBuilder.cs | 108 ++- ...peratorExpressionTextualNotationBuilder.cs | 166 +++- .../OwningMembershipTextualNotationBuilder.cs | 231 +++++- .../PackageTextualNotationBuilder.cs | 73 +- ...rameterMembershipTextualNotationBuilder.cs | 210 ++++- .../PartDefinitionTextualNotationBuilder.cs | 35 +- .../PartUsageTextualNotationBuilder.cs | 55 +- .../PayloadFeatureTextualNotationBuilder.cs | 40 +- ...erformActionUsageTextualNotationBuilder.cs | 71 +- .../PortConjugationTextualNotationBuilder.cs | 25 +- .../PortDefinitionTextualNotationBuilder.cs | 38 +- .../PortUsageTextualNotationBuilder.cs | 57 +- .../PortionKindTextualNotationBuilder.cs | 51 ++ .../PredicateTextualNotationBuilder.cs | 42 +- .../RedefinitionTextualNotationBuilder.cs | 76 +- ...ferenceSubsettingTextualNotationBuilder.cs | 26 +- .../ReferenceUsageTextualNotationBuilder.cs | 241 +++++- .../RelationshipTextualNotationBuilder.cs | 62 ++ ...nderingDefinitionTextualNotationBuilder.cs | 35 +- .../RenderingUsageTextualNotationBuilder.cs | 38 +- ...straintMembershipTextualNotationBuilder.cs | 32 +- ...irementDefinitionTextualNotationBuilder.cs | 40 +- .../RequirementUsageTextualNotationBuilder.cs | 60 +- ...icationMembershipTextualNotationBuilder.cs | 29 +- ...ressionMembershipTextualNotationBuilder.cs | 27 +- ...rameterMembershipTextualNotationBuilder.cs | 60 +- ...yRequirementUsageTextualNotationBuilder.cs | 52 +- .../SelectExpressionTextualNotationBuilder.cs | 27 +- .../SendActionUsageTextualNotationBuilder.cs | 85 ++- .../SpecializationTextualNotationBuilder.cs | 76 +- ...eholderMembershipTextualNotationBuilder.cs | 27 +- .../StateDefinitionTextualNotationBuilder.cs | 41 +- ...bactionMembershipTextualNotationBuilder.cs | 53 +- .../StateUsageTextualNotationBuilder.cs | 41 +- .../StepTextualNotationBuilder.cs | 53 +- .../StructureTextualNotationBuilder.cs | 42 +- ...SubclassificationTextualNotationBuilder.cs | 50 +- ...SubjectMembershipTextualNotationBuilder.cs | 30 +- .../SubsettingTextualNotationBuilder.cs | 54 +- ...SuccessionAsUsageTextualNotationBuilder.cs | 64 +- .../SuccessionFlowTextualNotationBuilder.cs | 44 +- ...ccessionFlowUsageTextualNotationBuilder.cs | 40 +- .../SuccessionTextualNotationBuilder.cs | 62 +- ...minateActionUsageTextualNotationBuilder.cs | 32 +- .../TextualNotationBuilderFacade.cs | 722 ------------------ ...ualRepresentationTextualNotationBuilder.cs | 35 +- ...FeatureMembershipTextualNotationBuilder.cs | 47 +- .../TransitionUsageTextualNotationBuilder.cs | 118 ++- ...ocationExpressionTextualNotationBuilder.cs | 25 +- .../TypeFeaturingTextualNotationBuilder.cs | 47 +- .../TypeTextualNotationBuilder.cs | 418 +++++++++- .../UnioningTextualNotationBuilder.cs | 29 +- .../UsageTextualNotationBuilder.cs | 276 ++++++- ...UseCaseDefinitionTextualNotationBuilder.cs | 40 +- .../UseCaseUsageTextualNotationBuilder.cs | 46 +- ...VariantMembershipTextualNotationBuilder.cs | 33 +- ...ionCaseDefinitionTextualNotationBuilder.cs | 40 +- ...ficationCaseUsageTextualNotationBuilder.cs | 46 +- .../ViewDefinitionTextualNotationBuilder.cs | 50 +- ...nderingMembershipTextualNotationBuilder.cs | 28 +- .../ViewUsageTextualNotationBuilder.cs | 55 +- ...ewpointDefinitionTextualNotationBuilder.cs | 40 +- .../ViewpointUsageTextualNotationBuilder.cs | 46 +- .../VisibilityKindTextualNotationBuilder.cs | 51 ++ ...leLoopActionUsageTextualNotationBuilder.cs | 33 +- ...jugatedPortTypingTextualNotationBuilder.cs | 41 + ...FeatureMembershipTextualNotationBuilder.cs | 41 + .../TextualNotation/TextualNotationBuilder.cs | 52 -- 188 files changed, 7226 insertions(+), 4466 deletions(-) rename SysML2.NET/TextualNotation/ITextualNotationBuilderFacade.cs => SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs (57%) rename SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/{LiteralRationalTextualNotationBuilder.cs => ControlNodeTextualNotationBuilder.cs} (56%) create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs delete mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualNotationBuilderFacade.cs create mode 100644 SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/ConjugatedPortTypingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/FeatureMembershipTextualNotationBuilder.cs delete mode 100644 SysML2.NET/TextualNotation/TextualNotationBuilder.cs diff --git a/SysML2.NET.CodeGenerator/Extensions/NamedElementExtensions.cs b/SysML2.NET.CodeGenerator/Extensions/NamedElementExtensions.cs index 402bc345..9bea96a6 100644 --- a/SysML2.NET.CodeGenerator/Extensions/NamedElementExtensions.cs +++ b/SysML2.NET.CodeGenerator/Extensions/NamedElementExtensions.cs @@ -20,9 +20,11 @@ namespace SysML2.NET.CodeGenerator.Extensions { + using System; using System.Linq; using uml4net.CommonStructure; + using uml4net.SimpleClassifiers; /// /// Extension class for @@ -40,5 +42,36 @@ public static string QueryNamespace(this INamedElement namedElement) var namespaces = qualifiedNameSpaces.Skip(1).Take(qualifiedNameSpaces.Length - 2); return string.Join('.', namespaces); } + + /// + /// Query the fully qualified type name (Namespace + Type name). + /// + /// The specific that should have the fully qualified type name computed + /// A specific namespace part (POCO/DTO distinction) + /// Asserts if the type should be the interface name or not + /// The fully qualified type name + public static string QueryFullyQualifiedTypeName(this INamedElement namedElement, string namespacePart = "POCO", bool targetInterface = true) + { + ArgumentNullException.ThrowIfNull(namedElement); + ArgumentException.ThrowIfNullOrWhiteSpace(namespacePart); + + var typeName = "SysML2.NET.Core."; + + if (namedElement is not IEnumeration) + { + typeName += $"{namespacePart}."; + } + + typeName += namedElement.QueryNamespace(); + typeName += "."; + + if (namedElement is not IEnumeration && targetInterface) + { + typeName += "I"; + } + + typeName += namedElement.Name; + return typeName; + } } } diff --git a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs index fd82343a..9b45ddb9 100644 --- a/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs +++ b/SysML2.NET.CodeGenerator/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGenerator.cs @@ -29,6 +29,7 @@ namespace SysML2.NET.CodeGenerator.Generators.UmlHandleBarsGenerators using SysML2.NET.CodeGenerator.Grammar.Model; using SysML2.NET.CodeGenerator.HandleBarHelpers; + using uml4net.CommonStructure; using uml4net.Extensions; using uml4net.HandleBars; using uml4net.StructuredClassifiers; @@ -104,11 +105,11 @@ public override Task GenerateAsync(XmiReaderResult xmiReaderResult, DirectoryInf public async Task GenerateAsync(XmiReaderResult xmiReaderResult, TextualNotationSpecification textualNotationSpecification, DirectoryInfo outputDirectory) { await this.GenerateBuilderClasses(xmiReaderResult, textualNotationSpecification, outputDirectory); - await this.GenerateBuilderFacade(xmiReaderResult, outputDirectory); + // await this.GenerateBuilderFacade(xmiReaderResult, outputDirectory); } /// - /// Generates Textual Notation builder classes for each concrete + /// Generates Textual Notation builder classes for each targeted by a rule /// /// /// the that contains the UML model to generate from @@ -131,7 +132,7 @@ private Task GenerateBuilderClasses(XmiReaderResult xmiReaderResult, TextualNota } /// - /// Generates Textual Notation builder classes for each concrete + /// Generates Textual Notation builder classes for each targeted by a rule /// /// /// the that contains the UML model to generate from @@ -147,17 +148,39 @@ private async Task GenerateBuilderClassesInternal(XmiReaderResult xmiReaderResul { var template = this.Templates[BuilderTemplateName]; - var classes = xmiReaderResult.QueryContainedAndImported("SysML") - .SelectMany(x => x.PackagedElement.OfType()) - .Where(x => !x.IsAbstract) + var namedElements = xmiReaderResult.QueryContainedAndImported("SysML") + .SelectMany(x => x.PackagedElement.OfType()) .ToList(); - foreach (var umlClass in classes) + var rulesGroupedByType = textualNotationSpecification.Rules + .Where(x => !string.IsNullOrWhiteSpace(x.TargetElementName) && namedElements.Any(n => n.Name == x.TargetElementName)) + .GroupBy(x => x.TargetElementName).ToDictionary(x => x.Key, x => x.ToList()); + + foreach (var nonTargetingRule in textualNotationSpecification.Rules.Where(x => string.IsNullOrWhiteSpace(x.TargetElementName))) + { + var matchingClass = namedElements.SingleOrDefault(x => x.Name == nonTargetingRule.RuleName); + + if (matchingClass != null) + { + if (rulesGroupedByType.TryGetValue(matchingClass.Name, out var existingRules)) + { + existingRules.Add(nonTargetingRule); + } + else + { + rulesGroupedByType[matchingClass.Name] = [nonTargetingRule]; + } + } + } + + foreach (var rulesPerType in rulesGroupedByType) { - var generatedBuilder = template(new {ClassContext = umlClass, Rules = textualNotationSpecification.Rules}); + var targetClassContext = namedElements.Single(x => x.Name == rulesPerType.Key); + + var generatedBuilder = template(new {Context = targetClassContext, Rules = rulesPerType.Value, AllRules = textualNotationSpecification.Rules}); generatedBuilder = this.CodeCleanup(generatedBuilder); - var fileName = $"{umlClass.Name.CapitalizeFirstLetter()}TextualNotationBuilder.cs"; + var fileName = $"{targetClassContext.Name.CapitalizeFirstLetter()}TextualNotationBuilder.cs"; await WriteAsync(generatedBuilder, outputDirectory, fileName); } diff --git a/SysML2.NET/TextualNotation/ITextualNotationBuilderFacade.cs b/SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs similarity index 57% rename from SysML2.NET/TextualNotation/ITextualNotationBuilderFacade.cs rename to SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs index a290d58f..7ea1b61d 100644 --- a/SysML2.NET/TextualNotation/ITextualNotationBuilderFacade.cs +++ b/SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------------------------- -// +// // // Copyright 2022-2026 Starion Group S.A. // @@ -18,20 +18,20 @@ // // ------------------------------------------------------------------------------------------------ -namespace SysML2.NET.TextualNotation +namespace SysML2.NET.CodeGenerator.Grammar { - using SysML2.NET.Core.POCO.Root.Elements; + using System.Collections.Generic; + + using SysML2.NET.CodeGenerator.Grammar.Model; /// - /// The provides access to built textual notation for via + /// Provides mapping data class for the alternative grammar part /// - public interface ITextualNotationBuilderFacade + public class Alternatives { /// - /// Queries the Textual Notation of an + /// Gets a collection of that is part of the /// - /// The to built textual notation from - /// The built textual notation string - string QueryTextualNotationOfElement(IElement element); + public List Elements { get; } = []; } } diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs index 719dd5d2..32219bc4 100644 --- a/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs +++ b/SysML2.NET.CodeGenerator/Grammar/Model/AssignmentElement.cs @@ -43,6 +43,6 @@ public class AssignmentElement: RuleElement /// /// Gets or sets an optional prefix /// - public string Prefix { get; set; } + public string Prefix { get; set; } } } diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs index c6fb5b1a..820bbf6f 100644 --- a/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs +++ b/SysML2.NET.CodeGenerator/Grammar/Model/GroupElement.cs @@ -28,8 +28,8 @@ namespace SysML2.NET.CodeGenerator.Grammar.Model public class GroupElement: RuleElement { /// - /// All that are part of the group + /// Gets the collection that are part of the /// - public List Elements { get; } = []; + public List Alternatives { get; } = []; } } diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs index f60a6273..22811eac 100644 --- a/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs +++ b/SysML2.NET.CodeGenerator/Grammar/Model/TextualNotationRule.cs @@ -43,13 +43,13 @@ public class TextualNotationRule public RuleParameter Parameter { get; set; } /// - /// Gets the collection of defined + /// Gets or sets the raw string that declares the rule /// - public List Elements { get; } = []; + public string RawRule { get; set; } /// - /// Gets or sets the raw string that declares the rule + /// Gets or the collection of defined by the rule /// - public string RawRule { get; set; } + public List Alternatives { get; } = []; } } diff --git a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs index 5eb07260..aeeeb1b8 100644 --- a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs +++ b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs @@ -54,7 +54,7 @@ public override object VisitRule_definition(kebnfParser.Rule_definitionContext c { RuleName = context.name.Text, TargetElementName = context.target_ast?.Text, - RawRule = context.GetText() + RawRule = context.GetText().Trim() }; if (string.IsNullOrWhiteSpace(rule.RuleName)) @@ -71,7 +71,7 @@ public override object VisitRule_definition(kebnfParser.Rule_definitionContext c }; } - rule.Elements.AddRange((List)this.Visit(context.rule_body)); + rule.Alternatives.AddRange((IEnumerable)this.Visit(context.rule_body)); return rule; } @@ -79,10 +79,10 @@ public override object VisitRule_definition(kebnfParser.Rule_definitionContext c /// Visit a parse tree produced by . /// /// The parse tree. - /// The visitor result, as a collection of + /// The visitor result, as an public override object VisitAlternatives(kebnfParser.AlternativesContext context) { - return context.alternative().Select(a => (Alternatives)this.Visit(a)).SelectMany(x => x.Elements.Where(e => e!=null)).ToList(); + return context.alternative().Select(a => (Alternatives)this.Visit(a)); } /// @@ -93,7 +93,7 @@ public override object VisitAlternatives(kebnfParser.AlternativesContext context public override object VisitAlternative(kebnfParser.AlternativeContext context) { var alternatives = new Alternatives(); - alternatives.Elements.AddRange(context.element().Select(e => (RuleElement)this.Visit(e))); + alternatives.Elements.AddRange(context.element().Select(e => (RuleElement)this.Visit(e)).Where(x => x != null)); return alternatives; } @@ -106,7 +106,7 @@ public override object VisitAssignment(kebnfParser.AssignmentContext context) { return new AssignmentElement() { - Property = context.property.GetText(), + Property = context.property.GetText().Split(".")[^1], Operator = context.op.Text, Suffix = context.suffix?.GetText(), Value = (RuleElement)this.Visit(context.content), @@ -131,10 +131,6 @@ public override object VisitNon_parsing_assignment(kebnfParser.Non_parsing_assig /// /// Visit a parse tree produced by . - /// - /// The default implementation returns the result of calling - /// on . - /// /// /// The parse tree. /// The visitor result. @@ -153,12 +149,13 @@ public override object VisitValue_literal(kebnfParser.Value_literalContext conte /// The visitor result, as . public override object VisitGroup(kebnfParser.GroupContext context) { - var group = new GroupElement() + var group = new GroupElement { Suffix = context.suffix?.GetText(), }; + + group.Alternatives.AddRange((IEnumerable)this.Visit(context.alternatives())); - group.Elements.AddRange((List)this.Visit(context.alternatives())); return group; } @@ -189,16 +186,5 @@ public override object VisitNon_terminal(kebnfParser.Non_terminalContext context Suffix = context.suffix?.GetText() }; } - - /// - /// Provides mapping data class for the alternative grammar part - /// - private class Alternatives - { - /// - /// Gets a collection of that is part of the - /// - public List Elements { get; } = []; - } } } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/NamedElementHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/NamedElementHelper.cs index 2705fd89..1a7e63dc 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/NamedElementHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/NamedElementHelper.cs @@ -52,6 +52,16 @@ public static void RegisterNamedElementHelper(this IHandlebars handlebars) writer.WriteSafeString(namedElement.QueryNamespace()); }); + + handlebars.RegisterHelper("NamedElement.WriteFullyQualifiedTypeName", (writer, _, arguments) => + { + if (arguments[0] is not INamedElement namedElement) + { + throw new ArgumentException("supposed to be INamedElement"); + } + + writer.WriteSafeString(namedElement.QueryFullyQualifiedTypeName()); + }); } } } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index cddeef09..6165d7dc 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -26,8 +26,12 @@ namespace SysML2.NET.CodeGenerator.HandleBarHelpers using HandlebarsDotNet; + using SysML2.NET.CodeGenerator.Extensions; + using SysML2.NET.CodeGenerator.Grammar; using SysML2.NET.CodeGenerator.Grammar.Model; + using uml4net.CommonStructure; + using uml4net.Extensions; using uml4net.StructuredClassifiers; /// @@ -41,63 +45,133 @@ public static class RulesHelper /// The context with which the helper needs to be registered public static void RegisterRulesHelper(this IHandlebars handlebars) { - handlebars.RegisterHelper("RulesHelper.WriteForPoco", (writer, _, arguments) => + handlebars.RegisterHelper("RulesHelper.WriteRule", (writer, _, arguments) => { - if (arguments.Length != 2) + if (arguments.Length != 3) { - throw new ArgumentException("RulesHelper.WriteForPoco expects to have 2 arguments"); + throw new ArgumentException("RulesHelper.WriteRule expects to have 3 arguments"); } - if (arguments[0] is not IClass umlClass) + if (arguments[0] is not TextualNotationRule textualRule) { - throw new ArgumentException("RulesHelper.WriteForPoco expects IClass as first argument"); + throw new ArgumentException("RulesHelper.WriteRule expects TextualNotationRule as first argument"); } - if (arguments[1] is not List rules) + if (arguments[1] is not INamedElement namedElement) { - throw new ArgumentException("RulesHelper.WriteForPoco expects a list of TextualNotationRule as second argument"); + throw new ArgumentException("RulesHelper.WriteRule expects INamedElement as second argument"); } - - var canonicalRule = rules.SingleOrDefault(x => x.RuleName == umlClass.Name); - if (canonicalRule == null) + if (arguments[2] is not List allRules) { - return; + throw new ArgumentException("RulesHelper.WriteRule expects a list of TextualNotationRule as third argument"); } - writer.WriteSafeString($"// Rule definition : {canonicalRule.RawRule}"); - WriteForRule(writer, umlClass, canonicalRule, rules); + if (namedElement is IClass umlClass) + { + ProcessAlternatives(writer, umlClass, textualRule.Alternatives, allRules); + } }); } - private static void WriteForRule(EncodedTextWriter writer, IClass umlClass, TextualNotationRule textualRule, List rules) + /// + /// Processes a collection of a + /// + /// The used to write into output content + /// The related + /// The collection of alternatives to process + /// A collection of all existing rules + private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, IReadOnlyCollection rules) { - foreach (var textualRuleElement in textualRule.Elements) + if (alternatives.Count == 1) { - switch (textualRuleElement) + foreach (var textualRuleElement in alternatives.ElementAt(0).Elements) { - case TerminalElement terminalElement: - writer.WriteSafeString($"stringBuilder.Append(\"{terminalElement.Value} \");"); - break; - case NonTerminalElement nonTerminalElement: - var referencedRule = rules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); - writer.WriteSafeString($"// non Terminal : {nonTerminalElement.Name}; Found rule {referencedRule?.RawRule}"); - break; - case GroupElement groupElement: - writer.WriteSafeString("// Group Element "); - break; - case AssignmentElement assignmentElement: - writer.WriteSafeString($"// Assignment Element : {assignmentElement.Property} {assignmentElement.Operator} {assignmentElement.Value}"); - break; - case NonParsingAssignmentElement nonParsingAssignmentElement: - writer.WriteSafeString($"// Assignment Element : {nonParsingAssignmentElement.PropertyName} {nonParsingAssignmentElement.Operator} {nonParsingAssignmentElement.Value}"); - break; - default: - throw new ArgumentException("Unknown element type"); + ProcessRuleElement(writer, umlClass, rules, textualRuleElement); } - - writer.WriteSafeString(Environment.NewLine); } + else + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Multiple alternatives not implemented yet\");"); + } + } + + /// + /// Processes a + /// + /// The used to write into output content + /// The related + /// A collection of all existing rules + /// The to process + /// If the type of the is not supported + private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, RuleElement textualRuleElement) + { + switch (textualRuleElement) + { + case TerminalElement terminalElement: + writer.WriteSafeString($"stringBuilder.Append(\"{terminalElement.Value} \");"); + break; + case NonTerminalElement nonTerminalElement: + var referencedRule = rules.Single(x => x.RuleName == nonTerminalElement.Name); + var typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; + writer.WriteSafeString($"// non Terminal : {nonTerminalElement.Name}; Found rule {referencedRule.RawRule} {Environment.NewLine}"); + + if (typeTarget != umlClass.Name) + { + var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); + + if (targetType != null) + { + if (targetType is IClass targetClass && umlClass.QueryAllGeneralClassifiers().Contains(targetClass)) + { + writer.WriteSafeString($"{targetType.Name}TextualNotationBuilder.Build{referencedRule.RuleName}(poco, stringBuilder);"); + } + else + { + ProcessAlternatives(writer, umlClass, referencedRule.Alternatives, rules); + } + } + else + { + ProcessAlternatives(writer, umlClass, referencedRule.Alternatives, rules); + } + } + else + { + writer.WriteSafeString($"Build{referencedRule.RuleName}(poco, stringBuilder);"); + } + + break; + case GroupElement groupElement: + writer.WriteSafeString($"// Group Element{Environment.NewLine}"); + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, rules); + break; + case AssignmentElement assignmentElement: + writer.WriteSafeString($"// Assignment Element : {assignmentElement.Property} {assignmentElement.Operator} {assignmentElement.Value}{Environment.NewLine}"); + var properties = umlClass.QueryAllProperties(); + var targetProperty = properties.SingleOrDefault(x => string.Equals(x.Name, assignmentElement.Property, StringComparison.OrdinalIgnoreCase)); + + if (targetProperty != null) + { + writer.WriteSafeString($"// If property {targetProperty.Name} value is set, print {assignmentElement.Value}"); + } + else + { + writer.WriteSafeString($"Build{assignmentElement.Property.CapitalizeFirstLetter()}(poco, stringBuilder);"); + } + + break; + case NonParsingAssignmentElement nonParsingAssignmentElement: + writer.WriteSafeString($"// Assignment Element : {nonParsingAssignmentElement.PropertyName} {nonParsingAssignmentElement.Operator} {nonParsingAssignmentElement.Value}"); + break; + case ValueLiteralElement valueLiteralElement: + writer.WriteSafeString($"// Value Literal Element : {valueLiteralElement.Value}"); + break; + default: + throw new ArgumentException("Unknown element type"); + } + + writer.WriteSafeString(Environment.NewLine); } } } diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs index 0797bc83..ae78deaf 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------------------------- -// +// // // Copyright 2022-2026 Starion Group S.A. // @@ -29,29 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class {{this.ClassContext.Name}}TextualNotationBuilder: TextualNotationBuilder + public static partial class {{this.Context.Name}}TextualNotationBuilder { - /// - /// Initializes a new instance of a - /// - /// The used to query textual notation of referenced - public {{this.ClassContext.Name}}TextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) - { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.{{ #NamedElement.WriteFullyQualifiedNameSpace this.ClassContext }}.{{ this.ClassContext.Name }} poco) - { - var stringBuilder = new StringBuilder(); - {{RulesHelper.WriteForPoco this.ClassContext this.Rules}} - return stringBuilder.ToString(); - } + {{#each this.Rules as | rule | }} + /// + /// Builds the Textual Notation string for the rule {{Rule.RuleName}} + /// {{Rule.RawRule}} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void Build{{rule.RuleName}}({{ #NamedElement.WriteFullyQualifiedTypeName ../this.Context }} poco, StringBuilder stringBuilder) + { + {{RulesHelper.WriteRule rule ../this.Context ../this.AllRules}} + } + {{#unless @last}} + + {{/unless}} + {{/each}} } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs index 18473811..21bc64aa 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs @@ -29,28 +29,106 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AcceptActionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class AcceptActionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AcceptNode + /// AcceptNode:AcceptActionUsage=OccurrenceUsagePrefixAcceptNodeDeclarationActionBody /// - /// The used to query textual notation of referenced - public AcceptActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAcceptNode(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + // non Terminal : AcceptNodeDeclaration; Found rule AcceptNodeDeclaration:AcceptActionUsage=ActionNodeUsageDeclaration?'accept'AcceptParameterPart + BuildAcceptNodeDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule AcceptNodeDeclaration + /// AcceptNodeDeclaration:AcceptActionUsage=ActionNodeUsageDeclaration?'accept'AcceptParameterPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAcceptNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? + ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("accept "); + // non Terminal : AcceptParameterPart; Found rule AcceptParameterPart:AcceptActionUsage=ownedRelationship+=PayloadParameterMember('via'ownedRelationship+=NodeParameterMember)? + BuildAcceptParameterPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule AcceptParameterPart + /// AcceptParameterPart:AcceptActionUsage=ownedRelationship+=PayloadParameterMember('via'ownedRelationship+=NodeParameterMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAcceptParameterPart(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append("via "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule StateAcceptActionUsage + /// StateAcceptActionUsage:AcceptActionUsage=AcceptNodeDeclarationActionBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.AcceptActionUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // non Terminal : AcceptNodeDeclaration; Found rule AcceptNodeDeclaration:AcceptActionUsage=ActionNodeUsageDeclaration?'accept'AcceptParameterPart + BuildAcceptNodeDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TriggerAction + /// TriggerAction:AcceptActionUsage=AcceptParameterPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTriggerAction(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : AcceptParameterPart; Found rule AcceptParameterPart:AcceptActionUsage=ownedRelationship+=PayloadParameterMember('via'ownedRelationship+=NodeParameterMember)? + BuildAcceptParameterPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TransitionAcceptActionUsage + /// TransitionAcceptActionUsage:AcceptActionUsage=AcceptNodeDeclaration('{'ActionBodyItem*'}')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : AcceptNodeDeclaration; Found rule AcceptNodeDeclaration:AcceptActionUsage=ActionNodeUsageDeclaration?'accept'AcceptParameterPart + BuildAcceptNodeDeclaration(poco, stringBuilder); + // Group Element + stringBuilder.Append("{ "); + // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember + TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); + stringBuilder.Append("} "); + - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs index 778d2465..5dec7aa8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ActionDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class ActionDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ActionDefinition + /// ActionDefinition=OccurrenceDefinitionPrefix'action''def'DefinitionDeclarationActionBody /// - /// The used to query textual notation of referenced - public ActionDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionDefinition(SysML2.NET.Core.POCO.Systems.Actions.IActionDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ActionDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ActionDefinition=OccurrenceDefinitionPrefix'action''def'DefinitionDeclarationActionBody - - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("action "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs index 544a83a7..e6d8375b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs @@ -29,40 +29,157 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ActionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ActionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ActionUsageDeclaration + /// ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? /// - /// The used to query textual notation of referenced - public ActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ActionNode + /// ActionNode:ActionUsage=ControlNode|SendNode|AcceptNode|AssignmentNode|TerminateNode|IfNode|WhileLoopNode|ForLoopNode + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionNode(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ActionNodeUsageDeclaration + /// ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionNodeUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("action "); + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule ActionNodePrefix + /// ActionNodePrefix:ActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration? /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ActionUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionNodePrefix(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : ActionUsage=OccurrenceUsagePrefix'action'ActionUsageDeclarationActionBody + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? + BuildActionNodeUsageDeclaration(poco, stringBuilder); - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + } + /// + /// Builds the Textual Notation string for the rule AssignmentNodeDeclaration + /// AssignmentNodeDeclaration:ActionUsage=(ActionNodeUsageDeclaration)?'assign'ownedRelationship+=AssignmentTargetMemberownedRelationship+=FeatureChainMember':='ownedRelationship+=NodeParameterMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + // Group Element + // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? + BuildActionNodeUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("assign "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(":= "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ActionBodyParameter + /// ActionBodyParameter:ActionUsage=('action'UsageDeclaration?)?'{'ActionBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionBodyParameter(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + // Group Element stringBuilder.Append("action "); - // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("{ "); + // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember + TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); + stringBuilder.Append("} "); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + } + /// + /// Builds the Textual Notation string for the rule StateActionUsage + /// StateActionUsage:ActionUsage=EmptyActionUsage';'|StatePerformActionUsage|StateAcceptActionUsage|StateSendActionUsage|StateAssignmentActionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule EmptyActionUsage + /// EmptyActionUsage:ActionUsage={} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + + } + + /// + /// Builds the Textual Notation string for the rule EffectBehaviorUsage + /// EffectBehaviorUsage:ActionUsage=EmptyActionUsage|TransitionPerformActionUsage|TransitionAcceptActionUsage|TransitionSendActionUsage|TransitionAssignmentActionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEffectBehaviorUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ActionUsage + /// ActionUsage=OccurrenceUsagePrefix'action'ActionUsageDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("action "); + // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? + BuildActionUsageDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs index d43e6335..32cc3c30 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs @@ -29,28 +29,23 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ActorMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class ActorMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ActorMember + /// ActorMember:ActorMembership=MemberPrefixownedRelatedElement+=ActorUsage /// - /// The used to query textual notation of referenced - public ActorMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActorMember(SysML2.NET.Core.POCO.Systems.Requirements.IActorMembership poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.ActorMembership poco) - { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs index 66a8ec2a..16afccf6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs @@ -29,38 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AllocationDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class AllocationDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AllocationDefinition + /// AllocationDefinition=OccurrenceDefinitionPrefix'allocation''def'Definition /// - /// The used to query textual notation of referenced - public AllocationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAllocationDefinition(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Allocations.AllocationDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : AllocationDefinition=OccurrenceDefinitionPrefix'allocation''def'Definition - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("allocation "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs index 630fa981..3c25ebd6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs @@ -29,41 +29,36 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AllocationUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class AllocationUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AllocationUsageDeclaration + /// AllocationUsageDeclaration:AllocationUsage='allocation'UsageDeclaration('allocate'ConnectorPart)?|'allocate'ConnectorPart /// - /// The used to query textual notation of referenced - public AllocationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAllocationUsageDeclaration(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationUsage poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule AllocationUsage + /// AllocationUsage=OccurrenceUsagePrefixAllocationUsageDeclarationUsageBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Allocations.AllocationUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAllocationUsage(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : AllocationUsage=OccurrenceUsagePrefixAllocationUsageDeclarationUsageBody + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + // non Terminal : AllocationUsageDeclaration; Found rule AllocationUsageDeclaration:AllocationUsage='allocation'UsageDeclaration('allocate'ConnectorPart)?|'allocate'ConnectorPart + BuildAllocationUsageDeclaration(poco, stringBuilder); + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - - // non Terminal : AllocationUsageDeclaration; Found rule AllocationUsageDeclaration:AllocationUsage='allocation'UsageDeclaration('allocate'ConnectorPart)?|'allocate'ConnectorPart - - - - - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody - - - - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs index 5f61ce7e..ad2f0689 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AnalysisCaseDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class AnalysisCaseDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AnalysisCaseDefinition + /// AnalysisCaseDefinition=OccurrenceDefinitionPrefix'analysis''def'DefinitionDeclarationCaseBody /// - /// The used to query textual notation of referenced - public AnalysisCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAnalysisCaseDefinition(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : AnalysisCaseDefinition=OccurrenceDefinitionPrefix'analysis''def'DefinitionDeclarationCaseBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("analysis "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs index e2c61eba..e34b4e54 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs @@ -29,46 +29,30 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AnalysisCaseUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class AnalysisCaseUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AnalysisCaseUsage + /// AnalysisCaseUsage=OccurrenceUsagePrefix'analysis'ConstraintUsageDeclarationCaseBody /// - /// The used to query textual notation of referenced - public AnalysisCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAnalysisCaseUsage(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : AnalysisCaseUsage=OccurrenceUsagePrefix'analysis'ConstraintUsageDeclarationCaseBody - - - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("analysis "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - - - - - - - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' - + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs index b312b461..177e3ddc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs @@ -29,50 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AnnotatingElementTextualNotationBuilder : TextualNotationBuilder + public static partial class AnnotatingElementTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AnnotatingElement + /// AnnotatingElement=Comment|Documentation|TextualRepresentation|MetadataFeature /// - /// The used to query textual notation of referenced - public AnnotatingElementTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAnnotatingElement(SysML2.NET.Core.POCO.Root.Annotations.IAnnotatingElement poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.AnnotatingElement poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : AnnotatingElement=Comment|Documentation|TextualRepresentation|MetadataFeature - - - - // non Terminal : Comment; Found rule Comment=('comment'Identification('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?)?('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT - - - // non Terminal : Documentation; Found rule Documentation='doc'Identification('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT - - - - - // non Terminal : TextualRepresentation; Found rule TextualRepresentation=('rep'Identification)?'language'language=STRING_VALUEbody=REGULAR_COMMENT - - - - - - - // non Terminal : MetadataFeature; Found rule MetadataFeature=(ownedRelationship+=PrefixMetadataMember)*('@'|'metadata')MetadataFeatureDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody - - - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs index ced6d125..52cc66e8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs @@ -29,31 +29,49 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AnnotationTextualNotationBuilder : TextualNotationBuilder + public static partial class AnnotationTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedAnnotation + /// OwnedAnnotation:Annotation=ownedRelatedElement+=AnnotatingElement /// - /// The used to query textual notation of referenced - public AnnotationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule PrefixMetadataAnnotation + /// PrefixMetadataAnnotation:Annotation='#'annotatingElement=PrefixMetadataUsage{ownedRelatedElement+=annotatingElement} /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.Annotation poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Annotation=annotatedElement=[QualifiedName] + stringBuilder.Append("# "); + // Assignment Element : annotatingElement = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property annotatingElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelatedElement += annotatingElement + + } - // Assignment Element : annotatedElement = + /// + /// Builds the Textual Notation string for the rule Annotation + /// Annotation=annotatedElement=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) + { + // Assignment Element : annotatedElement = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property annotatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs index 398b7d80..aaedc496 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs @@ -29,39 +29,30 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AssertConstraintUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class AssertConstraintUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AssertConstraintUsage + /// AssertConstraintUsage=OccurrenceUsagePrefix'assert'(isNegated?='not')?(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'constraint'ConstraintUsageDeclaration)CalculationBody /// - /// The used to query textual notation of referenced - public AssertConstraintUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssertConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IAssertConstraintUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Constraints.AssertConstraintUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : AssertConstraintUsage=OccurrenceUsagePrefix'assert'(isNegated?='not')?(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'constraint'ConstraintUsageDeclaration)CalculationBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("assert "); - // Group Element - // Group Element - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' - + // Group Element + // Assignment Element : isNegated ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isNegated value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs index a405b00b..c5ba02b4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs @@ -29,28 +29,59 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AssignmentActionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class AssignmentActionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AssignmentNode + /// AssignmentNode:AssignmentActionUsage=OccurrenceUsagePrefixAssignmentNodeDeclarationActionBody /// - /// The used to query textual notation of referenced - public AssignmentActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssignmentNode(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, StringBuilder stringBuilder) { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + // non Terminal : AssignmentNodeDeclaration; Found rule AssignmentNodeDeclaration:ActionUsage=(ActionNodeUsageDeclaration)?'assign'ownedRelationship+=AssignmentTargetMemberownedRelationship+=FeatureChainMember':='ownedRelationship+=NodeParameterMember + ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule StateAssignmentActionUsage + /// StateAssignmentActionUsage:AssignmentActionUsage=AssignmentNodeDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : AssignmentNodeDeclaration; Found rule AssignmentNodeDeclaration:ActionUsage=(ActionNodeUsageDeclaration)?'assign'ownedRelationship+=AssignmentTargetMemberownedRelationship+=FeatureChainMember':='ownedRelationship+=NodeParameterMember + ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule TransitionAssignmentActionUsage + /// TransitionAssignmentActionUsage:AssignmentActionUsage=AssignmentNodeDeclaration('{'ActionBodyItem*'}')? /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.AssignmentActionUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // non Terminal : AssignmentNodeDeclaration; Found rule AssignmentNodeDeclaration:ActionUsage=(ActionNodeUsageDeclaration)?'assign'ownedRelationship+=AssignmentTargetMemberownedRelationship+=FeatureChainMember':='ownedRelationship+=NodeParameterMember + ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); + // Group Element + stringBuilder.Append("{ "); + // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember + TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); + stringBuilder.Append("} "); + - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs index 9ee85d6d..b1528d69 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs @@ -29,45 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AssociationStructureTextualNotationBuilder : TextualNotationBuilder + public static partial class AssociationStructureTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AssociationStructure + /// AssociationStructure=TypePrefix'assoc''struct'ClassifierDeclarationTypeBody /// - /// The used to query textual notation of referenced - public AssociationStructureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssociationStructure(SysML2.NET.Core.POCO.Kernel.Associations.IAssociationStructure poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Associations.AssociationStructure poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : AssociationStructure=TypePrefix'assoc''struct'ClassifierDeclarationTypeBody - - - - - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("assoc "); stringBuilder.Append("struct "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs index beefd97f..82923aad 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs @@ -29,40 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AssociationTextualNotationBuilder : TextualNotationBuilder + public static partial class AssociationTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Association + /// Association=TypePrefix'assoc'ClassifierDeclarationTypeBody /// - /// The used to query textual notation of referenced - public AssociationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssociation(SysML2.NET.Core.POCO.Kernel.Associations.IAssociation poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Associations.Association poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Association=TypePrefix'assoc'ClassifierDeclarationTypeBody - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("assoc "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs index a09bbf4a..c79ef359 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs @@ -29,38 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AttributeDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class AttributeDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AttributeDefinition + /// AttributeDefinition:AttributeDefinition=DefinitionPrefix'attribute''def'Definition /// - /// The used to query textual notation of referenced - public AttributeDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAttributeDefinition(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Attributes.AttributeDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : AttributeDefinition:AttributeDefinition=DefinitionPrefix'attribute''def'Definition - - // non Terminal : DefinitionPrefix; Found rule DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* - - + // non Terminal : DefinitionPrefix; Found rule DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* + DefinitionTextualNotationBuilder.BuildDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("attribute "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs index 55142496..32677578 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs @@ -29,39 +29,24 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class AttributeUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class AttributeUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AttributeUsage + /// AttributeUsage:AttributeUsage=UsagePrefix'attribute'Usage /// - /// The used to query textual notation of referenced - public AttributeUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAttributeUsage(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Attributes.AttributeUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : AttributeUsage:AttributeUsage=UsagePrefix'attribute'Usage - - - - // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* - - + // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); stringBuilder.Append("attribute "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion - - + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs index 06db73a0..0e0fd3d1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs @@ -29,42 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class BehaviorTextualNotationBuilder : TextualNotationBuilder + public static partial class BehaviorTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Behavior + /// Behavior=TypePrefix'behavior'ClassifierDeclarationTypeBody /// - /// The used to query textual notation of referenced - public BehaviorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBehavior(SysML2.NET.Core.POCO.Kernel.Behaviors.IBehavior poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Behaviors.Behavior poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Behavior=TypePrefix'behavior'ClassifierDeclarationTypeBody - - - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("behavior "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs index c3da729c..3ac18dde 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -29,43 +29,34 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class BindingConnectorAsUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class BindingConnectorAsUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule BindingConnectorAsUsage + /// BindingConnectorAsUsage=UsagePrefix('binding'UsageDeclaration)?'bind'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMemberUsageBody /// - /// The used to query textual notation of referenced - public BindingConnectorAsUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBindingConnectorAsUsage(SysML2.NET.Core.POCO.Systems.Connections.IBindingConnectorAsUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.BindingConnectorAsUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : BindingConnectorAsUsage=UsagePrefix('binding'UsageDeclaration)?'bind'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMemberUsageBody - + // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); + // Group Element + stringBuilder.Append("binding "); + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - - // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* - - - // Group Element stringBuilder.Append("bind "); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("= "); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody - - + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs index 6af305cb..484d0758 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs @@ -29,44 +29,43 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class BindingConnectorTextualNotationBuilder : TextualNotationBuilder + public static partial class BindingConnectorTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule BindingConnectorDeclaration + /// BindingConnectorDeclaration:BindingConnector=FeatureDeclaration('of'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)?|(isSufficient?='all')?('of'?ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)? /// - /// The used to query textual notation of referenced - public BindingConnectorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBindingConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule BindingConnector + /// BindingConnector=FeaturePrefix'binding'BindingConnectorDeclarationTypeBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Connectors.BindingConnector poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBindingConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : BindingConnector=FeaturePrefix'binding'BindingConnectorDeclarationTypeBody - - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("binding "); - // non Terminal : BindingConnectorDeclaration; Found rule BindingConnectorDeclaration:BindingConnector=FeatureDeclaration('of'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)?|(isSufficient?='all')?('of'?ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)? - - - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : BindingConnectorDeclaration; Found rule BindingConnectorDeclaration:BindingConnector=FeatureDeclaration('of'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)?|(isSufficient?='all')?('of'?ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)? + BuildBindingConnectorDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs index f50b773d..f74854e3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs @@ -29,45 +29,34 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class BooleanExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class BooleanExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule BooleanExpression + /// BooleanExpression=FeaturePrefix'bool'FeatureDeclarationValuePart?FunctionBody /// - /// The used to query textual notation of referenced - public BooleanExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBooleanExpression(SysML2.NET.Core.POCO.Kernel.Functions.IBooleanExpression poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.BooleanExpression poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : BooleanExpression=FeaturePrefix'bool'FeatureDeclarationValuePart?FunctionBody - - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("bool "); - // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* - - - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue - - - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' - - + // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs index 8608fea0..368a60c5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class CalculationDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class CalculationDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule CalculationDefinition + /// CalculationDefinition=OccurrenceDefinitionPrefix'calc''def'DefinitionDeclarationCalculationBody /// - /// The used to query textual notation of referenced - public CalculationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCalculationDefinition(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Calculations.CalculationDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : CalculationDefinition=OccurrenceDefinitionPrefix'calc''def'DefinitionDeclarationCalculationBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("calc "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs index 734608f2..c78ff9bd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs @@ -29,40 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class CalculationUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class CalculationUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule CalculationUsage + /// CalculationUsage:CalculationUsage=OccurrenceUsagePrefix'calc'ActionUsageDeclarationCalculationBody /// - /// The used to query textual notation of referenced - public CalculationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCalculationUsage(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Calculations.CalculationUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : CalculationUsage:CalculationUsage=OccurrenceUsagePrefix'calc'ActionUsageDeclarationCalculationBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("calc "); - // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? - - - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' - - + // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? + ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs index 02ab8927..b67d14c0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class CaseDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class CaseDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule CaseDefinition + /// CaseDefinition=OccurrenceDefinitionPrefix'case''def'DefinitionDeclarationCaseBody /// - /// The used to query textual notation of referenced - public CaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCaseDefinition(SysML2.NET.Core.POCO.Systems.Cases.ICaseDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Cases.CaseDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : CaseDefinition=OccurrenceDefinitionPrefix'case''def'DefinitionDeclarationCaseBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("case "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs index 77a84abb..59599bdc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs @@ -29,44 +29,30 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class CaseUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class CaseUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule CaseUsage + /// CaseUsage=OccurrenceUsagePrefix'case'ConstraintUsageDeclarationCaseBody /// - /// The used to query textual notation of referenced - public CaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCaseUsage(SysML2.NET.Core.POCO.Systems.Cases.ICaseUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Cases.CaseUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : CaseUsage=OccurrenceUsagePrefix'case'ConstraintUsageDeclarationCaseBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("case "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - - - - - - - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' - + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs index de09fd90..0313ea23 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs @@ -29,42 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ClassTextualNotationBuilder : TextualNotationBuilder + public static partial class ClassTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Class + /// Class=TypePrefix'class'ClassifierDeclarationTypeBody /// - /// The used to query textual notation of referenced - public ClassTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildClass(SysML2.NET.Core.POCO.Kernel.Classes.IClass poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Classes.Class poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Class=TypePrefix'class'ClassifierDeclarationTypeBody - - - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("class "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs index fb572d82..4ef89bbe 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs @@ -29,40 +29,91 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ClassifierTextualNotationBuilder : TextualNotationBuilder + public static partial class ClassifierTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SubclassificationPart + /// SubclassificationPart:Classifier=SPECIALIZESownedRelationship+=OwnedSubclassification(','ownedRelationship+=OwnedSubclassification)* /// - /// The used to query textual notation of referenced - public ClassifierTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) { + // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule ClassifierDeclaration + /// ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Classifiers.Classifier poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Classifier=TypePrefix'classifier'ClassifierDeclarationTypeBody + // Group Element + // Assignment Element : isSufficient ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isSufficient value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : TypeRelationshipPart; Found rule TypeRelationshipPart:Type=DisjoiningPart|UnioningPart|IntersectingPart|DifferencingPart + TypeTextualNotationBuilder.BuildTypeRelationshipPart(poco, stringBuilder); - stringBuilder.Append("classifier "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + } + /// + /// Builds the Textual Notation string for the rule SuperclassingPart + /// SuperclassingPart:Classifier=SPECIALIZESownedRelationship+=OwnedSubclassification(','ownedRelationship+=OwnedSubclassification)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuperclassingPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) + { + // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + } + /// + /// Builds the Textual Notation string for the rule Classifier + /// Classifier=TypePrefix'classifier'ClassifierDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildClassifier(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) + { + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("classifier "); + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs index c6dc6abd..0b36c549 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs @@ -29,33 +29,24 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class CollectExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class CollectExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule CollectExpression + /// CollectExpression=ownedRelationship+=PrimaryArgumentMember'.'ownedRelationship+=BodyArgumentMember /// - /// The used to query textual notation of referenced - public CollectExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCollectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ICollectExpression poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.CollectExpression poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : CollectExpression=ownedRelationship+=PrimaryArgumentMember'.'ownedRelationship+=BodyArgumentMember - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append(". "); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs index f3cd16a3..e303e66d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs @@ -29,33 +29,41 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class CommentTextualNotationBuilder : TextualNotationBuilder + public static partial class CommentTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Comment + /// Comment=('comment'Identification('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?)?('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT /// - /// The used to query textual notation of referenced - public CommentTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildComment(SysML2.NET.Core.POCO.Root.Annotations.IComment poco, StringBuilder stringBuilder) { - } + // Group Element + stringBuilder.Append("comment "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + // Group Element + stringBuilder.Append("about "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.Comment poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Comment=('comment'Identification('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?)?('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT - // Group Element - // Group Element + + // Group Element + stringBuilder.Append("locale "); + // Assignment Element : locale = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property locale value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : body = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property body value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs index 38bb9bfd..78e52f31 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConcernDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class ConcernDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConcernDefinition + /// ConcernDefinition=OccurrenceDefinitionPrefix'concern''def'DefinitionDeclarationRequirementBody /// - /// The used to query textual notation of referenced - public ConcernDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConcernDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IConcernDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.ConcernDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ConcernDefinition=OccurrenceDefinitionPrefix'concern''def'DefinitionDeclarationRequirementBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("concern "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs index 52cca171..8889cd90 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs @@ -29,46 +29,37 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConcernUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ConcernUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule FramedConcernUsage + /// FramedConcernUsage:ConcernUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?CalculationBody|(UsageExtensionKeyword*'concern'|UsageExtensionKeyword+)CalculationUsageDeclarationCalculationBody /// - /// The used to query textual notation of referenced - public ConcernUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFramedConcernUsage(SysML2.NET.Core.POCO.Systems.Requirements.IConcernUsage poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule ConcernUsage + /// ConcernUsage=OccurrenceUsagePrefix'concern'ConstraintUsageDeclarationRequirementBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.ConcernUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConcernUsage(SysML2.NET.Core.POCO.Systems.Requirements.IConcernUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : ConcernUsage=OccurrenceUsagePrefix'concern'ConstraintUsageDeclarationRequirementBody - - - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("concern "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - - - - - - - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' - - + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs index a42c64cd..61256e00 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs @@ -29,31 +29,21 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConjugatedPortDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class ConjugatedPortDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConjugatedPortDefinition + /// ConjugatedPortDefinition=ownedRelationship+=PortConjugation /// - /// The used to query textual notation of referenced - public ConjugatedPortDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConjugatedPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ConjugatedPortDefinition=ownedRelationship+=PortConjugation - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs index 54256a70..6780ddf0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs @@ -29,45 +29,22 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConjugatedPortTypingTextualNotationBuilder : TextualNotationBuilder + public static partial class ConjugatedPortTypingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConjugatedPortTyping + /// ConjugatedPortTyping:ConjugatedPortTyping='~'originalPortDefinition=~[QualifiedName] /// - /// The used to query textual notation of referenced - public ConjugatedPortTypingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConjugatedPortTyping(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortTyping poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortTyping poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ConjugatedPortTyping:ConjugatedPortTyping='~'originalPortDefinition=~[QualifiedName] - - - - - - - - - - - - - - stringBuilder.Append("~ "); - // Assignment Element : originalPortDefinition = + // Assignment Element : originalPortDefinition = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + BuildOriginalPortDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs index c4fc6bdd..fe68b9ca 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs @@ -29,46 +29,44 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConjugationTextualNotationBuilder : TextualNotationBuilder + public static partial class ConjugationTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedConjugation + /// OwnedConjugation:Conjugation=originalType=[QualifiedName]|originalType=FeatureChain{ownedRelatedElement+=originalType} /// - /// The used to query textual notation of referenced - public ConjugationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule Conjugation + /// Conjugation=('conjugation'Identification)?'conjugate'(conjugatedType=[QualifiedName]|conjugatedType=FeatureChain{ownedRelatedElement+=conjugatedType})CONJUGATES(originalType=[QualifiedName]|originalType=FeatureChain{ownedRelatedElement+=originalType})RelationshipBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Conjugation poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Conjugation=('conjugation'Identification)?'conjugate'(conjugatedType=[QualifiedName]|conjugatedType=FeatureChain{ownedRelatedElement+=conjugatedType})CONJUGATES(originalType=[QualifiedName]|originalType=FeatureChain{ownedRelatedElement+=originalType})RelationshipBody + // Group Element + stringBuilder.Append("conjugation "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element stringBuilder.Append("conjugate "); - // Group Element - // non Terminal : CONJUGATES; Found rule CONJUGATES='~'|'conjugates' + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : CONJUGATES; Found rule CONJUGATES='~'|'conjugates' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); - - - - - - // Group Element - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' - - - - - - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs index 6ff91ddd..06b4a2f7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs @@ -29,38 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConnectionDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class ConnectionDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConnectionDefinition + /// ConnectionDefinition=OccurrenceDefinitionPrefix'connection''def'Definition /// - /// The used to query textual notation of referenced - public ConnectionDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectionDefinition(SysML2.NET.Core.POCO.Systems.Connections.IConnectionDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.ConnectionDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ConnectionDefinition=OccurrenceDefinitionPrefix'connection''def'Definition - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("connection "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs index 6e3de8c1..d153424b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs @@ -29,37 +29,75 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConnectionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ConnectionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConnectorPart + /// ConnectorPart:ConnectionUsage=BinaryConnectorPart|NaryConnectorPart /// - /// The used to query textual notation of referenced - public ConnectionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule BinaryConnectorPart + /// BinaryConnectorPart:ConnectionUsage=ownedRelationship+=ConnectorEndMember'to'ownedRelationship+=ConnectorEndMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.ConnectionUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : ConnectionUsage=OccurrenceUsagePrefix('connection'UsageDeclarationValuePart?('connect'ConnectorPart)?|'connect'ConnectorPart)UsageBody + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("to "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + } + /// + /// Builds the Textual Notation string for the rule NaryConnectorPart + /// NaryConnectorPart:ConnectionUsage='('ownedRelationship+=ConnectorEndMember','ownedRelationship+=ConnectorEndMember(','ownedRelationship+=ConnectorEndMember)*')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("( "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + stringBuilder.Append(") "); + } + /// + /// Builds the Textual Notation string for the rule ConnectionUsage + /// ConnectionUsage=OccurrenceUsagePrefix('connection'UsageDeclarationValuePart?('connect'ConnectorPart)?|'connect'ConnectorPart)UsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectionUsage(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs index b054e23d..e4d151c0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs @@ -29,40 +29,86 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConnectorTextualNotationBuilder : TextualNotationBuilder + public static partial class ConnectorTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConnectorDeclaration + /// ConnectorDeclaration:Connector=BinaryConnectorDeclaration|NaryConnectorDeclaration /// - /// The used to query textual notation of referenced - public ConnectorTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule BinaryConnectorDeclaration + /// BinaryConnectorDeclaration:Connector=(FeatureDeclaration?'from'|isSufficient?='all''from'?)?ownedRelationship+=ConnectorEndMember'to'ownedRelationship+=ConnectorEndMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Connectors.Connector poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Connector=FeaturePrefix'connector'(FeatureDeclaration?ValuePart?|ConnectorDeclaration)TypeBody + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("to "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + } + /// + /// Builds the Textual Notation string for the rule NaryConnectorDeclaration + /// NaryConnectorDeclaration:Connector=FeatureDeclaration?'('ownedRelationship+=ConnectorEndMember','ownedRelationship+=ConnectorEndMember(','ownedRelationship+=ConnectorEndMember)*')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) + { + // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + stringBuilder.Append("( "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(") "); + } - stringBuilder.Append("connector "); - // Group Element - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + /// + /// Builds the Textual Notation string for the rule Connector + /// Connector=FeaturePrefix'connector'(FeatureDeclaration?ValuePart?|ConnectorDeclaration)TypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) + { + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("connector "); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs index e04f227f..4ebbcdc0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConstraintDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class ConstraintDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConstraintDefinition + /// ConstraintDefinition=OccurrenceDefinitionPrefix'constraint''def'DefinitionDeclarationCalculationBody /// - /// The used to query textual notation of referenced - public ConstraintDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstraintDefinition(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Constraints.ConstraintDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ConstraintDefinition=OccurrenceDefinitionPrefix'constraint''def'DefinitionDeclarationCalculationBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("constraint "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs index d6ab2b14..60157281 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs @@ -29,44 +29,52 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConstraintUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ConstraintUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConstraintUsageDeclaration + /// ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? /// - /// The used to query textual notation of referenced - public ConstraintUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstraintUsageDeclaration(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, StringBuilder stringBuilder) { + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule RequirementConstraintUsage + /// RequirementConstraintUsage:ConstraintUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?RequirementBody|(UsageExtensionKeyword*'constraint'|UsageExtensionKeyword+)ConstraintUsageDeclarationCalculationBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Constraints.ConstraintUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : ConstraintUsage=OccurrenceUsagePrefix'constraint'ConstraintUsageDeclarationCalculationBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule ConstraintUsage + /// ConstraintUsage=OccurrenceUsagePrefix'constraint'ConstraintUsageDeclarationCalculationBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("constraint "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - - - - - - - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' - - + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + BuildConstraintUsageDeclaration(poco, stringBuilder); + // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs index e3ec167c..8e49a5e2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs @@ -29,33 +29,24 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ConstructorExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class ConstructorExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConstructorExpression + /// ConstructorExpression='new'ownedRelationship+=InstantiatedTypeMemberownedRelationship+=ConstructorResultMember /// - /// The used to query textual notation of referenced - public ConstructorExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstructorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IConstructorExpression poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.ConstructorExpression poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ConstructorExpression='new'ownedRelationship+=InstantiatedTypeMemberownedRelationship+=ConstructorResultMember - stringBuilder.Append("new "); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs similarity index 56% rename from SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs rename to SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs index 24e82c08..ed69bd4f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralRationalTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs @@ -1,5 +1,5 @@ // ------------------------------------------------------------------------------------------------- -// +// // // Copyright 2022-2026 Starion Group S.A. // @@ -29,28 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class LiteralRationalTextualNotationBuilder : TextualNotationBuilder + public static partial class ControlNodeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ControlNode + /// ControlNode=MergeNode|DecisionNode|JoinNode|ForkNode /// - /// The used to query textual notation of referenced - public LiteralRationalTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildControlNode(SysML2.NET.Core.POCO.Systems.Actions.IControlNode poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralRational poco) - { - var stringBuilder = new StringBuilder(); - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs index 41e0b661..3401445a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs @@ -29,28 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class CrossSubsettingTextualNotationBuilder : TextualNotationBuilder + public static partial class CrossSubsettingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedCrossSubsetting + /// OwnedCrossSubsetting:CrossSubsetting=crossedFeature=[QualifiedName]|crossedFeature=OwnedFeatureChain{ownedRelatedElement+=crossedFeature} /// - /// The used to query textual notation of referenced - public CrossSubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedCrossSubsetting(SysML2.NET.Core.POCO.Core.Features.ICrossSubsetting poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.CrossSubsetting poco) - { - var stringBuilder = new StringBuilder(); - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs index f31594b4..e7bd3f68 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs @@ -29,42 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class DataTypeTextualNotationBuilder : TextualNotationBuilder + public static partial class DataTypeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule DataType + /// DataType=TypePrefix'datatype'ClassifierDeclarationTypeBody /// - /// The used to query textual notation of referenced - public DataTypeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDataType(SysML2.NET.Core.POCO.Kernel.DataTypes.IDataType poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.DataTypes.DataType poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : DataType=TypePrefix'datatype'ClassifierDeclarationTypeBody - - - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("datatype "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs index 53187f23..ea487f4c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs @@ -29,40 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class DecisionNodeTextualNotationBuilder : TextualNotationBuilder + public static partial class DecisionNodeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule DecisionNode + /// DecisionNode=ControlNodePrefixisComposite?='decide'UsageDeclarationActionBody /// - /// The used to query textual notation of referenced - public DecisionNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDecisionNode(SysML2.NET.Core.POCO.Systems.Actions.IDecisionNode poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.DecisionNode poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : DecisionNode=ControlNodePrefixisComposite?='decide'UsageDeclarationActionBody - - // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - - - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' - - + // If property isComposite value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs index 1bab9ec6..e5ccadf7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs @@ -29,36 +29,84 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class DefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class DefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule DefinitionExtensionKeyword + /// DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember /// - /// The used to query textual notation of referenced - public DefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule DefinitionPrefix + /// DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Definition poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Definition=DefinitionDeclarationDefinitionBody + // non Terminal : BasicDefinitionPrefix; Found rule BasicDefinitionPrefix=isAbstract?='abstract'|isVariation?='variation' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + BuildDefinitionExtensionKeyword(poco, stringBuilder); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + } + /// + /// Builds the Textual Notation string for the rule DefinitionDeclaration + /// DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) + { + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + // non Terminal : SubclassificationPart; Found rule SubclassificationPart:Classifier=SPECIALIZESownedRelationship+=OwnedSubclassification(','ownedRelationship+=OwnedSubclassification)* + ClassifierTextualNotationBuilder.BuildSubclassificationPart(poco, stringBuilder); + + } - // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + /// + /// Builds the Textual Notation string for the rule ExtendedDefinition + /// ExtendedDefinition:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword+'def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExtendedDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) + { + // non Terminal : BasicDefinitionPrefix; Found rule BasicDefinitionPrefix=isAbstract?='abstract'|isVariation?='variation' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + BuildDefinitionExtensionKeyword(poco, stringBuilder); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + BuildDefinition(poco, stringBuilder); + } + /// + /// Builds the Textual Notation string for the rule Definition + /// Definition=DefinitionDeclarationDefinitionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) + { + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs index 6a62ac69..4c1d1f68 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs @@ -29,44 +29,48 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class DependencyTextualNotationBuilder : TextualNotationBuilder + public static partial class DependencyTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Dependency + /// Dependency=(ownedRelationship+=PrefixMetadataAnnotation)*'dependency'DependencyDeclarationRelationshipBody /// - /// The used to query textual notation of referenced - public DependencyTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDependency(SysML2.NET.Core.POCO.Root.Dependencies.IDependency poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Dependencies.Dependency poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Dependency=(ownedRelationship+=PrefixMetadataAnnotation)*'dependency'DependencyDeclarationRelationshipBody + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element stringBuilder.Append("dependency "); - // non Terminal : DependencyDeclaration; Found rule DependencyDeclaration=(Identification'from')?client+=[QualifiedName](','client+=[QualifiedName])*'to'supplier+=[QualifiedName](','supplier+=[QualifiedName])* - - - - - - - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' - - - - + // non Terminal : DependencyDeclaration; Found rule DependencyDeclaration=(Identification'from')?client+=[QualifiedName](','client+=[QualifiedName])*'to'supplier+=[QualifiedName](','supplier+=[QualifiedName])* + // Group Element + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append("from "); + + // Assignment Element : client += SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property client value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : client += SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property client value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + + stringBuilder.Append("to "); + // Assignment Element : supplier += SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property supplier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : supplier += SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property supplier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + + + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs index befe8581..bc3d0f48 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs @@ -29,34 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class DifferencingTextualNotationBuilder : TextualNotationBuilder + public static partial class DifferencingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Differencing + /// Differencing=differencingType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain /// - /// The used to query textual notation of referenced - public DifferencingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDifferencing(SysML2.NET.Core.POCO.Core.Types.IDifferencing poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Differencing poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Differencing=differencingType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain - - - - // Assignment Element : differencingType = - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs index ca8bc185..05c0f019 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs @@ -29,40 +29,43 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class DisjoiningTextualNotationBuilder : TextualNotationBuilder + public static partial class DisjoiningTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedDisjoining + /// OwnedDisjoining:Disjoining=disjoiningType=[QualifiedName]|disjoiningType=FeatureChain{ownedRelatedElement+=disjoiningType} /// - /// The used to query textual notation of referenced - public DisjoiningTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule Disjoining + /// Disjoining=('disjoining'Identification)?'disjoint'(typeDisjoined=[QualifiedName]|typeDisjoined=FeatureChain{ownedRelatedElement+=typeDisjoined})'from'(disjoiningType=[QualifiedName]|disjoiningType=FeatureChain{ownedRelatedElement+=disjoiningType})RelationshipBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Disjoining poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Disjoining=('disjoining'Identification)?'disjoint'(typeDisjoined=[QualifiedName]|typeDisjoined=FeatureChain{ownedRelatedElement+=typeDisjoined})'from'(disjoiningType=[QualifiedName]|disjoiningType=FeatureChain{ownedRelatedElement+=disjoiningType})RelationshipBody + // Group Element + stringBuilder.Append("disjoining "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element stringBuilder.Append("disjoint "); - // Group Element + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append("from "); - // Group Element - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); - - - - - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs index 9f77279d..8d6a6429 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs @@ -29,38 +29,29 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class DocumentationTextualNotationBuilder : TextualNotationBuilder + public static partial class DocumentationTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Documentation + /// Documentation='doc'Identification('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT /// - /// The used to query textual notation of referenced - public DocumentationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDocumentation(SysML2.NET.Core.POCO.Root.Annotations.IDocumentation poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.Documentation poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Documentation='doc'Identification('locale'locale=STRING_VALUE)?body=REGULAR_COMMENT - - - stringBuilder.Append("doc "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + // Group Element + stringBuilder.Append("locale "); + // Assignment Element : locale = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property locale value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element // Assignment Element : body = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property body value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs index c94f4d5a..424a25f2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs @@ -29,28 +29,40 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ElementFilterMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class ElementFilterMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ElementFilterMember + /// ElementFilterMember:ElementFilterMembership=MemberPrefix'filter'ownedRelatedElement+=OwnedExpression';' /// - /// The used to query textual notation of referenced - public ElementFilterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, StringBuilder stringBuilder) { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("filter "); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("; "); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule FilterPackageMember + /// FilterPackageMember:ElementFilterMembership='['ownedRelatedElement+=OwnedExpression']' /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Packages.ElementFilterMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFilterPackageMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + stringBuilder.Append("[ "); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("] "); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs new file mode 100644 index 00000000..f06f98ff --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs @@ -0,0 +1,105 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ElementTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Identification + /// Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIdentification(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + // Group Element + stringBuilder.Append("< "); + // Assignment Element : declaredShortName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property declaredShortName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("> "); + + // Group Element + // Assignment Element : declaredName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property declaredName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule DefinitionElement + /// DefinitionElement:Element=Package|LibraryPackage|AnnotatingElement|Dependency|AttributeDefinition|EnumerationDefinition|OccurrenceDefinition|IndividualDefinition|ItemDefinition|PartDefinition|ConnectionDefinition|FlowDefinition|InterfaceDefinition|PortDefinition|ActionDefinition|CalculationDefinition|StateDefinition|ConstraintDefinition|RequirementDefinition|ConcernDefinition|CaseDefinition|AnalysisCaseDefinition|VerificationCaseDefinition|UseCaseDefinition|ViewDefinition|ViewpointDefinition|RenderingDefinition|MetadataDefinition|ExtendedDefinition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule OwnedRelatedElement + /// OwnedRelatedElement:Element=NonFeatureElement|FeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedRelatedElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule MemberElement + /// MemberElement:Element=AnnotatingElement|NonFeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMemberElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureElement + /// NonFeatureElement:Element=Dependency|Namespace|Type|Classifier|DataType|Class|Structure|Metaclass|Association|AssociationStructure|Interaction|Behavior|Function|Predicate|Multiplicity|Package|LibraryPackage|Specialization|Conjugation|Subclassification|Disjoining|FeatureInverting|FeatureTyping|Subsetting|Redefinition|TypeFeaturing + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs index aff631e9..6b868048 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs @@ -29,28 +29,73 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class EndFeatureMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class EndFeatureMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SourceEndMember + /// SourceEndMember:EndFeatureMembership=ownedRelatedElement+=SourceEnd /// - /// The used to query textual notation of referenced - public EndFeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ConnectorEndMember + /// ConnectorEndMember:EndFeatureMembership=ownedRelatedElement+=ConnectorEnd + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule InterfaceEndMember + /// InterfaceEndMember:EndFeatureMembership=ownedRelatedElement+=InterfaceEnd + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FlowEndMember + /// FlowEndMember:EndFeatureMembership=ownedRelatedElement+=FlowEnd + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule EmptyEndMember + /// EmptyEndMember:EndFeatureMembership=ownedRelatedElement+=EmptyFeature /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.EndFeatureMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs index 6aa8a491..c89f0f5d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs @@ -29,41 +29,38 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class EnumerationDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class EnumerationDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule EnumerationBody + /// EnumerationBody:EnumerationDefinition=';'|'{'(ownedRelationship+=AnnotatingMember|ownedRelationship+=EnumerationUsageMember)*'}' /// - /// The used to query textual notation of referenced - public EnumerationDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumerationBody(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationDefinition poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule EnumerationDefinition + /// EnumerationDefinition=DefinitionExtensionKeyword*'enum''def'DefinitionDeclarationEnumerationBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationDefinition poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumerationDefinition(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationDefinition poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : EnumerationDefinition=DefinitionExtensionKeyword*'enum''def'DefinitionDeclarationEnumerationBody - - // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember - - + // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, stringBuilder); stringBuilder.Append("enum "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : EnumerationBody; Found rule EnumerationBody:EnumerationDefinition=';'|'{'(ownedRelationship+=AnnotatingMember|ownedRelationship+=EnumerationUsageMember)*'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : EnumerationBody; Found rule EnumerationBody:EnumerationDefinition=';'|'{'(ownedRelationship+=AnnotatingMember|ownedRelationship+=EnumerationUsageMember)*'}' + BuildEnumerationBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs index 15303836..b81e8827 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs @@ -29,41 +29,38 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class EnumerationUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class EnumerationUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule EnumeratedValue + /// EnumeratedValue:EnumerationUsage='enum'?Usage /// - /// The used to query textual notation of referenced - public EnumerationUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumeratedValue(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, StringBuilder stringBuilder) { + stringBuilder.Append("enum "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule EnumerationUsage + /// EnumerationUsage:EnumerationUsage=UsagePrefix'enum'Usage /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumerationUsage(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : EnumerationUsage:EnumerationUsage=UsagePrefix'enum'Usage - - - - - - // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* - - + // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); stringBuilder.Append("enum "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion - - + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs index 6c8698a2..9514b705 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs @@ -29,40 +29,39 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class EventOccurrenceUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class EventOccurrenceUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule MessageEvent + /// MessageEvent:EventOccurrenceUsage=ownedRelationship+=OwnedReferenceSubsetting /// - /// The used to query textual notation of referenced - public EventOccurrenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule EventOccurrenceUsage + /// EventOccurrenceUsage=OccurrenceUsagePrefix'event'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'occurrence'UsageDeclaration?)UsageCompletion /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Occurrences.EventOccurrenceUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEventOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : EventOccurrenceUsage=OccurrenceUsagePrefix'event'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'occurrence'UsageDeclaration?)UsageCompletion - - - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("event "); - // Group Element - // non Terminal : UsageCompletion; Found rule UsageCompletion:Usage=ValuePart?UsageBody - - + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : UsageCompletion; Found rule UsageCompletion:Usage=ValuePart?UsageBody + UsageTextualNotationBuilder.BuildUsageCompletion(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs index 78bc6c40..8de84ad5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs @@ -29,43 +29,28 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ExhibitStateUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ExhibitStateUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ExhibitStateUsage + /// ExhibitStateUsage=OccurrenceUsagePrefix'exhibit'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'state'UsageDeclaration)ValuePart?StateUsageBody /// - /// The used to query textual notation of referenced - public ExhibitStateUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExhibitStateUsage(SysML2.NET.Core.POCO.Systems.States.IExhibitStateUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.ExhibitStateUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ExhibitStateUsage=OccurrenceUsagePrefix'exhibit'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'state'UsageDeclaration)ValuePart?StateUsageBody - - - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("exhibit "); - // Group Element - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue - - - // non Terminal : StateUsageBody; Found rule StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' - - + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : StateUsageBody; Found rule StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' + StateUsageTextualNotationBuilder.BuildStateUsageBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs new file mode 100644 index 00000000..af3d7bf2 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs @@ -0,0 +1,56 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ExposeTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule Expose + /// Expose='expose'(MembershipExpose|NamespaceExpose)RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExpose(SysML2.NET.Core.POCO.Systems.Views.IExpose poco, StringBuilder stringBuilder) + { + stringBuilder.Append("expose "); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs index 51a81d68..4a1d9406 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs @@ -29,47 +29,132 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class ExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedExpression + /// OwnedExpression:Expression=ConditionalExpression|ConditionalBinaryOperatorExpression|BinaryOperatorExpression|UnaryOperatorExpression|ClassificationExpression|MetaclassificationExpression|ExtentExpression|PrimaryExpression /// - /// The used to query textual notation of referenced - public ExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule PrimaryExpression + /// PrimaryExpression:Expression=FeatureChainExpression|NonFeatureChainPrimaryExpression /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Expression poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrimaryExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Expression=FeaturePrefix'expr'FeatureDeclarationValuePart?FunctionBody - + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule NonFeatureChainPrimaryExpression + /// NonFeatureChainPrimaryExpression:Expression=BracketExpression|IndexExpression|SequenceExpression|SelectExpression|CollectExpression|FunctionOperationExpression|BaseExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureChainPrimaryExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + /// + /// Builds the Textual Notation string for the rule SequenceExpression + /// SequenceExpression:Expression='('SequenceExpressionList')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSequenceExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + stringBuilder.Append("( "); + // non Terminal : SequenceExpressionList; Found rule SequenceExpressionList:Expression=OwnedExpression','?|SequenceOperatorExpression + BuildSequenceExpressionList(poco, stringBuilder); + stringBuilder.Append(") "); + } + /// + /// Builds the Textual Notation string for the rule SequenceExpressionList + /// SequenceExpressionList:Expression=OwnedExpression','?|SequenceOperatorExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSequenceExpressionList(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule FunctionReference + /// FunctionReference:Expression=ownedRelationship+=ReferenceTyping + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionReference(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("expr "); - // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + } + /// + /// Builds the Textual Notation string for the rule BaseExpression + /// BaseExpression:Expression=NullExpression|LiteralExpression|FeatureReferenceExpression|MetadataAccessExpression|InvocationExpression|ConstructorExpression|BodyExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBaseExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + /// + /// Builds the Textual Notation string for the rule ExpressionBody + /// ExpressionBody:Expression='{'FunctionBodyPart'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExpressionBody(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + stringBuilder.Append("{ "); + // non Terminal : FunctionBodyPart; Found rule FunctionBodyPart:Type=(TypeBodyElement|ownedRelationship+=ReturnFeatureMember)*(ownedRelationship+=ResultExpressionMember)? + TypeTextualNotationBuilder.BuildFunctionBodyPart(poco, stringBuilder); + stringBuilder.Append("} "); + } - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + /// + /// Builds the Textual Notation string for the rule Expression + /// Expression=FeaturePrefix'expr'FeatureDeclarationValuePart?FunctionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) + { + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("expr "); + // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs index 94789d10..f4f46550 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs @@ -29,33 +29,24 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FeatureChainExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class FeatureChainExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule FeatureChainExpression + /// FeatureChainExpression=ownedRelationship+=NonFeatureChainPrimaryArgumentMember'.'ownedRelationship+=FeatureChainMember /// - /// The used to query textual notation of referenced - public FeatureChainExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureChainExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureChainExpression poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.FeatureChainExpression poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : FeatureChainExpression=ownedRelationship+=NonFeatureChainPrimaryArgumentMember'.'ownedRelationship+=FeatureChainMember - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append(". "); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs index 13e6303f..dd4c6b8a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs @@ -29,28 +29,21 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FeatureChainingTextualNotationBuilder : TextualNotationBuilder + public static partial class FeatureChainingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedFeatureChaining + /// OwnedFeatureChaining:FeatureChaining=chainingFeature=[QualifiedName] /// - /// The used to query textual notation of referenced - public FeatureChainingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureChaining(SysML2.NET.Core.POCO.Core.Features.IFeatureChaining poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.FeatureChaining poco) - { - var stringBuilder = new StringBuilder(); + // Assignment Element : chainingFeature = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property chainingFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs new file mode 100644 index 00000000..0c5a9609 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs @@ -0,0 +1,51 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class FeatureDirectionKindTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule FeatureDirection + /// FeatureDirection:FeatureDirectionKind='in'|'out'|'inout' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureDirection(SysML2.NET.Core.Core.Types.FeatureDirectionKind poco, StringBuilder stringBuilder) + { + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs index 1081e8d4..0e3118a2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs @@ -29,40 +29,43 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FeatureInvertingTextualNotationBuilder : TextualNotationBuilder + public static partial class FeatureInvertingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedFeatureInverting + /// OwnedFeatureInverting:FeatureInverting=invertingFeature=[QualifiedName]|invertingFeature=OwnedFeatureChain{ownedRelatedElement+=invertingFeature} /// - /// The used to query textual notation of referenced - public FeatureInvertingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule FeatureInverting + /// FeatureInverting=('inverting'Identification?)?'inverse'(featureInverted=[QualifiedName]|featureInverted=OwnedFeatureChain{ownedRelatedElement+=featureInverted})'of'(invertingFeature=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain{ownedRelatedElement+=invertingFeature})RelationshipBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.FeatureInverting poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : FeatureInverting=('inverting'Identification?)?'inverse'(featureInverted=[QualifiedName]|featureInverted=OwnedFeatureChain{ownedRelatedElement+=featureInverted})'of'(invertingFeature=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain{ownedRelatedElement+=invertingFeature})RelationshipBody + // Group Element + stringBuilder.Append("inverting "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element stringBuilder.Append("inverse "); - // Group Element + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append("of "); - // Group Element - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); - - - - - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs index a0ef9280..c88c60e5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -29,28 +29,403 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FeatureMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class FeatureMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule NonOccurrenceUsageMember + /// NonOccurrenceUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=NonOccurrenceUsageElement /// - /// The used to query textual notation of referenced - public FeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule OccurrenceUsageMember + /// OccurrenceUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=OccurrenceUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule StructureUsageMember + /// StructureUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=StructureUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule BehaviorUsageMember + /// BehaviorUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=BehaviorUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule SourceSuccessionMember + /// SourceSuccessionMember:FeatureMembership='then'ownedRelatedElement+=SourceSuccession + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + stringBuilder.Append("then "); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule InterfaceNonOccurrenceUsageMember + /// InterfaceNonOccurrenceUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=InterfaceNonOccurrenceUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule InterfaceOccurrenceUsageMember + /// InterfaceOccurrenceUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=InterfaceOccurrenceUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FlowPayloadFeatureMember + /// FlowPayloadFeatureMember:FeatureMembership=ownedRelatedElement+=FlowPayloadFeature + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FlowFeatureMember + /// FlowFeatureMember:FeatureMembership=ownedRelatedElement+=FlowFeature + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ActionBehaviorMember + /// ActionBehaviorMember:FeatureMembership=BehaviorUsageMember|ActionNodeMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionBehaviorMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule InitialNodeMember + /// InitialNodeMember:FeatureMembership=MemberPrefix'first'memberFeature=[QualifiedName]RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInitialNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("first "); + // Assignment Element : memberFeature = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + BuildMemberFeature(poco, stringBuilder); + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ActionNodeMember + /// ActionNodeMember:FeatureMembership=MemberPrefixownedRelatedElement+=ActionNode + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ActionTargetSuccessionMember + /// ActionTargetSuccessionMember:FeatureMembership=MemberPrefixownedRelatedElement+=ActionTargetSuccession + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule GuardedSuccessionMember + /// GuardedSuccessionMember:FeatureMembership=MemberPrefixownedRelatedElement+=GuardedSuccession + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ForVariableDeclarationMember + /// ForVariableDeclarationMember:FeatureMembership=ownedRelatedElement+=UsageDeclaration + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule EntryTransitionMember + /// EntryTransitionMember:FeatureMembership=MemberPrefix(ownedRelatedElement+=GuardedTargetSuccession|'then'ownedRelatedElement+=TargetSuccession)';' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEntryTransitionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append("; "); + + } + + /// + /// Builds the Textual Notation string for the rule TransitionUsageMember + /// TransitionUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=TransitionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule TargetTransitionUsageMember + /// TargetTransitionUsageMember:FeatureMembership=MemberPrefixownedRelatedElement+=TargetTransitionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule MetadataBodyUsageMember + /// MetadataBodyUsageMember:FeatureMembership=ownedMemberFeature=MetadataBodyUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule OwnedFeatureMember + /// OwnedFeatureMember:FeatureMembership=MemberPrefixownedRelatedElement+=FeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule OwnedExpressionReferenceMember + /// OwnedExpressionReferenceMember:FeatureMembership=ownedRelationship+=OwnedExpressionReference + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedExpressionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule OwnedExpressionMember + /// OwnedExpressionMember:FeatureMembership=ownedFeatureMember=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedExpressionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedFeatureMember = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + BuildOwnedFeatureMember(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SequenceExpressionListMember + /// SequenceExpressionListMember:FeatureMembership=ownedMemberFeature=SequenceExpressionList + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSequenceExpressionListMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FunctionReferenceMember + /// FunctionReferenceMember:FeatureMembership=ownedMemberFeature=FunctionReference + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule NamedArgumentMember + /// NamedArgumentMember:FeatureMembership=ownedMemberFeature=NamedArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamedArgumentMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ExpressionBodyMember + /// ExpressionBodyMember:FeatureMembership=ownedMemberFeature=ExpressionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule PayloadFeatureMember + /// PayloadFeatureMember:FeatureMembership=ownedRelatedElement=PayloadFeature + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule MetadataBodyFeatureMember + /// MetadataBodyFeatureMember:FeatureMembership=ownedMemberFeature=MetadataBodyFeature /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.FeatureMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs index ed784336..90934ea6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs @@ -29,32 +29,75 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FeatureReferenceExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class FeatureReferenceExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SatisfactionReferenceExpression + /// SatisfactionReferenceExpression:FeatureReferenceExpression=ownedRelationship+=FeatureChainMember /// - /// The used to query textual notation of referenced - public FeatureReferenceExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule OwnedExpressionReference + /// OwnedExpressionReference:FeatureReferenceExpression=ownedRelationship+=OwnedExpressionMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.FeatureReferenceExpression poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : FeatureReferenceExpression:FeatureReferenceExpression=ownedRelationship+=FeatureReferenceMemberownedRelationship+=EmptyResultMember + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FunctionReferenceExpression + /// FunctionReferenceExpression:FeatureReferenceExpression=ownedRelationship+=FunctionReferenceMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + /// + /// Builds the Textual Notation string for the rule FeatureReferenceExpression + /// FeatureReferenceExpression:FeatureReferenceExpression=ownedRelationship+=FeatureReferenceMemberownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule BodyExpression + /// BodyExpression:FeatureReferenceExpression=ownedRelationship+=ExpressionBodyMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBodyExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) + { // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs index 4c4f36b9..53b9088e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs @@ -29,39 +29,667 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FeatureTextualNotationBuilder : TextualNotationBuilder + public static partial class FeatureTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ValuePart + /// ValuePart:Feature=ownedRelationship+=FeatureValue /// - /// The used to query textual notation of referenced - public FeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FeatureSpecializationPart + /// FeatureSpecializationPart:Feature=FeatureSpecialization+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureSpecializationPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FeatureSpecialization + /// FeatureSpecialization:Feature=Typings|Subsettings|References|Crosses|Redefinitions + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureSpecialization(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule Typings + /// Typings:Feature=TypedBy(','ownedRelationship+=FeatureTyping)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // non Terminal : TypedBy; Found rule TypedBy:Feature=DEFINED_BYownedRelationship+=FeatureTyping + BuildTypedBy(poco, stringBuilder); + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule TypedBy + /// TypedBy:Feature=DEFINED_BYownedRelationship+=FeatureTyping + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // non Terminal : DEFINED_BY; Found rule DEFINED_BY=':'|'defined''by' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule Subsettings + /// Subsettings:Feature=Subsets(','ownedRelationship+=OwnedSubsetting)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // non Terminal : Subsets; Found rule Subsets:Feature=SUBSETSownedRelationship+=OwnedSubsetting + BuildSubsets(poco, stringBuilder); + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule Subsets + /// Subsets:Feature=SUBSETSownedRelationship+=OwnedSubsetting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // non Terminal : SUBSETS; Found rule SUBSETS=':>'|'subsets' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule References + /// References:Feature=REFERENCESownedRelationship+=OwnedReferenceSubsetting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // non Terminal : REFERENCES; Found rule REFERENCES='::>'|'references' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule Crosses + /// Crosses:Feature=CROSSESownedRelationship+=OwnedCrossSubsetting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // non Terminal : CROSSES; Found rule CROSSES='=>'|'crosses' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule Redefinitions + /// Redefinitions:Feature=Redefines(','ownedRelationship+=OwnedRedefinition)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // non Terminal : Redefines; Found rule Redefines:Feature=REDEFINESownedRelationship+=OwnedRedefinition + BuildRedefines(poco, stringBuilder); + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule Redefines + /// Redefines:Feature=REDEFINESownedRelationship+=OwnedRedefinition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // non Terminal : REDEFINES; Found rule REDEFINES=':>>'|'redefines' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule OwnedFeatureChain + /// OwnedFeatureChain:Feature=ownedRelationship+=OwnedFeatureChaining('.'ownedRelationship+=OwnedFeatureChaining)+ + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(". "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule MultiplicityPart + /// MultiplicityPart:Feature=ownedRelationship+=OwnedMultiplicity|(ownedRelationship+=OwnedMultiplicity)?(isOrdered?='ordered'({isUnique=false}'nonunique')?|{isUnique=false}'nonunique'(isOrdered?='ordered')?) + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicityPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule OwnedCrossMultiplicity + /// OwnedCrossMultiplicity:Feature=ownedRelationship+=OwnedMultiplicity + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedCrossMultiplicity(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule PayloadFeature + /// PayloadFeature:Feature=Identification?PayloadFeatureSpecializationPartValuePart?|ownedRelationship+=OwnedFeatureTyping(ownedRelationship+=OwnedMultiplicity)?|ownedRelationship+=OwnedMultiplicityownedRelationship+=OwnedFeatureTyping + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPayloadFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule PayloadFeatureSpecializationPart + /// PayloadFeatureSpecializationPart:Feature=(FeatureSpecialization)+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization+ + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPayloadFeatureSpecializationPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FeatureChainPrefix + /// FeatureChainPrefix:Feature=(ownedRelationship+=OwnedFeatureChaining'.')+ownedRelationship+=OwnedFeatureChaining'.' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(". "); + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(". "); + + } + + /// + /// Builds the Textual Notation string for the rule TriggerValuePart + /// TriggerValuePart:Feature=ownedRelationship+=TriggerFeatureValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule Argument + /// Argument:Feature=ownedRelationship+=ArgumentValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ArgumentExpression + /// ArgumentExpression:Feature=ownedRelationship+=ArgumentExpressionValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgumentExpression(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FeatureElement + /// FeatureElement:Feature=Feature|Step|Expression|BooleanExpression|Invariant|Connector|BindingConnector|Succession|Flow|SuccessionFlow + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureElement(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule EndFeaturePrefix + /// EndFeaturePrefix:Feature=(isConstant?='const'{isVariable=true})?isEnd?='end' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : isConstant ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isConstant value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Assignment Element : isVariable = true + + // Assignment Element : isEnd ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isEnd value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule BasicFeaturePrefix + /// BasicFeaturePrefix:Feature=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract')?(isComposite?='composite'|isPortion?='portion')?(isVariable?='var'|isConstant?='const'{isVariable=true})? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBasicFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : direction = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property direction value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + // Group Element + // Assignment Element : isDerived ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isDerived value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + // Group Element + // Assignment Element : isAbstract ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isAbstract value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + + } + + /// + /// Builds the Textual Notation string for the rule FeatureDeclaration + /// FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureDeclaration(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : isSufficient ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isSufficient value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : FeatureRelationshipPart; Found rule FeatureRelationshipPart:Feature=TypeRelationshipPart|ChainingPart|InvertingPart|TypeFeaturingPart + BuildFeatureRelationshipPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule FeatureIdentification + /// FeatureIdentification:Feature='<'declaredShortName=NAME'>'(declaredName=NAME)?|declaredName=NAME + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureIdentification(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FeatureRelationshipPart + /// FeatureRelationshipPart:Feature=TypeRelationshipPart|ChainingPart|InvertingPart|TypeFeaturingPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureRelationshipPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ChainingPart + /// ChainingPart:Feature='chains'(ownedRelationship+=OwnedFeatureChaining|FeatureChain) + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildChainingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + stringBuilder.Append("chains "); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + + } + + /// + /// Builds the Textual Notation string for the rule InvertingPart + /// InvertingPart:Feature='inverse''of'ownedRelationship+=OwnedFeatureInverting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInvertingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + stringBuilder.Append("inverse "); + stringBuilder.Append("of "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule TypeFeaturingPart + /// TypeFeaturingPart:Feature='featured''by'ownedRelationship+=OwnedTypeFeaturing(','ownedTypeFeaturing+=OwnedTypeFeaturing)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + stringBuilder.Append("featured "); + stringBuilder.Append("by "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedTypeFeaturing += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedTypeFeaturing value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule FeatureChain + /// FeatureChain:Feature=ownedRelationship+=OwnedFeatureChaining('.'ownedRelationship+=OwnedFeatureChaining)+ + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(". "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule MetadataArgument + /// MetadataArgument:Feature=ownedRelationship+=MetadataValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule TypeReference + /// TypeReference:Feature=ownedRelationship+=ReferenceTyping + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule PrimaryArgument + /// PrimaryArgument:Feature=ownedRelationship+=PrimaryArgumentValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureChainPrimaryArgument + /// NonFeatureChainPrimaryArgument:Feature=ownedRelationship+=NonFeatureChainPrimaryArgumentValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule BodyArgument + /// BodyArgument:Feature=ownedRelationship+=BodyArgumentValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule FunctionReferenceArgument + /// FunctionReferenceArgument:Feature=ownedRelationship+=FunctionReferenceArgumentValue /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.Feature poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Feature=(FeaturePrefix('feature'|ownedRelationship+=PrefixMetadataMember)FeatureDeclaration?|(EndFeaturePrefix|BasicFeaturePrefix)FeatureDeclaration)ValuePart?TypeBody + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } + /// + /// Builds the Textual Notation string for the rule FeatureReference + /// FeatureReference:Feature=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Value Literal Element : [QualifiedName] - // Group Element - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + } + /// + /// Builds the Textual Notation string for the rule ConstructorResult + /// ConstructorResult:Feature=ArgumentList + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstructorResult(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // non Terminal : ArgumentList; Found rule ArgumentList:Feature='('(PositionalArgumentList|NamedArgumentList)?')' + BuildArgumentList(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + } + /// + /// Builds the Textual Notation string for the rule ArgumentList + /// ArgumentList:Feature='('(PositionalArgumentList|NamedArgumentList)?')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + stringBuilder.Append("( "); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(") "); + } + + /// + /// Builds the Textual Notation string for the rule PositionalArgumentList + /// PositionalArgumentList:Feature=e.ownedRelationship+=ArgumentMember(','e.ownedRelationship+=ArgumentMember)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule NamedArgumentList + /// NamedArgumentList:Feature=ownedRelationship+=NamedArgumentMember(','ownedRelationship+=NamedArgumentMember)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule NamedArgument + /// NamedArgument:Feature=ownedRelationship+=ParameterRedefinition'='ownedRelationship+=ArgumentValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("= "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule MetadataBodyFeature + /// MetadataBodyFeature:Feature='feature'?(':>>'|'redefines')?ownedRelationship+=OwnedRedefinitionFeatureSpecializationPart?ValuePart?MetadataBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + stringBuilder.Append("feature "); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : FeatureSpecializationPart; Found rule FeatureSpecializationPart:Feature=FeatureSpecialization+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization* + BuildFeatureSpecializationPart(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + BuildValuePart(poco, stringBuilder); + // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule Feature + /// Feature=(FeaturePrefix('feature'|ownedRelationship+=PrefixMetadataMember)FeatureDeclaration?|(EndFeaturePrefix|BasicFeaturePrefix)FeatureDeclaration)ValuePart?TypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) + { + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + BuildValuePart(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs index d9e9034d..8a3bcb35 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs @@ -29,49 +29,43 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FeatureTypingTextualNotationBuilder : TextualNotationBuilder + public static partial class FeatureTypingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedFeatureTyping + /// OwnedFeatureTyping:FeatureTyping=type=[QualifiedName]|type=OwnedFeatureChain{ownedRelatedElement+=type} /// - /// The used to query textual notation of referenced - public FeatureTypingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule ReferenceTyping + /// ReferenceTyping:FeatureTyping=type=[QualifiedName] /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.FeatureTyping poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReferenceTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : FeatureTyping=OwnedFeatureTyping|ConjugatedPortTyping - - // non Terminal : OwnedFeatureTyping; Found rule OwnedFeatureTyping:FeatureTyping=type=[QualifiedName]|type=OwnedFeatureChain{ownedRelatedElement+=type} - - - // non Terminal : ConjugatedPortTyping; Found rule ConjugatedPortTyping:ConjugatedPortTyping='~'originalPortDefinition=~[QualifiedName] - - - - - - - - - - - - - - + // Assignment Element : type = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property type value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + } - return stringBuilder.ToString(); + /// + /// Builds the Textual Notation string for the rule FeatureTyping + /// FeatureTyping=OwnedFeatureTyping|ConjugatedPortTyping + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs index 1a64bd05..d2ba52fb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs @@ -29,37 +29,166 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FeatureValueTextualNotationBuilder : TextualNotationBuilder + public static partial class FeatureValueTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule TriggerFeatureValue + /// TriggerFeatureValue:FeatureValue=ownedRelatedElement+=TriggerExpression /// - /// The used to query textual notation of referenced - public FeatureValueTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ArgumentValue + /// ArgumentValue:FeatureValue=value=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ArgumentExpressionValue + /// ArgumentExpressionValue:FeatureValue=ownedRelatedElement+=OwnedExpressionReference + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FeatureBinding + /// FeatureBinding:FeatureValue=ownedRelatedElement+=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule AssignmentTargetBinding + /// AssignmentTargetBinding:FeatureValue=ownedRelatedElement+=NonFeatureChainPrimaryExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule SatisfactionFeatureValue + /// SatisfactionFeatureValue:FeatureValue=ownedRelatedElement+=SatisfactionReferenceExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule MetadataValue + /// MetadataValue:FeatureValue=value=MetadataReference + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule PrimaryArgumentValue + /// PrimaryArgumentValue:FeatureValue=value=PrimaryExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule NonFeatureChainPrimaryArgumentValue + /// NonFeatureChainPrimaryArgumentValue:FeatureValue=value=NonFeatureChainPrimaryExpression /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.FeatureValues.FeatureValue poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureChainPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : FeatureValue=('='|isInitial?=':='|isDefault?='default'('='|isInitial?=':=')?)ownedRelatedElement+=OwnedExpression + // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } + /// + /// Builds the Textual Notation string for the rule BodyArgumentValue + /// BodyArgumentValue:FeatureValue=value=BodyExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBodyArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } + /// + /// Builds the Textual Notation string for the rule FunctionReferenceArgumentValue + /// FunctionReferenceArgumentValue:FeatureValue=value=FunctionReferenceExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionReferenceArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } - // Group Element + /// + /// Builds the Textual Notation string for the rule FeatureValue + /// FeatureValue=('='|isInitial?=':='|isDefault?='default'('='|isInitial?=':=')?)ownedRelatedElement+=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) + { + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs index e1796899..d1bf3698 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs @@ -29,38 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FlowDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class FlowDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule FlowDefinition + /// FlowDefinition=OccurrenceDefinitionPrefix'flow''def'Definition /// - /// The used to query textual notation of referenced - public FlowDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowDefinition(SysML2.NET.Core.POCO.Systems.Flows.IFlowDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Flows.FlowDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : FlowDefinition=OccurrenceDefinitionPrefix'flow''def'Definition - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("flow "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs index 18b5d6a0..1b58aab6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs @@ -29,32 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FlowEndTextualNotationBuilder : TextualNotationBuilder + public static partial class FlowEndTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule FlowEnd + /// FlowEnd=(ownedRelationship+=FlowEndSubsetting)?ownedRelationship+=FlowFeatureMember /// - /// The used to query textual notation of referenced - public FlowEndTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowEnd(SysML2.NET.Core.POCO.Kernel.Interactions.IFlowEnd poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.FlowEnd poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : FlowEnd=(ownedRelationship+=FlowEndSubsetting)?ownedRelationship+=FlowFeatureMember + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs index 83cfede0..d76d86df 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs @@ -29,42 +29,32 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FlowTextualNotationBuilder : TextualNotationBuilder + public static partial class FlowTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Flow + /// Flow=FeaturePrefix'flow'FlowDeclarationTypeBody /// - /// The used to query textual notation of referenced - public FlowTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlow(SysML2.NET.Core.POCO.Kernel.Interactions.IFlow poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.Flow poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Flow=FeaturePrefix'flow'FlowDeclarationTypeBody - - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("flow "); - // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs index 8a12225f..43644f24 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs @@ -29,40 +29,67 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FlowUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class FlowUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Message + /// Message:FlowUsage=OccurrenceUsagePrefix'message'MessageDeclarationDefinitionBody{isAbstract=true} /// - /// The used to query textual notation of referenced - public FlowUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMessage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, StringBuilder stringBuilder) { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("message "); + // non Terminal : MessageDeclaration; Found rule MessageDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=MessageEventMember'to'ownedRelationship+=MessageEventMember)?|ownedRelationship+=MessageEventMember'to'ownedRelationship+=MessageEventMember + BuildMessageDeclaration(poco, stringBuilder); + // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); + // Assignment Element : isAbstract = true + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule MessageDeclaration + /// MessageDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=MessageEventMember'to'ownedRelationship+=MessageEventMember)?|ownedRelationship+=MessageEventMember'to'ownedRelationship+=MessageEventMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Flows.FlowUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMessageDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : FlowUsage=OccurrenceUsagePrefix'flow'FlowDeclarationDefinitionBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule FlowDeclaration + /// FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule FlowUsage + /// FlowUsage=OccurrenceUsagePrefix'flow'FlowDeclarationDefinitionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("flow "); - // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember - - - // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' - - + // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + BuildFlowDeclaration(poco, stringBuilder); + // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs index c3d723d8..bba3ffc9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs @@ -29,28 +29,29 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ForLoopActionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ForLoopActionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ForLoopNode + /// ForLoopNode:ForLoopActionUsage=ActionNodePrefix'for'ownedRelationship+=ForVariableDeclarationMember'in'ownedRelationship+=NodeParameterMemberownedRelationship+=ActionBodyParameterMember /// - /// The used to query textual notation of referenced - public ForLoopActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildForLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IForLoopActionUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ForLoopActionUsage poco) - { - var stringBuilder = new StringBuilder(); + // non Terminal : ActionNodePrefix; Found rule ActionNodePrefix:ActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration? + ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); + stringBuilder.Append("for "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("in "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs index 80472fca..ec9f26d1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs @@ -29,42 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ForkNodeTextualNotationBuilder : TextualNotationBuilder + public static partial class ForkNodeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ForkNode + /// ForkNode=ControlNodePrefixisComposite?='fork'UsageDeclarationActionBody /// - /// The used to query textual notation of referenced - public ForkNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildForkNode(SysML2.NET.Core.POCO.Systems.Actions.IForkNode poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.ForkNode poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ForkNode=ControlNodePrefixisComposite?='fork'UsageDeclarationActionBody - - - - // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - - - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' - - + // If property isComposite value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs index dd0b5794..c2d50f48 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs @@ -29,28 +29,24 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FramedConcernMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class FramedConcernMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule FramedConcernMember + /// FramedConcernMember:FramedConcernMembership=MemberPrefix?'frame'ownedRelatedElement+=FramedConcernUsage /// - /// The used to query textual notation of referenced - public FramedConcernMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFramedConcernMember(SysML2.NET.Core.POCO.Systems.Requirements.IFramedConcernMembership poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.FramedConcernMembership poco) - { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("frame "); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs index bac8b85a..26af9410 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs @@ -29,40 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class FunctionTextualNotationBuilder : TextualNotationBuilder + public static partial class FunctionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Function + /// Function=TypePrefix'function'ClassifierDeclarationFunctionBody /// - /// The used to query textual notation of referenced - public FunctionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunction(SysML2.NET.Core.POCO.Kernel.Functions.IFunction poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Function poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Function=TypePrefix'function'ClassifierDeclarationFunctionBody - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("function "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs index f4c33922..a70f729c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs @@ -29,28 +29,31 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class IfActionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class IfActionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule IfNode + /// IfNode:IfActionUsage=ActionNodePrefix'if'ownedRelationship+=ExpressionParameterMemberownedRelationship+=ActionBodyParameterMember('else'ownedRelationship+=(ActionBodyParameterMember|IfNodeParameterMember))? /// - /// The used to query textual notation of referenced - public IfActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIfNode(SysML2.NET.Core.POCO.Systems.Actions.IIfActionUsage poco, StringBuilder stringBuilder) { - } + // non Terminal : ActionNodePrefix; Found rule ActionNodePrefix:ActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration? + ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); + stringBuilder.Append("if "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append("else "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.GroupElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.GroupElement - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.IfActionUsage poco) - { - var stringBuilder = new StringBuilder(); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs new file mode 100644 index 00000000..a380989d --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs @@ -0,0 +1,73 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class ImportTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule ImportDeclaration + /// ImportDeclaration:Import=MembershipImport|NamespaceImport + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildImportDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule Import + /// Import=visibility=VisibilityIndicator'import'(isImportAll?='all')?ImportDeclarationRelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildImport(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco, StringBuilder stringBuilder) + { + // Assignment Element : visibility = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property visibility value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("import "); + // Group Element + // Assignment Element : isImportAll ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isImportAll value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + // non Terminal : ImportDeclaration; Found rule ImportDeclaration:Import=MembershipImport|NamespaceImport + BuildImportDeclaration(poco, stringBuilder); + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs index 6b4990d3..2d195a8d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs @@ -29,45 +29,28 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class IncludeUseCaseUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class IncludeUseCaseUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule IncludeUseCaseUsage + /// IncludeUseCaseUsage=OccurrenceUsagePrefix'include'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'use''case'UsageDeclaration)ValuePart?CaseBody /// - /// The used to query textual notation of referenced - public IncludeUseCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIncludeUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IIncludeUseCaseUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.UseCases.IncludeUseCaseUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : IncludeUseCaseUsage=OccurrenceUsagePrefix'include'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'use''case'UsageDeclaration)ValuePart?CaseBody - - - - - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("include "); - // Group Element - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue - - - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' - - + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs index 0ace1535..bef87935 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs @@ -29,35 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class IndexExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class IndexExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule IndexExpression + /// IndexExpression=ownedRelationship+=PrimaryArgumentMember'#''('ownedRelationship+=SequenceExpressionListMember')' /// - /// The used to query textual notation of referenced - public IndexExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIndexExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IIndexExpression poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.IndexExpression poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : IndexExpression=ownedRelationship+=PrimaryArgumentMember'#''('ownedRelationship+=SequenceExpressionListMember')' - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("# "); stringBuilder.Append("( "); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append(") "); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs index 2f1a4f53..90481249 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs @@ -29,42 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class InteractionTextualNotationBuilder : TextualNotationBuilder + public static partial class InteractionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Interaction + /// Interaction=TypePrefix'interaction'ClassifierDeclarationTypeBody /// - /// The used to query textual notation of referenced - public InteractionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInteraction(SysML2.NET.Core.POCO.Kernel.Interactions.IInteraction poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.Interaction poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Interaction=TypePrefix'interaction'ClassifierDeclarationTypeBody - - - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("interaction "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs index 7be9e7cf..2164c9aa 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class InterfaceDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class InterfaceDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule InterfaceDefinition + /// InterfaceDefinition=OccurrenceDefinitionPrefix'interface''def'DefinitionDeclarationInterfaceBody /// - /// The used to query textual notation of referenced - public InterfaceDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceDefinition(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : InterfaceDefinition=OccurrenceDefinitionPrefix'interface''def'DefinitionDeclarationInterfaceBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("interface "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : InterfaceBody; Found rule InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : InterfaceBody; Found rule InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' + TypeTextualNotationBuilder.BuildInterfaceBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs index c8503112..8c664e03 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs @@ -29,40 +29,87 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class InterfaceUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class InterfaceUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule InterfaceUsageDeclaration + /// InterfaceUsageDeclaration:InterfaceUsage=UsageDeclarationValuePart?('connect'InterfacePart)?|InterfacePart /// - /// The used to query textual notation of referenced - public InterfaceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceUsageDeclaration(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule InterfacePart + /// InterfacePart:InterfaceUsage=BinaryInterfacePart|NaryInterfacePart /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : InterfaceUsage=OccurrenceUsagePrefix'interface'InterfaceUsageDeclarationInterfaceBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule BinaryInterfacePart + /// BinaryInterfacePart:InterfaceUsage=ownedRelationship+=InterfaceEndMember'to'ownedRelationship+=InterfaceEndMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("to "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("interface "); - // non Terminal : InterfaceUsageDeclaration; Found rule InterfaceUsageDeclaration:InterfaceUsage=UsageDeclarationValuePart?('connect'InterfacePart)?|InterfacePart + } + /// + /// Builds the Textual Notation string for the rule NaryInterfacePart + /// NaryInterfacePart:InterfaceUsage='('ownedRelationship+=InterfaceEndMember','ownedRelationship+=InterfaceEndMember(','ownedRelationship+=InterfaceEndMember)*')' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("( "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : InterfaceBody; Found rule InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' + stringBuilder.Append(") "); + } + /// + /// Builds the Textual Notation string for the rule InterfaceUsage + /// InterfaceUsage=OccurrenceUsagePrefix'interface'InterfaceUsageDeclarationInterfaceBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceUsage(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("interface "); + // non Terminal : InterfaceUsageDeclaration; Found rule InterfaceUsageDeclaration:InterfaceUsage=UsageDeclarationValuePart?('connect'InterfacePart)?|InterfacePart + BuildInterfaceUsageDeclaration(poco, stringBuilder); + // non Terminal : InterfaceBody; Found rule InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' + TypeTextualNotationBuilder.BuildInterfaceBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs index bac35b11..60267aeb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs @@ -29,32 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class IntersectingTextualNotationBuilder : TextualNotationBuilder + public static partial class IntersectingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Intersecting + /// Intersecting=intersectingType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain /// - /// The used to query textual notation of referenced - public IntersectingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIntersecting(SysML2.NET.Core.POCO.Core.Types.IIntersecting poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Intersecting poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Intersecting=intersectingType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain - - // Assignment Element : intersectingType = - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs index db278abc..761ecea4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs @@ -29,50 +29,36 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class InvariantTextualNotationBuilder : TextualNotationBuilder + public static partial class InvariantTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Invariant + /// Invariant=FeaturePrefix'inv'('true'|isNegated?='false')?FeatureDeclarationValuePart?FunctionBody /// - /// The used to query textual notation of referenced - public InvariantTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInvariant(SysML2.NET.Core.POCO.Kernel.Functions.IInvariant poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Invariant poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Invariant=FeaturePrefix'inv'('true'|isNegated?='false')?FeatureDeclarationValuePart?FunctionBody - - - - - - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("inv "); - // Group Element - // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* - - - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue - - - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' - - + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs index 6b67bfbb..dcbb525f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs @@ -29,35 +29,45 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class InvocationExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class InvocationExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule FunctionOperationExpression + /// FunctionOperationExpression:InvocationExpression=ownedRelationship+=PrimaryArgumentMember'->'ownedRelationship+=InvocationTypeMember(ownedRelationship+=BodyArgumentMember|ownedRelationship+=FunctionReferenceArgumentMember|ArgumentList)ownedRelationship+=EmptyResultMember /// - /// The used to query textual notation of referenced - public InvocationExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("-> "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule InvocationExpression + /// InvocationExpression:InvocationExpression=ownedRelationship+=InstantiatedTypeMemberArgumentListownedRelationship+=EmptyResultMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.InvocationExpression poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInvocationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : InvocationExpression:InvocationExpression=ownedRelationship+=InstantiatedTypeMemberArgumentListownedRelationship+=EmptyResultMember - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : ArgumentList; Found rule ArgumentList:Feature='('(PositionalArgumentList|NamedArgumentList)?')' - - + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : ArgumentList; Found rule ArgumentList:Feature='('(PositionalArgumentList|NamedArgumentList)?')' + FeatureTextualNotationBuilder.BuildArgumentList(poco, stringBuilder); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs index d9fbbedf..d9459d04 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs @@ -29,38 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ItemDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class ItemDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ItemDefinition + /// ItemDefinition=OccurrenceDefinitionPrefix'item''def'Definition /// - /// The used to query textual notation of referenced - public ItemDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildItemDefinition(SysML2.NET.Core.POCO.Systems.Items.IItemDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Items.ItemDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ItemDefinition=OccurrenceDefinitionPrefix'item''def'Definition - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("item "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs index 49a66600..147f8534 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs @@ -29,39 +29,24 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ItemUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ItemUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ItemUsage + /// ItemUsage=OccurrenceUsagePrefix'item'Usage /// - /// The used to query textual notation of referenced - public ItemUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildItemUsage(SysML2.NET.Core.POCO.Systems.Items.IItemUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Items.ItemUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ItemUsage=OccurrenceUsagePrefix'item'Usage - - - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("item "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion - - + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs index 7debc859..dd822154 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs @@ -29,40 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class JoinNodeTextualNotationBuilder : TextualNotationBuilder + public static partial class JoinNodeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule JoinNode + /// JoinNode=ControlNodePrefixisComposite?='join'UsageDeclarationActionBody /// - /// The used to query textual notation of referenced - public JoinNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildJoinNode(SysML2.NET.Core.POCO.Systems.Actions.IJoinNode poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.JoinNode poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : JoinNode=ControlNodePrefixisComposite?='join'UsageDeclarationActionBody - - // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - - - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' - - + // If property isComposite value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs index 0047e9b6..901adcce 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs @@ -29,39 +29,32 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class LibraryPackageTextualNotationBuilder : TextualNotationBuilder + public static partial class LibraryPackageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule LibraryPackage + /// LibraryPackage=(isStandard?='standard')'library'(ownedRelationship+=PrefixMetadataMember)*PackageDeclarationPackageBody /// - /// The used to query textual notation of referenced - public LibraryPackageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLibraryPackage(SysML2.NET.Core.POCO.Kernel.Packages.ILibraryPackage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Packages.LibraryPackage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : LibraryPackage=(isStandard?='standard')'library'(ownedRelationship+=PrefixMetadataMember)*PackageDeclarationPackageBody + // Group Element + // Assignment Element : isStandard ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isStandard value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Group Element stringBuilder.Append("library "); - // Group Element - // non Terminal : PackageDeclaration; Found rule PackageDeclaration:Package='package'Identification - - - // non Terminal : PackageBody; Found rule PackageBody:Package=';'|'{'PackageBodyElement*'}' - + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : PackageDeclaration; Found rule PackageDeclaration:Package='package'Identification + PackageTextualNotationBuilder.BuildPackageDeclaration(poco, stringBuilder); + // non Terminal : PackageBody; Found rule PackageBody:Package=';'|'{'PackageBodyElement*'}' + PackageTextualNotationBuilder.BuildPackageBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs index 07718fec..8ec970c4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs @@ -29,31 +29,21 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class LiteralBooleanTextualNotationBuilder : TextualNotationBuilder + public static partial class LiteralBooleanTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule LiteralBoolean + /// LiteralBoolean=value=BooleanValue /// - /// The used to query textual notation of referenced - public LiteralBooleanTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralBoolean(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralBoolean poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralBoolean poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : LiteralBoolean=value=BooleanValue - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs index bcf9b3e0..7965c644 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs @@ -29,49 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class LiteralExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class LiteralExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule LiteralExpression + /// LiteralExpression=LiteralBoolean|LiteralString|LiteralInteger|LiteralReal|LiteralInfinity /// - /// The used to query textual notation of referenced - public LiteralExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralExpression poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralExpression poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : LiteralExpression=LiteralBoolean|LiteralString|LiteralInteger|LiteralReal|LiteralInfinity - - // non Terminal : LiteralBoolean; Found rule LiteralBoolean=value=BooleanValue - - - // non Terminal : LiteralString; Found rule LiteralString=value=STRING_VALUE - - - // non Terminal : LiteralInteger; Found rule LiteralInteger=value=DECIMAL_VALUE - - - // non Terminal : LiteralReal; Found rule LiteralReal=value=RealValue - - - // non Terminal : LiteralInfinity; Found rule LiteralInfinity='*' - - - - - - - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs index f4170c85..55ea2a17 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs @@ -29,35 +29,20 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class LiteralInfinityTextualNotationBuilder : TextualNotationBuilder + public static partial class LiteralInfinityTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule LiteralInfinity + /// LiteralInfinity='*' /// - /// The used to query textual notation of referenced - public LiteralInfinityTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralInfinity(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInfinity poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInfinity poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : LiteralInfinity='*' - - - - - stringBuilder.Append("* "); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs index 8fc0645a..0b61f6ff 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs @@ -29,31 +29,21 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class LiteralIntegerTextualNotationBuilder : TextualNotationBuilder + public static partial class LiteralIntegerTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule LiteralInteger + /// LiteralInteger=value=DECIMAL_VALUE /// - /// The used to query textual notation of referenced - public LiteralIntegerTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralInteger(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInteger poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInteger poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : LiteralInteger=value=DECIMAL_VALUE - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs index 422861eb..11d80c82 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs @@ -29,31 +29,21 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class LiteralStringTextualNotationBuilder : TextualNotationBuilder + public static partial class LiteralStringTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule LiteralString + /// LiteralString=value=STRING_VALUE /// - /// The used to query textual notation of referenced - public LiteralStringTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildLiteralString(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralString poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.LiteralString poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : LiteralString=value=STRING_VALUE - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs index b39165be..c9c8ccf1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs @@ -29,33 +29,21 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MembershipExposeTextualNotationBuilder : TextualNotationBuilder + public static partial class MembershipExposeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule MembershipExpose + /// MembershipExpose=MembershipImport /// - /// The used to query textual notation of referenced - public MembershipExposeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMembershipExpose(SysML2.NET.Core.POCO.Systems.Views.IMembershipExpose poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.MembershipExpose poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : MembershipExpose=MembershipImport - - // non Terminal : MembershipImport; Found rule MembershipImport=importedMembership=[QualifiedName]('::'isRecursive?='**')? - - + // non Terminal : MembershipImport; Found rule MembershipImport=importedMembership=[QualifiedName]('::'isRecursive?='**')? + MembershipImportTextualNotationBuilder.BuildMembershipImport(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs index b1269203..95dba6bd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs @@ -29,32 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MembershipImportTextualNotationBuilder : TextualNotationBuilder + public static partial class MembershipImportTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule MembershipImport + /// MembershipImport=importedMembership=[QualifiedName]('::'isRecursive?='**')? /// - /// The used to query textual notation of referenced - public MembershipImportTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMembershipImport(SysML2.NET.Core.POCO.Root.Namespaces.IMembershipImport poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.MembershipImport poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : MembershipImport=importedMembership=[QualifiedName]('::'isRecursive?='**')? + // Assignment Element : importedMembership = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property importedMembership value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // Group Element + stringBuilder.Append(":: "); + // Assignment Element : isRecursive ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isRecursive value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : importedMembership = - // Group Element - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs index 42cecd12..f74f88d1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs @@ -29,28 +29,111 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class MembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule MemberPrefix + /// MemberPrefix:Membership=(visibility=VisibilityIndicator)? /// - /// The used to query textual notation of referenced - public MembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMemberPrefix(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { + // Group Element + // Assignment Element : visibility = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property visibility value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule AliasMember + /// AliasMember:Membership=MemberPrefix'alias'('<'memberShortName=NAME'>')?(memberName=NAME)?'for'memberElement=[QualifiedName]RelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("alias "); + // Group Element + stringBuilder.Append("< "); + // Assignment Element : memberShortName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property memberShortName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("> "); + + // Group Element + // Assignment Element : memberName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property memberName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + stringBuilder.Append("for "); + // Assignment Element : memberElement = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property memberElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule FeatureChainMember + /// FeatureChainMember:Membership=memberElement=[QualifiedName]|OwnedFeatureChainMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule FeatureReferenceMember + /// FeatureReferenceMember:Membership=memberElement=FeatureReference /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.Membership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // Assignment Element : memberElement = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property memberElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); + } + + /// + /// Builds the Textual Notation string for the rule ElementReferenceMember + /// ElementReferenceMember:Membership=memberElement=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildElementReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : memberElement = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property memberElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + + } + + /// + /// Builds the Textual Notation string for the rule InstantiatedTypeMember + /// InstantiatedTypeMember:Membership=memberElement=InstantiatedTypeReference|OwnedFeatureChainMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInstantiatedTypeMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule MetadataBodyElement + /// MetadataBodyElement:Membership=NonFeatureMember|MetadataBodyFeatureMember|AliasMember|Import + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyElement(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs index af5187fa..f1f99737 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs @@ -29,40 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MergeNodeTextualNotationBuilder : TextualNotationBuilder + public static partial class MergeNodeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule MergeNode + /// MergeNode=ControlNodePrefixisComposite?='merge'UsageDeclarationActionBody /// - /// The used to query textual notation of referenced - public MergeNodeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMergeNode(SysML2.NET.Core.POCO.Systems.Actions.IMergeNode poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.MergeNode poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : MergeNode=ControlNodePrefixisComposite?='merge'UsageDeclarationActionBody - - // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - - - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' - - + // If property isComposite value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs index 84393832..0205deb3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs @@ -29,40 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MetaclassTextualNotationBuilder : TextualNotationBuilder + public static partial class MetaclassTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Metaclass + /// Metaclass=TypePrefix'metaclass'ClassifierDeclarationTypeBody /// - /// The used to query textual notation of referenced - public MetaclassTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetaclass(SysML2.NET.Core.POCO.Kernel.Metadata.IMetaclass poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Metadata.Metaclass poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Metaclass=TypePrefix'metaclass'ClassifierDeclarationTypeBody - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("metaclass "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs index d76685f5..5fa58924 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs @@ -29,33 +29,36 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MetadataAccessExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class MetadataAccessExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule MetadataReference + /// MetadataReference:MetadataAccessExpression=ownedRelationship+=ElementReferenceMember /// - /// The used to query textual notation of referenced - public MetadataAccessExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule MetadataAccessExpression + /// MetadataAccessExpression=ownedRelationship+=ElementReferenceMember'.''metadata' /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.MetadataAccessExpression poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataAccessExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : MetadataAccessExpression=ownedRelationship+=ElementReferenceMember'.''metadata' - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append(". "); stringBuilder.Append("metadata "); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs index bc2c8720..8730c7f6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs @@ -29,39 +29,29 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MetadataDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class MetadataDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule MetadataDefinition + /// MetadataDefinition=(isAbstract?='abstract')?DefinitionExtensionKeyword*'metadata''def'Definition /// - /// The used to query textual notation of referenced - public MetadataDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataDefinition(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Metadata.MetadataDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : MetadataDefinition=(isAbstract?='abstract')?DefinitionExtensionKeyword*'metadata''def'Definition - - // Group Element - // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember - + // Group Element + // Assignment Element : isAbstract ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isAbstract value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, stringBuilder); stringBuilder.Append("metadata "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs index 62236c3a..0828421b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs @@ -29,39 +29,71 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MetadataFeatureTextualNotationBuilder : TextualNotationBuilder + public static partial class MetadataFeatureTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule PrefixMetadataFeature + /// PrefixMetadataFeature:MetadataFeature=ownedRelationship+=OwnedFeatureTyping /// - /// The used to query textual notation of referenced - public MetadataFeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule MetadataFeatureDeclaration + /// MetadataFeatureDeclaration:MetadataFeature=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Metadata.MetadataFeature poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : MetadataFeature=(ownedRelationship+=PrefixMetadataMember)*('@'|'metadata')MetadataFeatureDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody + // Group Element + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - // Group Element - // non Terminal : MetadataFeatureDeclaration; Found rule MetadataFeatureDeclaration:MetadataFeature=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping + } + /// + /// Builds the Textual Notation string for the rule MetadataFeature + /// MetadataFeature=(ownedRelationship+=PrefixMetadataMember)*('@'|'metadata')MetadataFeatureDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : MetadataFeatureDeclaration; Found rule MetadataFeatureDeclaration:MetadataFeature=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping + BuildMetadataFeatureDeclaration(poco, stringBuilder); + // Group Element + stringBuilder.Append("about "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs index 40519a7d..e228b194 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs @@ -29,41 +29,69 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MetadataUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class MetadataUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule PrefixMetadataUsage + /// PrefixMetadataUsage:MetadataUsage=ownedRelationship+=OwnedFeatureTyping /// - /// The used to query textual notation of referenced - public MetadataUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule MetadataUsageDeclaration + /// MetadataUsageDeclaration:MetadataUsage=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Metadata.MetadataUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : MetadataUsage=UsageExtensionKeyword*('@'|'metadata')MetadataUsageDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody - - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + // Group Element + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - // non Terminal : MetadataUsageDeclaration; Found rule MetadataUsageDeclaration:MetadataUsage=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping - + } - // Group Element - // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + /// + /// Builds the Textual Notation string for the rule MetadataUsage + /// MetadataUsage=UsageExtensionKeyword*('@'|'metadata')MetadataUsageDeclaration('about'ownedRelationship+=Annotation(','ownedRelationship+=Annotation)*)?MetadataBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) + { + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : MetadataUsageDeclaration; Found rule MetadataUsageDeclaration:MetadataUsage=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping + BuildMetadataUsageDeclaration(poco, stringBuilder); + // Group Element + stringBuilder.Append("about "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs index cbecd043..e71cbe8b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs @@ -29,34 +29,61 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MultiplicityRangeTextualNotationBuilder : TextualNotationBuilder + public static partial class MultiplicityRangeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedMultiplicityRange + /// OwnedMultiplicityRange:MultiplicityRange=MultiplicityBounds /// - /// The used to query textual notation of referenced - public MultiplicityRangeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) { + // non Terminal : MultiplicityBounds; Found rule MultiplicityBounds:MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' + BuildMultiplicityBounds(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule MultiplicityBounds + /// MultiplicityBounds:MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Multiplicities.MultiplicityRange poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' + stringBuilder.Append("[ "); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(".. "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("] "); + + } + + /// + /// Builds the Textual Notation string for the rule MultiplicityRange + /// MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) + { stringBuilder.Append("[ "); - // Group Element + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(".. "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("] "); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs index f35a4ebf..488e68ed 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs @@ -29,36 +29,48 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class MultiplicityTextualNotationBuilder : TextualNotationBuilder + public static partial class MultiplicityTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule EmptyMultiplicity + /// EmptyMultiplicity:Multiplicity={} /// - /// The used to query textual notation of referenced - public MultiplicityTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, StringBuilder stringBuilder) { + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule MultiplicitySubset + /// MultiplicitySubset:Multiplicity='multiplicity'IdentificationSubsetsTypeBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Multiplicity poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicitySubset(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Multiplicity=MultiplicitySubset|MultiplicityRange - - // non Terminal : MultiplicitySubset; Found rule MultiplicitySubset:Multiplicity='multiplicity'IdentificationSubsetsTypeBody - - - // non Terminal : MultiplicityRange; Found rule MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' - + stringBuilder.Append("multiplicity "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + // non Terminal : Subsets; Found rule Subsets:Feature=SUBSETSownedRelationship+=OwnedSubsetting + FeatureTextualNotationBuilder.BuildSubsets(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); + } - return stringBuilder.ToString(); + /// + /// Builds the Textual Notation string for the rule Multiplicity + /// Multiplicity=MultiplicitySubset|MultiplicityRange + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs index 23d907dc..3b0da7ef 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs @@ -29,35 +29,21 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class NamespaceExposeTextualNotationBuilder : TextualNotationBuilder + public static partial class NamespaceExposeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule NamespaceExpose + /// NamespaceExpose=NamespaceImport /// - /// The used to query textual notation of referenced - public NamespaceExposeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceExpose(SysML2.NET.Core.POCO.Systems.Views.INamespaceExpose poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.NamespaceExpose poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : NamespaceExpose=NamespaceImport - - - - // non Terminal : NamespaceImport; Found rule NamespaceImport=importedNamespace=[QualifiedName]'::''*'('::'isRecursive?='**')?|importedNamespace=FilterPackage{ownedRelatedElement+=importedNamespace} - - + // non Terminal : NamespaceImport; Found rule NamespaceImport=importedNamespace=[QualifiedName]'::''*'('::'isRecursive?='**')?|importedNamespace=FilterPackage{ownedRelatedElement+=importedNamespace} + NamespaceImportTextualNotationBuilder.BuildNamespaceImport(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs index 67559bb0..6bff3b6a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs @@ -29,36 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class NamespaceImportTextualNotationBuilder : TextualNotationBuilder + public static partial class NamespaceImportTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule NamespaceImport + /// NamespaceImport=importedNamespace=[QualifiedName]'::''*'('::'isRecursive?='**')?|importedNamespace=FilterPackage{ownedRelatedElement+=importedNamespace} /// - /// The used to query textual notation of referenced - public NamespaceImportTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceImport(SysML2.NET.Core.POCO.Root.Namespaces.INamespaceImport poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.NamespaceImport poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : NamespaceImport=importedNamespace=[QualifiedName]'::''*'('::'isRecursive?='**')?|importedNamespace=FilterPackage{ownedRelatedElement+=importedNamespace} - - // Assignment Element : importedNamespace = - stringBuilder.Append(":: "); - stringBuilder.Append("* "); - // Group Element - // Assignment Element : importedNamespace = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelatedElement += importedNamespace - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs index b6d31697..fbd07bee 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs @@ -29,39 +29,76 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class NamespaceTextualNotationBuilder : TextualNotationBuilder + public static partial class NamespaceTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule RootNamespace + /// RootNamespace:Namespace=PackageBodyElement* /// - /// The used to query textual notation of referenced - public NamespaceTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRootNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) { + // non Terminal : PackageBodyElement; Found rule PackageBodyElement:Package=ownedRelationship+=PackageMember|ownedRelationship+=ElementFilterMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule NamespaceDeclaration + /// NamespaceDeclaration:Namespace='namespace'Identification /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.Namespace poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Namespace=(ownedRelationship+=PrefixMetadataMember)*NamespaceDeclarationNamespaceBody - + stringBuilder.Append("namespace "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + } - // Group Element - // non Terminal : NamespaceDeclaration; Found rule NamespaceDeclaration:Namespace='namespace'Identification - + /// + /// Builds the Textual Notation string for the rule NamespaceBody + /// NamespaceBody:Namespace=';'|'{'NamespaceBodyElement*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceBody(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } - // non Terminal : NamespaceBody; Found rule NamespaceBody:Namespace=';'|'{'NamespaceBodyElement*'}' + /// + /// Builds the Textual Notation string for the rule NamespaceBodyElement + /// NamespaceBodyElement:Namespace=ownedRelationship+=NamespaceMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceBodyElement(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule Namespace + /// Namespace=(ownedRelationship+=PrefixMetadataMember)*NamespaceDeclarationNamespaceBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : NamespaceDeclaration; Found rule NamespaceDeclaration:Namespace='namespace'Identification + BuildNamespaceDeclaration(poco, stringBuilder); + // non Terminal : NamespaceBody; Found rule NamespaceBody:Namespace=';'|'{'NamespaceBodyElement*'}' + BuildNamespaceBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs index 56fbbf50..37b0a831 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs @@ -29,33 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class NullExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class NullExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule NullExpression + /// NullExpression:NullExpression='null'|'('')' /// - /// The used to query textual notation of referenced - public NullExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNullExpression(SysML2.NET.Core.POCO.Kernel.Expressions.INullExpression poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.NullExpression poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : NullExpression:NullExpression='null'|'('')' - - stringBuilder.Append("null "); - stringBuilder.Append("( "); - stringBuilder.Append(") "); - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs index ff11b993..a528eb54 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs @@ -29,28 +29,24 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ObjectiveMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class ObjectiveMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ObjectiveMember + /// ObjectiveMember:ObjectiveMembership=MemberPrefix'objective'ownedRelatedElement+=ObjectiveRequirementUsage /// - /// The used to query textual notation of referenced - public ObjectiveMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildObjectiveMember(SysML2.NET.Core.POCO.Systems.Cases.IObjectiveMembership poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Cases.ObjectiveMembership poco) - { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("objective "); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs index 6873371f..76e5dd02 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs @@ -29,38 +29,68 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class OccurrenceDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class OccurrenceDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OccurrenceDefinitionPrefix + /// OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* /// - /// The used to query textual notation of referenced - public OccurrenceDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) { + // non Terminal : BasicDefinitionPrefix; Found rule BasicDefinitionPrefix=isAbstract?='abstract'|isVariation?='variation' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule IndividualDefinition + /// IndividualDefinition:OccurrenceDefinition=BasicDefinitionPrefix?isIndividual?='individual'DefinitionExtensionKeyword*'def'DefinitionownedRelationship+=EmptyMultiplicityMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceDefinition poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIndividualDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : OccurrenceDefinition=OccurrenceDefinitionPrefix'occurrence''def'Definition - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + // non Terminal : BasicDefinitionPrefix; Found rule BasicDefinitionPrefix=isAbstract?='abstract'|isVariation?='variation' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, stringBuilder); + stringBuilder.Append("def "); + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } + /// + /// Builds the Textual Notation string for the rule OccurrenceDefinition + /// OccurrenceDefinition=OccurrenceDefinitionPrefix'occurrence''def'Definition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("occurrence "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs index ceb2725b..b6256367 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs @@ -29,37 +29,115 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class OccurrenceUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class OccurrenceUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OccurrenceUsagePrefix + /// OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* /// - /// The used to query textual notation of referenced - public OccurrenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceUsagePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { + // non Terminal : BasicUsagePrefix; Found rule BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? + UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + // Group Element + // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + // Group Element + // Assignment Element : portionKind = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property portionKind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : isPortion = true + + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule IndividualUsage + /// IndividualUsage:OccurrenceUsage=BasicUsagePrefixisIndividual?='individual'UsageExtensionKeyword*Usage /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIndividualUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : OccurrenceUsage=OccurrenceUsagePrefix'occurrence'Usage + // non Terminal : BasicUsagePrefix; Found rule BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? + UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + } + /// + /// Builds the Textual Notation string for the rule PortionUsage + /// PortionUsage:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?portionKind=PortionKindUsageExtensionKeyword*Usage{isPortion=true} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) + { + // non Terminal : BasicUsagePrefix; Found rule BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? + UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + // Group Element + // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - stringBuilder.Append("occurrence "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + // Assignment Element : portionKind = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property portionKind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + // Assignment Element : isPortion = true + } + /// + /// Builds the Textual Notation string for the rule ControlNodePrefix + /// ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildControlNodePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) + { + // non Terminal : RefPrefix; Found rule RefPrefix:Usage=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract'|isVariation?='variation')?(isConstant?='constant')? + UsageTextualNotationBuilder.BuildRefPrefix(poco, stringBuilder); + // Group Element + // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + // Group Element + // Assignment Element : portionKind = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property portionKind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : isPortion = true + + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule OccurrenceUsage + /// OccurrenceUsage=OccurrenceUsagePrefix'occurrence'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("occurrence "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs index 52d0c1b4..d4d0d3f7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs @@ -29,28 +29,172 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class OperatorExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class OperatorExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ConditionalExpression + /// ConditionalExpression:OperatorExpression=operator='if'ownedRelationship+=ArgumentMember'?'ownedRelationship+=ArgumentExpressionMember'else'ownedRelationship+=ArgumentExpressionMemberownedRelationship+=EmptyResultMember /// - /// The used to query textual notation of referenced - public OperatorExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { + // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("? "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("else "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ConditionalBinaryOperatorExpression + /// ConditionalBinaryOperatorExpression:OperatorExpression=ownedRelationship+=ArgumentMemberoperator=ConditionalBinaryOperatorownedRelationship+=ArgumentExpressionMemberownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule BinaryOperatorExpression + /// BinaryOperatorExpression:OperatorExpression=ownedRelationship+=ArgumentMemberoperator=BinaryOperatorownedRelationship+=ArgumentMemberownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule UnaryOperatorExpression + /// UnaryOperatorExpression:OperatorExpression=operator=UnaryOperatorownedRelationship+=ArgumentMemberownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ClassificationExpression + /// ClassificationExpression:OperatorExpression=(ownedRelationship+=ArgumentMember)?(operator=ClassificationTestOperatorownedRelationship+=TypeReferenceMember|operator=CastOperatorownedRelationship+=TypeResultMember)ownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule MetaclassificationExpression + /// MetaclassificationExpression:OperatorExpression=ownedRelationship+=MetadataArgumentMember(operator=ClassificationTestOperatorownedRelationship+=TypeReferenceMember|operator=MetaCastOperatorownedRelationship+=TypeResultMember)ownedRelationship+=EmptyResultMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ExtentExpression + /// ExtentExpression:OperatorExpression=operator='all'ownedRelationship+=TypeReferenceMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule BracketExpression + /// BracketExpression:OperatorExpression=ownedRelationship+=PrimaryArgumentMemberoperator='['ownedRelationship+=SequenceExpressionListMember']' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("] "); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule SequenceOperatorExpression + /// SequenceOperatorExpression:OperatorExpression=ownedRelationship+=OwnedExpressionMemberoperator=','ownedRelationship+=SequenceExpressionListMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.OperatorExpression poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSequenceOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs index 07cc56bc..4a4ad2e4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs @@ -29,28 +29,237 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class OwningMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class OwningMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule AnnotatingMember + /// AnnotatingMember:OwningMembership=ownedRelatedElement+=AnnotatingElement /// - /// The used to query textual notation of referenced - public OwningMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule PackageMember + /// PackageMember:OwningMembership=MemberPrefix(ownedRelatedElement+=DefinitionElement|ownedRelatedElement=UsageElement) + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPackageMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + + } + + /// + /// Builds the Textual Notation string for the rule DefinitionMember + /// DefinitionMember:OwningMembership=MemberPrefixownedRelatedElement+=DefinitionElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule OwnedCrossFeatureMember + /// OwnedCrossFeatureMember:OwningMembership=ownedRelatedElement+=OwnedCrossFeature + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule OwnedMultiplicity + /// OwnedMultiplicity:OwningMembership=ownedRelatedElement+=MultiplicityRange + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule MultiplicityExpressionMember + /// MultiplicityExpressionMember:OwningMembership=ownedRelatedElement+=(LiteralExpression|FeatureReferenceExpression) + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.GroupElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.GroupElement + + } + + /// + /// Builds the Textual Notation string for the rule EmptyMultiplicityMember + /// EmptyMultiplicityMember:OwningMembership=ownedRelatedElement+=EmptyMultiplicity + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ConjugatedPortDefinitionMember + /// ConjugatedPortDefinitionMember:OwningMembership=ownedRelatedElement+=ConjugatedPortDefinition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule OwnedCrossMultiplicityMember + /// OwnedCrossMultiplicityMember:OwningMembership=ownedRelatedElement+=OwnedCrossMultiplicity + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule OwnedFeatureChainMember + /// OwnedFeatureChainMember:OwningMembership=ownedRelatedElement+=OwnedFeatureChain + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule TransitionSuccessionMember + /// TransitionSuccessionMember:OwningMembership=ownedRelatedElement+=TransitionSuccession + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule PrefixMetadataMember + /// PrefixMetadataMember:OwningMembership='#'ownedRelatedElement=PrefixMetadataUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrefixMetadataMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + stringBuilder.Append("# "); + // Assignment Element : ownedRelatedElement = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule NamespaceMember + /// NamespaceMember:OwningMembership=NonFeatureMember|NamespaceFeatureMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureMember + /// NonFeatureMember:OwningMembership=MemberPrefixownedRelatedElement+=MemberElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule NamespaceFeatureMember + /// NamespaceFeatureMember:OwningMembership=MemberPrefixownedRelatedElement+=FeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNamespaceFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FeatureMember + /// FeatureMember:OwningMembership=TypeFeatureMember|OwnedFeatureMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule TypeFeatureMember + /// TypeFeatureMember:OwningMembership=MemberPrefix'member'ownedRelatedElement+=FeatureElement /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("member "); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs index 71aea619..355a2a4f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs @@ -29,37 +29,80 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class PackageTextualNotationBuilder : TextualNotationBuilder + public static partial class PackageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule PackageDeclaration + /// PackageDeclaration:Package='package'Identification /// - /// The used to query textual notation of referenced - public PackageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPackageDeclaration(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) { + stringBuilder.Append("package "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule PackageBody + /// PackageBody:Package=';'|'{'PackageBodyElement*'}' /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Packages.Package poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPackageBody(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Package=(ownedRelationship+=PrefixMetadataMember)*PackageDeclarationPackageBody + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule PackageBodyElement + /// PackageBodyElement:Package=ownedRelationship+=PackageMember|ownedRelationship+=ElementFilterMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPackageBodyElement(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } - // Group Element - // non Terminal : PackageDeclaration; Found rule PackageDeclaration:Package='package'Identification + /// + /// Builds the Textual Notation string for the rule FilterPackage + /// FilterPackage:Package=ownedRelationship+=FilterPackageImport(ownedRelationship+=FilterPackageMember)+ + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : PackageBody; Found rule PackageBody:Package=';'|'{'PackageBodyElement*'}' + } + /// + /// Builds the Textual Notation string for the rule Package + /// Package=(ownedRelationship+=PrefixMetadataMember)*PackageDeclarationPackageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : PackageDeclaration; Found rule PackageDeclaration:Package='package'Identification + BuildPackageDeclaration(poco, stringBuilder); + // non Terminal : PackageBody; Found rule PackageBody:Package=';'|'{'PackageBodyElement*'}' + BuildPackageBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs index 9d64fb11..b015f440 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs @@ -29,28 +29,216 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ParameterMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class ParameterMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule MessageEventMember + /// MessageEventMember:ParameterMembership=ownedRelatedElement+=MessageEvent /// - /// The used to query textual notation of referenced - public ParameterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule PayloadParameterMember + /// PayloadParameterMember:ParameterMembership=ownedRelatedElement+=PayloadParameter + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ArgumentMember + /// ArgumentMember:ParameterMembership=ownedMemberParameter=Argument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ArgumentExpressionMember + /// ArgumentExpressionMember:ParameterMembership=ownedRelatedElement+=ArgumentExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule NodeParameterMember + /// NodeParameterMember:ParameterMembership=ownedRelatedElement+=NodeParameter + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule EmptyParameterMember + /// EmptyParameterMember:ParameterMembership=ownedRelatedElement+=EmptyUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule AssignmentTargetMember + /// AssignmentTargetMember:ParameterMembership=ownedRelatedElement+=AssignmentTargetParameter + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ExpressionParameterMember + /// ExpressionParameterMember:ParameterMembership=ownedRelatedElement+=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ActionBodyParameterMember + /// ActionBodyParameterMember:ParameterMembership=ownedRelatedElement+=ActionBodyParameter + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule IfNodeParameterMember + /// IfNodeParameterMember:ParameterMembership=ownedRelatedElement+=IfNode + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule MetadataArgumentMember + /// MetadataArgumentMember:ParameterMembership=ownedRelatedElement+=MetadataArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule TypeReferenceMember + /// TypeReferenceMember:ParameterMembership=ownedMemberFeature=TypeReference + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeReferenceMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule PrimaryArgumentMember + /// PrimaryArgumentMember:ParameterMembership=ownedMemberParameter=PrimaryArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule NonFeatureChainPrimaryArgumentMember + /// NonFeatureChainPrimaryArgumentMember:ParameterMembership=ownedMemberParameter=PrimaryArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonFeatureChainPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule BodyArgumentMember + /// BodyArgumentMember:ParameterMembership=ownedMemberParameter=BodyArgument + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBodyArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule FunctionReferenceArgumentMember + /// FunctionReferenceArgumentMember:ParameterMembership=ownedMemberParameter=FunctionReferenceArgument /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Behaviors.ParameterMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionReferenceArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs index 20d9546f..2472661b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs @@ -29,38 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class PartDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class PartDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule PartDefinition + /// PartDefinition=OccurrenceDefinitionPrefix'part''def'Definition /// - /// The used to query textual notation of referenced - public PartDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPartDefinition(SysML2.NET.Core.POCO.Systems.Parts.IPartDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Parts.PartDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : PartDefinition=OccurrenceDefinitionPrefix'part''def'Definition - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("part "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs index 2252af43..b09bd8dc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs @@ -29,39 +29,56 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class PartUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class PartUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ActorUsage + /// ActorUsage:PartUsage='actor'UsageExtensionKeyword*Usage /// - /// The used to query textual notation of referenced - public PartUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActorUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, StringBuilder stringBuilder) { + stringBuilder.Append("actor "); + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule StakeholderUsage + /// StakeholderUsage:PartUsage='stakeholder'UsageExtensionKeyword*Usage /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Parts.PartUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStakeholderUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : PartUsage=OccurrenceUsagePrefix'part'Usage - - - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + stringBuilder.Append("stakeholder "); + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + } + /// + /// Builds the Textual Notation string for the rule PartUsage + /// PartUsage=OccurrenceUsagePrefix'part'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPartUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("part "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion - - + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs index fa3ac495..3192759d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs @@ -29,43 +29,21 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class PayloadFeatureTextualNotationBuilder : TextualNotationBuilder + public static partial class PayloadFeatureTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule FlowPayloadFeature + /// FlowPayloadFeature:PayloadFeature=PayloadFeature /// - /// The used to query textual notation of referenced - public PayloadFeatureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowPayloadFeature(SysML2.NET.Core.POCO.Kernel.Interactions.IPayloadFeature poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.PayloadFeature poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : PayloadFeature:Feature=Identification?PayloadFeatureSpecializationPartValuePart?|ownedRelationship+=OwnedFeatureTyping(ownedRelationship+=OwnedMultiplicity)?|ownedRelationship+=OwnedMultiplicityownedRelationship+=OwnedFeatureTyping - - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - - - // non Terminal : PayloadFeatureSpecializationPart; Found rule PayloadFeatureSpecializationPart:Feature=(FeatureSpecialization)+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization+ - - - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue - - - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : PayloadFeature; Found rule PayloadFeature:Feature=Identification?PayloadFeatureSpecializationPartValuePart?|ownedRelationship+=OwnedFeatureTyping(ownedRelationship+=OwnedMultiplicity)?|ownedRelationship+=OwnedMultiplicityownedRelationship+=OwnedFeatureTyping + FeatureTextualNotationBuilder.BuildPayloadFeature(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs index 44c02c21..546dece4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs @@ -29,40 +29,75 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class PerformActionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class PerformActionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule PerformActionUsageDeclaration + /// PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? /// - /// The used to query textual notation of referenced - public PerformActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPerformActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) { + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule StatePerformActionUsage + /// StatePerformActionUsage:PerformActionUsage=PerformActionUsageDeclarationActionBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.PerformActionUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStatePerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : PerformActionUsage=OccurrenceUsagePrefix'perform'PerformActionUsageDeclarationActionBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + // non Terminal : PerformActionUsageDeclaration; Found rule PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? + BuildPerformActionUsageDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + } - stringBuilder.Append("perform "); - // non Terminal : PerformActionUsageDeclaration; Found rule PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? - + /// + /// Builds the Textual Notation string for the rule TransitionPerformActionUsage + /// TransitionPerformActionUsage:PerformActionUsage=PerformActionUsageDeclaration('{'ActionBodyItem*'}')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : PerformActionUsageDeclaration; Found rule PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? + BuildPerformActionUsageDeclaration(poco, stringBuilder); + // Group Element + stringBuilder.Append("{ "); + // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember + TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); + stringBuilder.Append("} "); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + } + /// + /// Builds the Textual Notation string for the rule PerformActionUsage + /// PerformActionUsage=OccurrenceUsagePrefix'perform'PerformActionUsageDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("perform "); + // non Terminal : PerformActionUsageDeclaration; Found rule PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? + BuildPerformActionUsageDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs index b6a7cf10..3994a9db 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs @@ -29,30 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class PortConjugationTextualNotationBuilder : TextualNotationBuilder + public static partial class PortConjugationTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule PortConjugation + /// PortConjugation={} /// - /// The used to query textual notation of referenced - public PortConjugationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortConjugation(SysML2.NET.Core.POCO.Systems.Ports.IPortConjugation poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.PortConjugation poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : PortConjugation={} - - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs index d443a055..17fd78ab 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs @@ -29,42 +29,28 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class PortDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class PortDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule PortDefinition + /// PortDefinition=DefinitionPrefix'port''def'DefinitionownedRelationship+=ConjugatedPortDefinitionMember{conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition=this} /// - /// The used to query textual notation of referenced - public PortDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IPortDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.PortDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : PortDefinition=DefinitionPrefix'port''def'DefinitionownedRelationship+=ConjugatedPortDefinitionMember{conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition=this} - - - - // non Terminal : DefinitionPrefix; Found rule DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* - - + // non Terminal : DefinitionPrefix; Found rule DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* + DefinitionTextualNotationBuilder.BuildDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("port "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement // Assignment Element : conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition = this - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs index 4a0d4854..07e78c98 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs @@ -29,37 +29,62 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class PortUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class PortUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule DefaultInterfaceEnd + /// DefaultInterfaceEnd:PortUsage=isEnd?='end'Usage /// - /// The used to query textual notation of referenced - public PortUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefaultInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) { + // Assignment Element : isEnd ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isEnd value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule InterfaceEnd + /// InterfaceEnd:PortUsage=(ownedRelationship+=OwnedCrossMultiplicityMember)?(declaredName=NAMEREFERENCES)?ownedRelationship+=OwnedReferenceSubsetting /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Ports.PortUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : PortUsage=OccurrenceUsagePrefix'port'Usage - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + // Assignment Element : declaredName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property declaredName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : REFERENCES; Found rule REFERENCES='::>'|'references' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - stringBuilder.Append("port "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } + /// + /// Builds the Textual Notation string for the rule PortUsage + /// PortUsage=OccurrenceUsagePrefix'port'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortUsage(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + stringBuilder.Append("port "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs new file mode 100644 index 00000000..438b4df7 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs @@ -0,0 +1,51 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class PortionKindTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule PortionKind + /// PortionKind='snapshot'|'timeslice' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPortionKind(SysML2.NET.Core.Systems.Occurrences.PortionKind poco, StringBuilder stringBuilder) + { + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs index b6e0ab28..6a7769ba 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs @@ -29,42 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class PredicateTextualNotationBuilder : TextualNotationBuilder + public static partial class PredicateTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Predicate + /// Predicate=TypePrefix'predicate'ClassifierDeclarationFunctionBody /// - /// The used to query textual notation of referenced - public PredicateTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPredicate(SysML2.NET.Core.POCO.Kernel.Functions.IPredicate poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.Predicate poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Predicate=TypePrefix'predicate'ClassifierDeclarationFunctionBody - - - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("predicate "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' + TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs index c381fbd5..85da06d8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs @@ -29,50 +29,70 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class RedefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class RedefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedRedefinition + /// OwnedRedefinition:Redefinition=redefinedFeature=[QualifiedName]|redefinedFeature=OwnedFeatureChain{ownedRelatedElement+=redefinedFeature} /// - /// The used to query textual notation of referenced - public RedefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule FlowFeatureRedefinition + /// FlowFeatureRedefinition:Redefinition=redefinedFeature=[QualifiedName] /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.Redefinition poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Redefinition=('specialization'Identification)?'redefinition'SpecificTypeREDEFINESGeneralTypeRelationshipBody + // Assignment Element : redefinedFeature = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property redefinedFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // Group Element - stringBuilder.Append("redefinition "); - // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} - - - // non Terminal : REDEFINES; Found rule REDEFINES=':>>'|'redefines' - - - - - // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} - - - - - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + } + /// + /// Builds the Textual Notation string for the rule ParameterRedefinition + /// ParameterRedefinition:Redefinition=redefinedFeature=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) + { + // Assignment Element : redefinedFeature = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property redefinedFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + } + /// + /// Builds the Textual Notation string for the rule Redefinition + /// Redefinition=('specialization'Identification)?'redefinition'SpecificTypeREDEFINESGeneralTypeRelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) + { + // Group Element + stringBuilder.Append("specialization "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append("redefinition "); + // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} + SpecializationTextualNotationBuilder.BuildSpecificType(poco, stringBuilder); + // non Terminal : REDEFINES; Found rule REDEFINES=':>>'|'redefines' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} + SpecializationTextualNotationBuilder.BuildGeneralType(poco, stringBuilder); + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs index 378d2a3d..a9365bea 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs @@ -29,28 +29,30 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ReferenceSubsettingTextualNotationBuilder : TextualNotationBuilder + public static partial class ReferenceSubsettingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedReferenceSubsetting + /// OwnedReferenceSubsetting:ReferenceSubsetting=referencedFeature=[QualifiedName]|referencedFeature=OwnedFeatureChain{ownedRelatedElement+=referenceFeature} /// - /// The used to query textual notation of referenced - public ReferenceSubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedReferenceSubsetting(SysML2.NET.Core.POCO.Core.Features.IReferenceSubsetting poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule FlowEndSubsetting + /// FlowEndSubsetting:ReferenceSubsetting=referencedFeature=[QualifiedName]|referencedFeature=FeatureChainPrefix{ownedRelatedElement+=referencedFeature} /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.ReferenceSubsetting poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowEndSubsetting(SysML2.NET.Core.POCO.Core.Features.IReferenceSubsetting poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs index 19fb28fe..14e9f6ad 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs @@ -29,35 +29,248 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ReferenceUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ReferenceUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedCrossFeature + /// OwnedCrossFeature:ReferenceUsage=BasicUsagePrefixUsageDeclaration /// - /// The used to query textual notation of referenced - public ReferenceUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedCrossFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { + // non Terminal : BasicUsagePrefix; Found rule BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? + UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule DefaultReferenceUsage + /// DefaultReferenceUsage:ReferenceUsage=RefPrefixUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefaultReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + // non Terminal : RefPrefix; Found rule RefPrefix:Usage=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract'|isVariation?='variation')?(isConstant?='constant')? + UsageTextualNotationBuilder.BuildRefPrefix(poco, stringBuilder); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule VariantReference + /// VariantReference:ReferenceUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecialization*UsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : FeatureSpecialization; Found rule FeatureSpecialization:Feature=Typings|Subsettings|References|Crosses|Redefinitions + FeatureTextualNotationBuilder.BuildFeatureSpecialization(poco, stringBuilder); + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SourceEnd + /// SourceEnd:ReferenceUsage=(ownedRelationship+=OwnedMultiplicity)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule ConnectorEnd + /// ConnectorEnd:ReferenceUsage=(ownedRelationship+=OwnedCrossMultiplicityMember)?(declaredName=NAMEREFERENCES)?ownedRelationship+=OwnedReferenceSubsetting + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + // Group Element + // Assignment Element : declaredName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property declaredName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : REFERENCES; Found rule REFERENCES='::>'|'references' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule FlowFeature + /// FlowFeature:ReferenceUsage=ownedRelationship+=FlowFeatureRedefinition + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFlowFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule PayloadParameter + /// PayloadParameter:ReferenceUsage=PayloadFeature|IdentificationPayloadFeatureSpecializationPart?TriggerValuePart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildPayloadParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule NodeParameter + /// NodeParameter:ReferenceUsage=ownedRelationship+=FeatureBinding + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNodeParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule EmptyUsage + /// EmptyUsage:ReferenceUsage={} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + + } + + /// + /// Builds the Textual Notation string for the rule AssignmentTargetParameter + /// AssignmentTargetParameter:ReferenceUsage=(ownedRelationship+=AssignmentTargetBinding'.')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildAssignmentTargetParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(". "); + + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule ForVariableDeclaration + /// ForVariableDeclaration:ReferenceUsage=UsageDeclaration /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.ReferenceUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildForVariableDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : ReferenceUsage=(EndUsagePrefix|RefPrefix)'ref'Usage + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + + } - // Group Element + /// + /// Builds the Textual Notation string for the rule EmptyFeature + /// EmptyFeature:ReferenceUsage={} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + + } + + /// + /// Builds the Textual Notation string for the rule SubjectUsage + /// SubjectUsage:ReferenceUsage='subject'UsageExtensionKeyword*Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubjectUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("subject "); + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SatisfactionParameter + /// SatisfactionParameter:ReferenceUsage=ownedRelationship+=SatisfactionFeatureValue + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule MetadataBodyUsage + /// MetadataBodyUsage:ReferenceUsage='ref'?(':>>'|'redefines')?ownedRelationship+=OwnedRedefinitionFeatureSpecializationPart?ValuePart?MetadataBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBodyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { stringBuilder.Append("ref "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : FeatureSpecializationPart; Found rule FeatureSpecializationPart:Feature=FeatureSpecialization+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization* + FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); + } + /// + /// Builds the Textual Notation string for the rule ReferenceUsage + /// ReferenceUsage=(EndUsagePrefix|RefPrefix)'ref'Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) + { + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append("ref "); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs new file mode 100644 index 00000000..515cedd6 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs @@ -0,0 +1,62 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class RelationshipTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule RelationshipBody + /// RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRelationshipBody(SysML2.NET.Core.POCO.Root.Elements.IRelationship poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule RelationshipOwnedElement + /// RelationshipOwnedElement:Relationship=ownedRelatedElement+=OwnedRelatedElement|ownedRelationship+=OwnedAnnotation + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRelationshipOwnedElement(SysML2.NET.Core.POCO.Root.Elements.IRelationship poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs index d68aeb78..327438b7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs @@ -29,38 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class RenderingDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class RenderingDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule RenderingDefinition + /// RenderingDefinition=OccurrenceDefinitionPrefix'rendering''def'Definition /// - /// The used to query textual notation of referenced - public RenderingDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRenderingDefinition(SysML2.NET.Core.POCO.Systems.Views.IRenderingDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.RenderingDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : RenderingDefinition=OccurrenceDefinitionPrefix'rendering''def'Definition - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("rendering "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody - - + // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody + DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs index 0093a76a..07f3ad6a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs @@ -29,39 +29,35 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class RenderingUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class RenderingUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ViewRenderingUsage + /// ViewRenderingUsage:RenderingUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?UsageBody|(UsageExtensionKeyword*'rendering'|UsageExtensionKeyword+)Usage /// - /// The used to query textual notation of referenced - public RenderingUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule RenderingUsage + /// RenderingUsage=OccurrenceUsagePrefix'rendering'Usage /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.RenderingUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : RenderingUsage=OccurrenceUsagePrefix'rendering'Usage - - - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("rendering "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion - - + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs index 3be5c9fa..26a4e00a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs @@ -29,28 +29,36 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class RequirementConstraintMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class RequirementConstraintMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule RequirementConstraintMember + /// RequirementConstraintMember:RequirementConstraintMembership=MemberPrefix?RequirementKindownedRelatedElement+=RequirementConstraintUsage /// - /// The used to query textual notation of referenced - public RequirementConstraintMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementConstraintMember(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, StringBuilder stringBuilder) { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // non Terminal : RequirementKind; Found rule RequirementKind:RequirementConstraintMembership='assume'{kind='assumption'}|'require'{kind='requirement'} + BuildRequirementKind(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule RequirementKind + /// RequirementKind:RequirementConstraintMembership='assume'{kind='assumption'}|'require'{kind='requirement'} /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.RequirementConstraintMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementKind(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs index d891905f..9cabc030 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class RequirementDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class RequirementDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule RequirementDefinition + /// RequirementDefinition=OccurrenceDefinitionPrefix'requirement''def'DefinitionDeclarationRequirementBody /// - /// The used to query textual notation of referenced - public RequirementDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.RequirementDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : RequirementDefinition=OccurrenceDefinitionPrefix'requirement''def'DefinitionDeclarationRequirementBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("requirement "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs index b400dc7c..eac6fee0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs @@ -29,44 +29,54 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class RequirementUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class RequirementUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ObjectiveRequirementUsage + /// ObjectiveRequirementUsage:RequirementUsage=UsageExtensionKeyword*ConstraintUsageDeclarationRequirementBody /// - /// The used to query textual notation of referenced - public RequirementUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildObjectiveRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, StringBuilder stringBuilder) { + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule RequirementVerificationUsage + /// RequirementVerificationUsage:RequirementUsage=ownedRelationship+=OwnedReferenceSubsettingFeatureSpecialization*RequirementBody|(UsageExtensionKeyword*'requirement'|UsageExtensionKeyword+)ConstraintUsageDeclarationRequirementBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.RequirementUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementVerificationUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : RequirementUsage=OccurrenceUsagePrefix'requirement'ConstraintUsageDeclarationRequirementBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule RequirementUsage + /// RequirementUsage=OccurrenceUsagePrefix'requirement'ConstraintUsageDeclarationRequirementBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("requirement "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - - - - - - - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' - - + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs index f4a28e3e..eff80fd3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs @@ -29,28 +29,25 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class RequirementVerificationMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class RequirementVerificationMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule RequirementVerificationMember + /// RequirementVerificationMember:RequirementVerificationMembership=MemberPrefix'verify'{kind='requirement'}ownedRelatedElement+=RequirementVerificationUsage /// - /// The used to query textual notation of referenced - public RequirementVerificationMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementVerificationMember(SysML2.NET.Core.POCO.Systems.VerificationCases.IRequirementVerificationMembership poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.VerificationCases.RequirementVerificationMembership poco) - { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("verify "); + // Assignment Element : kind = 'requirement' + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs index b4a3e1cd..f8f176bb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs @@ -29,28 +29,23 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ResultExpressionMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class ResultExpressionMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ResultExpressionMember + /// ResultExpressionMember:ResultExpressionMembership=MemberPrefix?ownedRelatedElement+=OwnedExpression /// - /// The used to query textual notation of referenced - public ResultExpressionMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildResultExpressionMember(SysML2.NET.Core.POCO.Kernel.Functions.IResultExpressionMembership poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.ResultExpressionMembership poco) - { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs index c4d4b05a..7000f70f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs @@ -29,28 +29,66 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ReturnParameterMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class ReturnParameterMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ReturnParameterMember + /// ReturnParameterMember:ReturnParameterMembership=MemberPrefix?'return'ownedRelatedElement+=UsageElement /// - /// The used to query textual notation of referenced - public ReturnParameterMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("return "); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule ReturnFeatureMember + /// ReturnFeatureMember:ReturnParameterMembership=MemberPrefix'return'ownedRelatedElement+=FeatureElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("return "); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule EmptyResultMember + /// EmptyResultMember:ReturnParameterMembership=ownedRelatedElement+=EmptyFeature + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule ConstructorResultMember + /// ConstructorResultMember:ReturnParameterMembership=ownedRelatedElement+=ConstructorResult /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Functions.ReturnParameterMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConstructorResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs index c6a117f2..d8a0820d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs @@ -29,44 +29,38 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SatisfyRequirementUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class SatisfyRequirementUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SatisfyRequirementUsage + /// SatisfyRequirementUsage=OccurrenceUsagePrefix'assert'(isNegated?='not')'satisfy'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'requirement'UsageDeclaration)ValuePart?('by'ownedRelationship+=SatisfactionSubjectMember)?RequirementBody /// - /// The used to query textual notation of referenced - public SatisfyRequirementUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSatisfyRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.ISatisfyRequirementUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.SatisfyRequirementUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : SatisfyRequirementUsage=OccurrenceUsagePrefix'assert'(isNegated?='not')'satisfy'(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'requirement'UsageDeclaration)ValuePart?('by'ownedRelationship+=SatisfactionSubjectMember)?RequirementBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("assert "); - // Group Element - stringBuilder.Append("satisfy "); - // Group Element - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue - - - // Group Element - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + // Group Element + // Assignment Element : isNegated ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isNegated value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + stringBuilder.Append("satisfy "); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // Group Element + stringBuilder.Append("by "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs index 95ad32bd..a5070298 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs @@ -29,33 +29,24 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SelectExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class SelectExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SelectExpression + /// SelectExpression=ownedRelationship+=PrimaryArgumentMember'.?'ownedRelationship+=BodyArgumentMember /// - /// The used to query textual notation of referenced - public SelectExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSelectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ISelectExpression poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Expressions.SelectExpression poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : SelectExpression=ownedRelationship+=PrimaryArgumentMember'.?'ownedRelationship+=BodyArgumentMember - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append(".? "); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs index d2ba96e3..1c64068f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs @@ -29,28 +29,91 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SendActionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class SendActionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SendNode + /// SendNode:SendActionUsage=OccurrenceUsagePrefixActionUsageDeclaration?'send'(ownedRelationship+=NodeParameterMemberSenderReceiverPart?|ownedRelationship+=EmptyParameterMemberSenderReceiverPart)?ActionBody /// - /// The used to query textual notation of referenced - public SendActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSendNode(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? + ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("send "); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule SendNodeDeclaration + /// SendNodeDeclaration:SendActionUsage=ActionNodeUsageDeclaration?'send'ownedRelationship+=NodeParameterMemberSenderReceiverPart? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSendNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? + ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("send "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : SenderReceiverPart; Found rule SenderReceiverPart:SendActionUsage='via'ownedRelationship+=NodeParameterMember('to'ownedRelationship+=NodeParameterMember)?|ownedRelationship+=EmptyParameterMember'to'ownedRelationship+=NodeParameterMember + BuildSenderReceiverPart(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule SenderReceiverPart + /// SenderReceiverPart:SendActionUsage='via'ownedRelationship+=NodeParameterMember('to'ownedRelationship+=NodeParameterMember)?|ownedRelationship+=EmptyParameterMember'to'ownedRelationship+=NodeParameterMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.SendActionUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSenderReceiverPart(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule StateSendActionUsage + /// StateSendActionUsage:SendActionUsage=SendNodeDeclarationActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : SendNodeDeclaration; Found rule SendNodeDeclaration:SendActionUsage=ActionNodeUsageDeclaration?'send'ownedRelationship+=NodeParameterMemberSenderReceiverPart? + BuildSendNodeDeclaration(poco, stringBuilder); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TransitionSendActionUsage + /// TransitionSendActionUsage:SendActionUsage=SendNodeDeclaration('{'ActionBodyItem*'}')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) + { + // non Terminal : SendNodeDeclaration; Found rule SendNodeDeclaration:SendActionUsage=ActionNodeUsageDeclaration?'send'ownedRelationship+=NodeParameterMemberSenderReceiverPart? + BuildSendNodeDeclaration(poco, stringBuilder); + // Group Element + stringBuilder.Append("{ "); + // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember + TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); + stringBuilder.Append("} "); + - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs index c2b7ad8d..37383b30 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs @@ -29,48 +29,68 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SpecializationTextualNotationBuilder : TextualNotationBuilder + public static partial class SpecializationTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedSpecialization + /// OwnedSpecialization:Specialization=GeneralType /// - /// The used to query textual notation of referenced - public SpecializationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, StringBuilder stringBuilder) { + // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} + BuildGeneralType(poco, stringBuilder); + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule SpecificType + /// SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Specialization poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSpecificType(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Specialization=('specialization'Identification)?'subtype'SpecificTypeSPECIALIZESGeneralTypeRelationshipBody - - // Group Element - stringBuilder.Append("subtype "); - // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} - - - // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' - - - // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} - - - - - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' - + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule GeneralType + /// GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildGeneralType(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule Specialization + /// Specialization=('specialization'Identification)?'subtype'SpecificTypeSPECIALIZESGeneralTypeRelationshipBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, StringBuilder stringBuilder) + { + // Group Element + stringBuilder.Append("specialization "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append("subtype "); + // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} + BuildSpecificType(poco, stringBuilder); + // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} + BuildGeneralType(poco, stringBuilder); + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs index a30fccb5..22568394 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs @@ -29,28 +29,23 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class StakeholderMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class StakeholderMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule StakeholderMember + /// StakeholderMember:StakeholderMembership=MemberPrefixownedRelatedElement+=StakeholderUsage /// - /// The used to query textual notation of referenced - public StakeholderMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStakeholderMember(SysML2.NET.Core.POCO.Systems.Requirements.IStakeholderMembership poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.StakeholderMembership poco) - { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs index 09f17f2e..8aefc1e5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs @@ -29,41 +29,38 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class StateDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class StateDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule StateDefBody + /// StateDefBody:StateDefinition=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' /// - /// The used to query textual notation of referenced - public StateDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateDefBody(SysML2.NET.Core.POCO.Systems.States.IStateDefinition poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule StateDefinition + /// StateDefinition=OccurrenceDefinitionPrefix'state''def'DefinitionDeclarationStateDefBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.StateDefinition poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateDefinition(SysML2.NET.Core.POCO.Systems.States.IStateDefinition poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : StateDefinition=OccurrenceDefinitionPrefix'state''def'DefinitionDeclarationStateDefBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("state "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : StateDefBody; Found rule StateDefBody:StateDefinition=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : StateDefBody; Found rule StateDefBody:StateDefinition=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' + BuildStateDefBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs index d8693999..3bf417c2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs @@ -29,28 +29,59 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class StateSubactionMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class StateSubactionMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule EntryActionMember + /// EntryActionMember:StateSubactionMembership=MemberPrefixkind='entry'ownedRelatedElement+=StateActionUsage /// - /// The used to query textual notation of referenced - public StateSubactionMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : kind = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property kind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule DoActionMember + /// DoActionMember:StateSubactionMembership=MemberPrefixkind='do'ownedRelatedElement+=StateActionUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) + { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : kind = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property kind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule ExitActionMember + /// ExitActionMember:StateSubactionMembership=MemberPrefixkind='exit'ownedRelatedElement+=StateActionUsage /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.StateSubactionMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExitActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : kind = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property kind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs index 29922472..4d2c2ef6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs @@ -29,40 +29,37 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class StateUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class StateUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule StateUsageBody + /// StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' /// - /// The used to query textual notation of referenced - public StateUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateUsageBody(SysML2.NET.Core.POCO.Systems.States.IStateUsage poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule StateUsage + /// StateUsage=OccurrenceUsagePrefix'state'ActionUsageDeclarationStateUsageBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.StateUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateUsage(SysML2.NET.Core.POCO.Systems.States.IStateUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : StateUsage=OccurrenceUsagePrefix'state'ActionUsageDeclarationStateUsageBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("state "); - // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? - - - // non Terminal : StateUsageBody; Found rule StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' - - + // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? + ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); + // non Terminal : StateUsageBody; Found rule StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' + BuildStateUsageBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs index fc747a3a..f5a9d724 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs @@ -29,49 +29,34 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class StepTextualNotationBuilder : TextualNotationBuilder + public static partial class StepTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Step + /// Step=FeaturePrefix'step'FeatureDeclarationValuePart?TypeBody /// - /// The used to query textual notation of referenced - public StepTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStep(SysML2.NET.Core.POCO.Kernel.Behaviors.IStep poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Behaviors.Step poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Step=FeaturePrefix'step'FeatureDeclarationValuePart?TypeBody - - - - - - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("step "); - // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* - - - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* + FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs index 12965dac..b7e1ed7a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs @@ -29,42 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class StructureTextualNotationBuilder : TextualNotationBuilder + public static partial class StructureTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Structure + /// Structure=TypePrefix'struct'ClassifierDeclarationTypeBody /// - /// The used to query textual notation of referenced - public StructureTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStructure(SysML2.NET.Core.POCO.Kernel.Structures.IStructure poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Structures.Structure poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Structure=TypePrefix'struct'ClassifierDeclarationTypeBody - - - - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("struct "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* + ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs index 33cdd0f8..e2546bed 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs @@ -29,42 +29,46 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SubclassificationTextualNotationBuilder : TextualNotationBuilder + public static partial class SubclassificationTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedSubclassification + /// OwnedSubclassification:Subclassification=superClassifier=[QualifiedName] /// - /// The used to query textual notation of referenced - public SubclassificationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, StringBuilder stringBuilder) { + // Assignment Element : superClassifier = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property superclassifier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule Subclassification + /// Subclassification=('specialization'Identification)?'subclassifier'subclassifier=[QualifiedName]SPECIALIZESsuperclassifier=[QualifiedName]RelationshipBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Classifiers.Subclassification poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Subclassification=('specialization'Identification)?'subclassifier'subclassifier=[QualifiedName]SPECIALIZESsuperclassifier=[QualifiedName]RelationshipBody + // Group Element + stringBuilder.Append("specialization "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element stringBuilder.Append("subclassifier "); - // Assignment Element : subclassifier = - // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' - - - // Assignment Element : superclassifier = - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' - - - - + // Assignment Element : subclassifier = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property subclassifier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : superclassifier = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property superclassifier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs index 2e048911..405b3537 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs @@ -29,28 +29,36 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SubjectMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class SubjectMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SubjectMember + /// SubjectMember:SubjectMembership=MemberPrefixownedRelatedElement+=SubjectUsage /// - /// The used to query textual notation of referenced - public SubjectMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, StringBuilder stringBuilder) { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule SatisfactionSubjectMember + /// SatisfactionSubjectMember:SubjectMembership=ownedRelatedElement+=SatisfactionParameter /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Requirements.SubjectMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSatisfactionSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs index 13ea3ffa..3c1d4674 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs @@ -29,48 +29,44 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SubsettingTextualNotationBuilder : TextualNotationBuilder + public static partial class SubsettingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedSubsetting + /// OwnedSubsetting:Subsetting=subsettedFeature=[QualifiedName]|subsettedFeature=OwnedFeatureChain{ownedRelatedElement+=subsettedFeature} /// - /// The used to query textual notation of referenced - public SubsettingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule Subsetting + /// Subsetting=('specialization'Identification)?'subset'SpecificTypeSUBSETSGeneralTypeRelationshipBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.Subsetting poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Subsetting=('specialization'Identification)?'subset'SpecificTypeSUBSETSGeneralTypeRelationshipBody + // Group Element + stringBuilder.Append("specialization "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element stringBuilder.Append("subset "); - // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} + // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} + SpecializationTextualNotationBuilder.BuildSpecificType(poco, stringBuilder); + // non Terminal : SUBSETS; Found rule SUBSETS=':>'|'subsets' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} + SpecializationTextualNotationBuilder.BuildGeneralType(poco, stringBuilder); + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); - - // non Terminal : SUBSETS; Found rule SUBSETS=':>'|'subsets' - - - // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} - - - - - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' - - - - - - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs index 0d22683a..8761e5f7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs @@ -29,45 +29,63 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SuccessionAsUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class SuccessionAsUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SourceSuccession + /// SourceSuccession:SuccessionAsUsage=ownedRelationship+=SourceEndMember /// - /// The used to query textual notation of referenced - public SuccessionAsUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule TargetSuccession + /// TargetSuccession:SuccessionAsUsage=ownedRelationship+=SourceEndMember'then'ownedRelationship+=ConnectorEndMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Connections.SuccessionAsUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : SuccessionAsUsage=UsagePrefix('succession'UsageDeclaration)?'first's.ownedRelationship+=ConnectorEndMember'then's.ownedRelationship+=ConnectorEndMemberUsageBody - - - - + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("then "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + } + /// + /// Builds the Textual Notation string for the rule SuccessionAsUsage + /// SuccessionAsUsage=UsagePrefix('succession'UsageDeclaration)?'first's.ownedRelationship+=ConnectorEndMember'then's.ownedRelationship+=ConnectorEndMemberUsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccessionAsUsage(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) + { + // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); + // Group Element + stringBuilder.Append("succession "); + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // Group Element stringBuilder.Append("first "); - // Assignment Element : s.ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("then "); - // Assignment Element : s.ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody - - + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs index 91e59333..cd9efa5f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs @@ -29,43 +29,33 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SuccessionFlowTextualNotationBuilder : TextualNotationBuilder + public static partial class SuccessionFlowTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SuccessionFlow + /// SuccessionFlow=FeaturePrefix'succession''flow'FlowDeclarationTypeBody /// - /// The used to query textual notation of referenced - public SuccessionFlowTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccessionFlow(SysML2.NET.Core.POCO.Kernel.Interactions.ISuccessionFlow poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Interactions.SuccessionFlow poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : SuccessionFlow=FeaturePrefix'succession''flow'FlowDeclarationTypeBody - - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - - + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("succession "); stringBuilder.Append("flow "); - // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs index 130e3c6c..ab339d4e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SuccessionFlowUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class SuccessionFlowUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule SuccessionFlowUsage + /// SuccessionFlowUsage=OccurrenceUsagePrefix'succession''flow'FlowDeclarationDefinitionBody /// - /// The used to query textual notation of referenced - public SuccessionFlowUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccessionFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.ISuccessionFlowUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Flows.SuccessionFlowUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : SuccessionFlowUsage=OccurrenceUsagePrefix'succession''flow'FlowDeclarationDefinitionBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("succession "); stringBuilder.Append("flow "); - // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember - - - // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' - - + // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember + FlowUsageTextualNotationBuilder.BuildFlowDeclaration(poco, stringBuilder); + // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs index 346ac701..eea58269 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs @@ -29,46 +29,58 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class SuccessionTextualNotationBuilder : TextualNotationBuilder + public static partial class SuccessionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule TransitionSuccession + /// TransitionSuccession:Succession=ownedRelationship+=EmptyEndMemberownedRelationship+=ConnectorEndMember /// - /// The used to query textual notation of referenced - public SuccessionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule SuccessionDeclaration + /// SuccessionDeclaration:Succession=FeatureDeclaration('first'ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)?|(s.isSufficient?='all')?('first'?ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)? /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Kernel.Connectors.Succession poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccessionDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Succession=FeaturePrefix'succession'SuccessionDeclarationTypeBody - - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule Succession + /// Succession=FeaturePrefix'succession'SuccessionDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) + { + // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement stringBuilder.Append("succession "); - // non Terminal : SuccessionDeclaration; Found rule SuccessionDeclaration:Succession=FeatureDeclaration('first'ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)?|(s.isSufficient?='all')?('first'?ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)? - - - - - - - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' - - + // non Terminal : SuccessionDeclaration; Found rule SuccessionDeclaration:Succession=FeatureDeclaration('first'ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)?|(s.isSufficient?='all')?('first'?ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)? + BuildSuccessionDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs index e59cfd38..79445b00 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs @@ -29,28 +29,30 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class TerminateActionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class TerminateActionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule TerminateNode + /// TerminateNode:TerminateActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration?'terminate'(ownedRelationship+=NodeParameterMember)?ActionBody /// - /// The used to query textual notation of referenced - public TerminateActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTerminateNode(SysML2.NET.Core.POCO.Systems.Actions.ITerminateActionUsage poco, StringBuilder stringBuilder) { - } + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); + // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? + ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("terminate "); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.TerminateActionUsage poco) - { - var stringBuilder = new StringBuilder(); + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualNotationBuilderFacade.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualNotationBuilderFacade.cs deleted file mode 100644 index 20ed5cb6..00000000 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualNotationBuilderFacade.cs +++ /dev/null @@ -1,722 +0,0 @@ -// ------------------------------------------------------------------------------------------------- -// -// -// 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. -// -// -// ------------------------------------------------------------------------------------------------ - -// ------------------------------------------------------------------------------------------------ -// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- -// ------------------------------------------------------------------------------------------------ - -namespace SysML2.NET.TextualNotation -{ - using System; - - using SysML2.NET.Core.POCO.Root.Elements; - - /// - /// The provides access to built textual notation for via - /// - public class TextualNotationBuilderFacade : ITextualNotationBuilderFacade - { - /// - /// Queries the Textual Notation of an - /// - /// The to built textual notation from - /// The built textual notation string - public string QueryTextualNotationOfElement(IElement element) - { - switch (element) - { - case SysML2.NET.Core.POCO.Systems.Ports.PortUsage pocoPortUsage: - var portUsageTextualNotationBuilder = new PortUsageTextualNotationBuilder(this); - return portUsageTextualNotationBuilder.BuildTextualNotation(pocoPortUsage); - - case SysML2.NET.Core.POCO.Systems.Ports.PortDefinition pocoPortDefinition: - var portDefinitionTextualNotationBuilder = new PortDefinitionTextualNotationBuilder(this); - return portDefinitionTextualNotationBuilder.BuildTextualNotation(pocoPortDefinition); - - case SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortDefinition pocoConjugatedPortDefinition: - var conjugatedPortDefinitionTextualNotationBuilder = new ConjugatedPortDefinitionTextualNotationBuilder(this); - return conjugatedPortDefinitionTextualNotationBuilder.BuildTextualNotation(pocoConjugatedPortDefinition); - - case SysML2.NET.Core.POCO.Systems.Ports.PortConjugation pocoPortConjugation: - var portConjugationTextualNotationBuilder = new PortConjugationTextualNotationBuilder(this); - return portConjugationTextualNotationBuilder.BuildTextualNotation(pocoPortConjugation); - - case SysML2.NET.Core.POCO.Systems.Ports.ConjugatedPortTyping pocoConjugatedPortTyping: - var conjugatedPortTypingTextualNotationBuilder = new ConjugatedPortTypingTextualNotationBuilder(this); - return conjugatedPortTypingTextualNotationBuilder.BuildTextualNotation(pocoConjugatedPortTyping); - - case SysML2.NET.Core.POCO.Systems.Attributes.AttributeDefinition pocoAttributeDefinition: - var attributeDefinitionTextualNotationBuilder = new AttributeDefinitionTextualNotationBuilder(this); - return attributeDefinitionTextualNotationBuilder.BuildTextualNotation(pocoAttributeDefinition); - - case SysML2.NET.Core.POCO.Systems.Attributes.AttributeUsage pocoAttributeUsage: - var attributeUsageTextualNotationBuilder = new AttributeUsageTextualNotationBuilder(this); - return attributeUsageTextualNotationBuilder.BuildTextualNotation(pocoAttributeUsage); - - case SysML2.NET.Core.POCO.Systems.Actions.AcceptActionUsage pocoAcceptActionUsage: - var acceptActionUsageTextualNotationBuilder = new AcceptActionUsageTextualNotationBuilder(this); - return acceptActionUsageTextualNotationBuilder.BuildTextualNotation(pocoAcceptActionUsage); - - case SysML2.NET.Core.POCO.Systems.Actions.SendActionUsage pocoSendActionUsage: - var sendActionUsageTextualNotationBuilder = new SendActionUsageTextualNotationBuilder(this); - return sendActionUsageTextualNotationBuilder.BuildTextualNotation(pocoSendActionUsage); - - case SysML2.NET.Core.POCO.Systems.Actions.PerformActionUsage pocoPerformActionUsage: - var performActionUsageTextualNotationBuilder = new PerformActionUsageTextualNotationBuilder(this); - return performActionUsageTextualNotationBuilder.BuildTextualNotation(pocoPerformActionUsage); - - case SysML2.NET.Core.POCO.Systems.Actions.ForkNode pocoForkNode: - var forkNodeTextualNotationBuilder = new ForkNodeTextualNotationBuilder(this); - return forkNodeTextualNotationBuilder.BuildTextualNotation(pocoForkNode); - - case SysML2.NET.Core.POCO.Systems.Actions.JoinNode pocoJoinNode: - var joinNodeTextualNotationBuilder = new JoinNodeTextualNotationBuilder(this); - return joinNodeTextualNotationBuilder.BuildTextualNotation(pocoJoinNode); - - case SysML2.NET.Core.POCO.Systems.Actions.ActionUsage pocoActionUsage: - var actionUsageTextualNotationBuilder = new ActionUsageTextualNotationBuilder(this); - return actionUsageTextualNotationBuilder.BuildTextualNotation(pocoActionUsage); - - case SysML2.NET.Core.POCO.Systems.Actions.DecisionNode pocoDecisionNode: - var decisionNodeTextualNotationBuilder = new DecisionNodeTextualNotationBuilder(this); - return decisionNodeTextualNotationBuilder.BuildTextualNotation(pocoDecisionNode); - - case SysML2.NET.Core.POCO.Systems.Actions.MergeNode pocoMergeNode: - var mergeNodeTextualNotationBuilder = new MergeNodeTextualNotationBuilder(this); - return mergeNodeTextualNotationBuilder.BuildTextualNotation(pocoMergeNode); - - case SysML2.NET.Core.POCO.Systems.Actions.ActionDefinition pocoActionDefinition: - var actionDefinitionTextualNotationBuilder = new ActionDefinitionTextualNotationBuilder(this); - return actionDefinitionTextualNotationBuilder.BuildTextualNotation(pocoActionDefinition); - - case SysML2.NET.Core.POCO.Systems.Actions.IfActionUsage pocoIfActionUsage: - var ifActionUsageTextualNotationBuilder = new IfActionUsageTextualNotationBuilder(this); - return ifActionUsageTextualNotationBuilder.BuildTextualNotation(pocoIfActionUsage); - - case SysML2.NET.Core.POCO.Systems.Actions.ForLoopActionUsage pocoForLoopActionUsage: - var forLoopActionUsageTextualNotationBuilder = new ForLoopActionUsageTextualNotationBuilder(this); - return forLoopActionUsageTextualNotationBuilder.BuildTextualNotation(pocoForLoopActionUsage); - - case SysML2.NET.Core.POCO.Systems.Actions.AssignmentActionUsage pocoAssignmentActionUsage: - var assignmentActionUsageTextualNotationBuilder = new AssignmentActionUsageTextualNotationBuilder(this); - return assignmentActionUsageTextualNotationBuilder.BuildTextualNotation(pocoAssignmentActionUsage); - - case SysML2.NET.Core.POCO.Systems.Actions.WhileLoopActionUsage pocoWhileLoopActionUsage: - var whileLoopActionUsageTextualNotationBuilder = new WhileLoopActionUsageTextualNotationBuilder(this); - return whileLoopActionUsageTextualNotationBuilder.BuildTextualNotation(pocoWhileLoopActionUsage); - - case SysML2.NET.Core.POCO.Systems.Actions.TriggerInvocationExpression pocoTriggerInvocationExpression: - var triggerInvocationExpressionTextualNotationBuilder = new TriggerInvocationExpressionTextualNotationBuilder(this); - return triggerInvocationExpressionTextualNotationBuilder.BuildTextualNotation(pocoTriggerInvocationExpression); - - case SysML2.NET.Core.POCO.Systems.Actions.TerminateActionUsage pocoTerminateActionUsage: - var terminateActionUsageTextualNotationBuilder = new TerminateActionUsageTextualNotationBuilder(this); - return terminateActionUsageTextualNotationBuilder.BuildTextualNotation(pocoTerminateActionUsage); - - case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Definition pocoDefinition: - var definitionTextualNotationBuilder = new DefinitionTextualNotationBuilder(this); - return definitionTextualNotationBuilder.BuildTextualNotation(pocoDefinition); - - case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Usage pocoUsage: - var usageTextualNotationBuilder = new UsageTextualNotationBuilder(this); - return usageTextualNotationBuilder.BuildTextualNotation(pocoUsage); - - case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.ReferenceUsage pocoReferenceUsage: - var referenceUsageTextualNotationBuilder = new ReferenceUsageTextualNotationBuilder(this); - return referenceUsageTextualNotationBuilder.BuildTextualNotation(pocoReferenceUsage); - - case SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.VariantMembership pocoVariantMembership: - var variantMembershipTextualNotationBuilder = new VariantMembershipTextualNotationBuilder(this); - return variantMembershipTextualNotationBuilder.BuildTextualNotation(pocoVariantMembership); - - case SysML2.NET.Core.POCO.Systems.Parts.PartDefinition pocoPartDefinition: - var partDefinitionTextualNotationBuilder = new PartDefinitionTextualNotationBuilder(this); - return partDefinitionTextualNotationBuilder.BuildTextualNotation(pocoPartDefinition); - - case SysML2.NET.Core.POCO.Systems.Parts.PartUsage pocoPartUsage: - var partUsageTextualNotationBuilder = new PartUsageTextualNotationBuilder(this); - return partUsageTextualNotationBuilder.BuildTextualNotation(pocoPartUsage); - - case SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceUsage pocoInterfaceUsage: - var interfaceUsageTextualNotationBuilder = new InterfaceUsageTextualNotationBuilder(this); - return interfaceUsageTextualNotationBuilder.BuildTextualNotation(pocoInterfaceUsage); - - case SysML2.NET.Core.POCO.Systems.Interfaces.InterfaceDefinition pocoInterfaceDefinition: - var interfaceDefinitionTextualNotationBuilder = new InterfaceDefinitionTextualNotationBuilder(this); - return interfaceDefinitionTextualNotationBuilder.BuildTextualNotation(pocoInterfaceDefinition); - - case SysML2.NET.Core.POCO.Systems.States.StateUsage pocoStateUsage: - var stateUsageTextualNotationBuilder = new StateUsageTextualNotationBuilder(this); - return stateUsageTextualNotationBuilder.BuildTextualNotation(pocoStateUsage); - - case SysML2.NET.Core.POCO.Systems.States.StateSubactionMembership pocoStateSubactionMembership: - var stateSubactionMembershipTextualNotationBuilder = new StateSubactionMembershipTextualNotationBuilder(this); - return stateSubactionMembershipTextualNotationBuilder.BuildTextualNotation(pocoStateSubactionMembership); - - case SysML2.NET.Core.POCO.Systems.States.StateDefinition pocoStateDefinition: - var stateDefinitionTextualNotationBuilder = new StateDefinitionTextualNotationBuilder(this); - return stateDefinitionTextualNotationBuilder.BuildTextualNotation(pocoStateDefinition); - - case SysML2.NET.Core.POCO.Systems.States.TransitionUsage pocoTransitionUsage: - var transitionUsageTextualNotationBuilder = new TransitionUsageTextualNotationBuilder(this); - return transitionUsageTextualNotationBuilder.BuildTextualNotation(pocoTransitionUsage); - - case SysML2.NET.Core.POCO.Systems.States.TransitionFeatureMembership pocoTransitionFeatureMembership: - var transitionFeatureMembershipTextualNotationBuilder = new TransitionFeatureMembershipTextualNotationBuilder(this); - return transitionFeatureMembershipTextualNotationBuilder.BuildTextualNotation(pocoTransitionFeatureMembership); - - case SysML2.NET.Core.POCO.Systems.States.ExhibitStateUsage pocoExhibitStateUsage: - var exhibitStateUsageTextualNotationBuilder = new ExhibitStateUsageTextualNotationBuilder(this); - return exhibitStateUsageTextualNotationBuilder.BuildTextualNotation(pocoExhibitStateUsage); - - case SysML2.NET.Core.POCO.Systems.Constraints.ConstraintUsage pocoConstraintUsage: - var constraintUsageTextualNotationBuilder = new ConstraintUsageTextualNotationBuilder(this); - return constraintUsageTextualNotationBuilder.BuildTextualNotation(pocoConstraintUsage); - - case SysML2.NET.Core.POCO.Systems.Constraints.ConstraintDefinition pocoConstraintDefinition: - var constraintDefinitionTextualNotationBuilder = new ConstraintDefinitionTextualNotationBuilder(this); - return constraintDefinitionTextualNotationBuilder.BuildTextualNotation(pocoConstraintDefinition); - - case SysML2.NET.Core.POCO.Systems.Constraints.AssertConstraintUsage pocoAssertConstraintUsage: - var assertConstraintUsageTextualNotationBuilder = new AssertConstraintUsageTextualNotationBuilder(this); - return assertConstraintUsageTextualNotationBuilder.BuildTextualNotation(pocoAssertConstraintUsage); - - case SysML2.NET.Core.POCO.Systems.Requirements.RequirementDefinition pocoRequirementDefinition: - var requirementDefinitionTextualNotationBuilder = new RequirementDefinitionTextualNotationBuilder(this); - return requirementDefinitionTextualNotationBuilder.BuildTextualNotation(pocoRequirementDefinition); - - case SysML2.NET.Core.POCO.Systems.Requirements.SatisfyRequirementUsage pocoSatisfyRequirementUsage: - var satisfyRequirementUsageTextualNotationBuilder = new SatisfyRequirementUsageTextualNotationBuilder(this); - return satisfyRequirementUsageTextualNotationBuilder.BuildTextualNotation(pocoSatisfyRequirementUsage); - - case SysML2.NET.Core.POCO.Systems.Requirements.RequirementUsage pocoRequirementUsage: - var requirementUsageTextualNotationBuilder = new RequirementUsageTextualNotationBuilder(this); - return requirementUsageTextualNotationBuilder.BuildTextualNotation(pocoRequirementUsage); - - case SysML2.NET.Core.POCO.Systems.Requirements.RequirementConstraintMembership pocoRequirementConstraintMembership: - var requirementConstraintMembershipTextualNotationBuilder = new RequirementConstraintMembershipTextualNotationBuilder(this); - return requirementConstraintMembershipTextualNotationBuilder.BuildTextualNotation(pocoRequirementConstraintMembership); - - case SysML2.NET.Core.POCO.Systems.Requirements.SubjectMembership pocoSubjectMembership: - var subjectMembershipTextualNotationBuilder = new SubjectMembershipTextualNotationBuilder(this); - return subjectMembershipTextualNotationBuilder.BuildTextualNotation(pocoSubjectMembership); - - case SysML2.NET.Core.POCO.Systems.Requirements.FramedConcernMembership pocoFramedConcernMembership: - var framedConcernMembershipTextualNotationBuilder = new FramedConcernMembershipTextualNotationBuilder(this); - return framedConcernMembershipTextualNotationBuilder.BuildTextualNotation(pocoFramedConcernMembership); - - case SysML2.NET.Core.POCO.Systems.Requirements.ConcernDefinition pocoConcernDefinition: - var concernDefinitionTextualNotationBuilder = new ConcernDefinitionTextualNotationBuilder(this); - return concernDefinitionTextualNotationBuilder.BuildTextualNotation(pocoConcernDefinition); - - case SysML2.NET.Core.POCO.Systems.Requirements.ConcernUsage pocoConcernUsage: - var concernUsageTextualNotationBuilder = new ConcernUsageTextualNotationBuilder(this); - return concernUsageTextualNotationBuilder.BuildTextualNotation(pocoConcernUsage); - - case SysML2.NET.Core.POCO.Systems.Requirements.StakeholderMembership pocoStakeholderMembership: - var stakeholderMembershipTextualNotationBuilder = new StakeholderMembershipTextualNotationBuilder(this); - return stakeholderMembershipTextualNotationBuilder.BuildTextualNotation(pocoStakeholderMembership); - - case SysML2.NET.Core.POCO.Systems.Requirements.ActorMembership pocoActorMembership: - var actorMembershipTextualNotationBuilder = new ActorMembershipTextualNotationBuilder(this); - return actorMembershipTextualNotationBuilder.BuildTextualNotation(pocoActorMembership); - - case SysML2.NET.Core.POCO.Systems.Calculations.CalculationDefinition pocoCalculationDefinition: - var calculationDefinitionTextualNotationBuilder = new CalculationDefinitionTextualNotationBuilder(this); - return calculationDefinitionTextualNotationBuilder.BuildTextualNotation(pocoCalculationDefinition); - - case SysML2.NET.Core.POCO.Systems.Calculations.CalculationUsage pocoCalculationUsage: - var calculationUsageTextualNotationBuilder = new CalculationUsageTextualNotationBuilder(this); - return calculationUsageTextualNotationBuilder.BuildTextualNotation(pocoCalculationUsage); - - case SysML2.NET.Core.POCO.Systems.Connections.ConnectionDefinition pocoConnectionDefinition: - var connectionDefinitionTextualNotationBuilder = new ConnectionDefinitionTextualNotationBuilder(this); - return connectionDefinitionTextualNotationBuilder.BuildTextualNotation(pocoConnectionDefinition); - - case SysML2.NET.Core.POCO.Systems.Connections.ConnectionUsage pocoConnectionUsage: - var connectionUsageTextualNotationBuilder = new ConnectionUsageTextualNotationBuilder(this); - return connectionUsageTextualNotationBuilder.BuildTextualNotation(pocoConnectionUsage); - - case SysML2.NET.Core.POCO.Systems.Connections.SuccessionAsUsage pocoSuccessionAsUsage: - var successionAsUsageTextualNotationBuilder = new SuccessionAsUsageTextualNotationBuilder(this); - return successionAsUsageTextualNotationBuilder.BuildTextualNotation(pocoSuccessionAsUsage); - - case SysML2.NET.Core.POCO.Systems.Connections.BindingConnectorAsUsage pocoBindingConnectorAsUsage: - var bindingConnectorAsUsageTextualNotationBuilder = new BindingConnectorAsUsageTextualNotationBuilder(this); - return bindingConnectorAsUsageTextualNotationBuilder.BuildTextualNotation(pocoBindingConnectorAsUsage); - - case SysML2.NET.Core.POCO.Systems.Cases.CaseUsage pocoCaseUsage: - var caseUsageTextualNotationBuilder = new CaseUsageTextualNotationBuilder(this); - return caseUsageTextualNotationBuilder.BuildTextualNotation(pocoCaseUsage); - - case SysML2.NET.Core.POCO.Systems.Cases.CaseDefinition pocoCaseDefinition: - var caseDefinitionTextualNotationBuilder = new CaseDefinitionTextualNotationBuilder(this); - return caseDefinitionTextualNotationBuilder.BuildTextualNotation(pocoCaseDefinition); - - case SysML2.NET.Core.POCO.Systems.Cases.ObjectiveMembership pocoObjectiveMembership: - var objectiveMembershipTextualNotationBuilder = new ObjectiveMembershipTextualNotationBuilder(this); - return objectiveMembershipTextualNotationBuilder.BuildTextualNotation(pocoObjectiveMembership); - - case SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseUsage pocoAnalysisCaseUsage: - var analysisCaseUsageTextualNotationBuilder = new AnalysisCaseUsageTextualNotationBuilder(this); - return analysisCaseUsageTextualNotationBuilder.BuildTextualNotation(pocoAnalysisCaseUsage); - - case SysML2.NET.Core.POCO.Systems.AnalysisCases.AnalysisCaseDefinition pocoAnalysisCaseDefinition: - var analysisCaseDefinitionTextualNotationBuilder = new AnalysisCaseDefinitionTextualNotationBuilder(this); - return analysisCaseDefinitionTextualNotationBuilder.BuildTextualNotation(pocoAnalysisCaseDefinition); - - case SysML2.NET.Core.POCO.Systems.Items.ItemUsage pocoItemUsage: - var itemUsageTextualNotationBuilder = new ItemUsageTextualNotationBuilder(this); - return itemUsageTextualNotationBuilder.BuildTextualNotation(pocoItemUsage); - - case SysML2.NET.Core.POCO.Systems.Items.ItemDefinition pocoItemDefinition: - var itemDefinitionTextualNotationBuilder = new ItemDefinitionTextualNotationBuilder(this); - return itemDefinitionTextualNotationBuilder.BuildTextualNotation(pocoItemDefinition); - - case SysML2.NET.Core.POCO.Systems.Views.ViewpointDefinition pocoViewpointDefinition: - var viewpointDefinitionTextualNotationBuilder = new ViewpointDefinitionTextualNotationBuilder(this); - return viewpointDefinitionTextualNotationBuilder.BuildTextualNotation(pocoViewpointDefinition); - - case SysML2.NET.Core.POCO.Systems.Views.ViewUsage pocoViewUsage: - var viewUsageTextualNotationBuilder = new ViewUsageTextualNotationBuilder(this); - return viewUsageTextualNotationBuilder.BuildTextualNotation(pocoViewUsage); - - case SysML2.NET.Core.POCO.Systems.Views.RenderingDefinition pocoRenderingDefinition: - var renderingDefinitionTextualNotationBuilder = new RenderingDefinitionTextualNotationBuilder(this); - return renderingDefinitionTextualNotationBuilder.BuildTextualNotation(pocoRenderingDefinition); - - case SysML2.NET.Core.POCO.Systems.Views.ViewpointUsage pocoViewpointUsage: - var viewpointUsageTextualNotationBuilder = new ViewpointUsageTextualNotationBuilder(this); - return viewpointUsageTextualNotationBuilder.BuildTextualNotation(pocoViewpointUsage); - - case SysML2.NET.Core.POCO.Systems.Views.ViewDefinition pocoViewDefinition: - var viewDefinitionTextualNotationBuilder = new ViewDefinitionTextualNotationBuilder(this); - return viewDefinitionTextualNotationBuilder.BuildTextualNotation(pocoViewDefinition); - - case SysML2.NET.Core.POCO.Systems.Views.RenderingUsage pocoRenderingUsage: - var renderingUsageTextualNotationBuilder = new RenderingUsageTextualNotationBuilder(this); - return renderingUsageTextualNotationBuilder.BuildTextualNotation(pocoRenderingUsage); - - case SysML2.NET.Core.POCO.Systems.Views.ViewRenderingMembership pocoViewRenderingMembership: - var viewRenderingMembershipTextualNotationBuilder = new ViewRenderingMembershipTextualNotationBuilder(this); - return viewRenderingMembershipTextualNotationBuilder.BuildTextualNotation(pocoViewRenderingMembership); - - case SysML2.NET.Core.POCO.Systems.Views.NamespaceExpose pocoNamespaceExpose: - var namespaceExposeTextualNotationBuilder = new NamespaceExposeTextualNotationBuilder(this); - return namespaceExposeTextualNotationBuilder.BuildTextualNotation(pocoNamespaceExpose); - - case SysML2.NET.Core.POCO.Systems.Views.MembershipExpose pocoMembershipExpose: - var membershipExposeTextualNotationBuilder = new MembershipExposeTextualNotationBuilder(this); - return membershipExposeTextualNotationBuilder.BuildTextualNotation(pocoMembershipExpose); - - case SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseDefinition pocoVerificationCaseDefinition: - var verificationCaseDefinitionTextualNotationBuilder = new VerificationCaseDefinitionTextualNotationBuilder(this); - return verificationCaseDefinitionTextualNotationBuilder.BuildTextualNotation(pocoVerificationCaseDefinition); - - case SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseUsage pocoVerificationCaseUsage: - var verificationCaseUsageTextualNotationBuilder = new VerificationCaseUsageTextualNotationBuilder(this); - return verificationCaseUsageTextualNotationBuilder.BuildTextualNotation(pocoVerificationCaseUsage); - - case SysML2.NET.Core.POCO.Systems.VerificationCases.RequirementVerificationMembership pocoRequirementVerificationMembership: - var requirementVerificationMembershipTextualNotationBuilder = new RequirementVerificationMembershipTextualNotationBuilder(this); - return requirementVerificationMembershipTextualNotationBuilder.BuildTextualNotation(pocoRequirementVerificationMembership); - - case SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationDefinition pocoEnumerationDefinition: - var enumerationDefinitionTextualNotationBuilder = new EnumerationDefinitionTextualNotationBuilder(this); - return enumerationDefinitionTextualNotationBuilder.BuildTextualNotation(pocoEnumerationDefinition); - - case SysML2.NET.Core.POCO.Systems.Enumerations.EnumerationUsage pocoEnumerationUsage: - var enumerationUsageTextualNotationBuilder = new EnumerationUsageTextualNotationBuilder(this); - return enumerationUsageTextualNotationBuilder.BuildTextualNotation(pocoEnumerationUsage); - - case SysML2.NET.Core.POCO.Systems.Allocations.AllocationDefinition pocoAllocationDefinition: - var allocationDefinitionTextualNotationBuilder = new AllocationDefinitionTextualNotationBuilder(this); - return allocationDefinitionTextualNotationBuilder.BuildTextualNotation(pocoAllocationDefinition); - - case SysML2.NET.Core.POCO.Systems.Allocations.AllocationUsage pocoAllocationUsage: - var allocationUsageTextualNotationBuilder = new AllocationUsageTextualNotationBuilder(this); - return allocationUsageTextualNotationBuilder.BuildTextualNotation(pocoAllocationUsage); - - case SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceUsage pocoOccurrenceUsage: - var occurrenceUsageTextualNotationBuilder = new OccurrenceUsageTextualNotationBuilder(this); - return occurrenceUsageTextualNotationBuilder.BuildTextualNotation(pocoOccurrenceUsage); - - case SysML2.NET.Core.POCO.Systems.Occurrences.OccurrenceDefinition pocoOccurrenceDefinition: - var occurrenceDefinitionTextualNotationBuilder = new OccurrenceDefinitionTextualNotationBuilder(this); - return occurrenceDefinitionTextualNotationBuilder.BuildTextualNotation(pocoOccurrenceDefinition); - - case SysML2.NET.Core.POCO.Systems.Occurrences.EventOccurrenceUsage pocoEventOccurrenceUsage: - var eventOccurrenceUsageTextualNotationBuilder = new EventOccurrenceUsageTextualNotationBuilder(this); - return eventOccurrenceUsageTextualNotationBuilder.BuildTextualNotation(pocoEventOccurrenceUsage); - - case SysML2.NET.Core.POCO.Systems.UseCases.IncludeUseCaseUsage pocoIncludeUseCaseUsage: - var includeUseCaseUsageTextualNotationBuilder = new IncludeUseCaseUsageTextualNotationBuilder(this); - return includeUseCaseUsageTextualNotationBuilder.BuildTextualNotation(pocoIncludeUseCaseUsage); - - case SysML2.NET.Core.POCO.Systems.UseCases.UseCaseUsage pocoUseCaseUsage: - var useCaseUsageTextualNotationBuilder = new UseCaseUsageTextualNotationBuilder(this); - return useCaseUsageTextualNotationBuilder.BuildTextualNotation(pocoUseCaseUsage); - - case SysML2.NET.Core.POCO.Systems.UseCases.UseCaseDefinition pocoUseCaseDefinition: - var useCaseDefinitionTextualNotationBuilder = new UseCaseDefinitionTextualNotationBuilder(this); - return useCaseDefinitionTextualNotationBuilder.BuildTextualNotation(pocoUseCaseDefinition); - - case SysML2.NET.Core.POCO.Systems.Metadata.MetadataDefinition pocoMetadataDefinition: - var metadataDefinitionTextualNotationBuilder = new MetadataDefinitionTextualNotationBuilder(this); - return metadataDefinitionTextualNotationBuilder.BuildTextualNotation(pocoMetadataDefinition); - - case SysML2.NET.Core.POCO.Systems.Metadata.MetadataUsage pocoMetadataUsage: - var metadataUsageTextualNotationBuilder = new MetadataUsageTextualNotationBuilder(this); - return metadataUsageTextualNotationBuilder.BuildTextualNotation(pocoMetadataUsage); - - case SysML2.NET.Core.POCO.Systems.Flows.FlowUsage pocoFlowUsage: - var flowUsageTextualNotationBuilder = new FlowUsageTextualNotationBuilder(this); - return flowUsageTextualNotationBuilder.BuildTextualNotation(pocoFlowUsage); - - case SysML2.NET.Core.POCO.Systems.Flows.FlowDefinition pocoFlowDefinition: - var flowDefinitionTextualNotationBuilder = new FlowDefinitionTextualNotationBuilder(this); - return flowDefinitionTextualNotationBuilder.BuildTextualNotation(pocoFlowDefinition); - - case SysML2.NET.Core.POCO.Systems.Flows.SuccessionFlowUsage pocoSuccessionFlowUsage: - var successionFlowUsageTextualNotationBuilder = new SuccessionFlowUsageTextualNotationBuilder(this); - return successionFlowUsageTextualNotationBuilder.BuildTextualNotation(pocoSuccessionFlowUsage); - - case SysML2.NET.Core.POCO.Root.Dependencies.Dependency pocoDependency: - var dependencyTextualNotationBuilder = new DependencyTextualNotationBuilder(this); - return dependencyTextualNotationBuilder.BuildTextualNotation(pocoDependency); - - case SysML2.NET.Core.POCO.Root.Annotations.Comment pocoComment: - var commentTextualNotationBuilder = new CommentTextualNotationBuilder(this); - return commentTextualNotationBuilder.BuildTextualNotation(pocoComment); - - case SysML2.NET.Core.POCO.Root.Annotations.Annotation pocoAnnotation: - var annotationTextualNotationBuilder = new AnnotationTextualNotationBuilder(this); - return annotationTextualNotationBuilder.BuildTextualNotation(pocoAnnotation); - - case SysML2.NET.Core.POCO.Root.Annotations.AnnotatingElement pocoAnnotatingElement: - var annotatingElementTextualNotationBuilder = new AnnotatingElementTextualNotationBuilder(this); - return annotatingElementTextualNotationBuilder.BuildTextualNotation(pocoAnnotatingElement); - - case SysML2.NET.Core.POCO.Root.Annotations.TextualRepresentation pocoTextualRepresentation: - var textualRepresentationTextualNotationBuilder = new TextualRepresentationTextualNotationBuilder(this); - return textualRepresentationTextualNotationBuilder.BuildTextualNotation(pocoTextualRepresentation); - - case SysML2.NET.Core.POCO.Root.Annotations.Documentation pocoDocumentation: - var documentationTextualNotationBuilder = new DocumentationTextualNotationBuilder(this); - return documentationTextualNotationBuilder.BuildTextualNotation(pocoDocumentation); - - case SysML2.NET.Core.POCO.Root.Namespaces.Namespace pocoNamespace: - var namespaceTextualNotationBuilder = new NamespaceTextualNotationBuilder(this); - return namespaceTextualNotationBuilder.BuildTextualNotation(pocoNamespace); - - case SysML2.NET.Core.POCO.Root.Namespaces.MembershipImport pocoMembershipImport: - var membershipImportTextualNotationBuilder = new MembershipImportTextualNotationBuilder(this); - return membershipImportTextualNotationBuilder.BuildTextualNotation(pocoMembershipImport); - - case SysML2.NET.Core.POCO.Root.Namespaces.NamespaceImport pocoNamespaceImport: - var namespaceImportTextualNotationBuilder = new NamespaceImportTextualNotationBuilder(this); - return namespaceImportTextualNotationBuilder.BuildTextualNotation(pocoNamespaceImport); - - case SysML2.NET.Core.POCO.Root.Namespaces.Membership pocoMembership: - var membershipTextualNotationBuilder = new MembershipTextualNotationBuilder(this); - return membershipTextualNotationBuilder.BuildTextualNotation(pocoMembership); - - case SysML2.NET.Core.POCO.Root.Namespaces.OwningMembership pocoOwningMembership: - var owningMembershipTextualNotationBuilder = new OwningMembershipTextualNotationBuilder(this); - return owningMembershipTextualNotationBuilder.BuildTextualNotation(pocoOwningMembership); - - case SysML2.NET.Core.POCO.Core.Types.Specialization pocoSpecialization: - var specializationTextualNotationBuilder = new SpecializationTextualNotationBuilder(this); - return specializationTextualNotationBuilder.BuildTextualNotation(pocoSpecialization); - - case SysML2.NET.Core.POCO.Core.Types.Type pocoType: - var typeTextualNotationBuilder = new TypeTextualNotationBuilder(this); - return typeTextualNotationBuilder.BuildTextualNotation(pocoType); - - case SysML2.NET.Core.POCO.Core.Types.FeatureMembership pocoFeatureMembership: - var featureMembershipTextualNotationBuilder = new FeatureMembershipTextualNotationBuilder(this); - return featureMembershipTextualNotationBuilder.BuildTextualNotation(pocoFeatureMembership); - - case SysML2.NET.Core.POCO.Core.Types.Conjugation pocoConjugation: - var conjugationTextualNotationBuilder = new ConjugationTextualNotationBuilder(this); - return conjugationTextualNotationBuilder.BuildTextualNotation(pocoConjugation); - - case SysML2.NET.Core.POCO.Core.Types.Multiplicity pocoMultiplicity: - var multiplicityTextualNotationBuilder = new MultiplicityTextualNotationBuilder(this); - return multiplicityTextualNotationBuilder.BuildTextualNotation(pocoMultiplicity); - - case SysML2.NET.Core.POCO.Core.Types.Disjoining pocoDisjoining: - var disjoiningTextualNotationBuilder = new DisjoiningTextualNotationBuilder(this); - return disjoiningTextualNotationBuilder.BuildTextualNotation(pocoDisjoining); - - case SysML2.NET.Core.POCO.Core.Types.Differencing pocoDifferencing: - var differencingTextualNotationBuilder = new DifferencingTextualNotationBuilder(this); - return differencingTextualNotationBuilder.BuildTextualNotation(pocoDifferencing); - - case SysML2.NET.Core.POCO.Core.Types.Unioning pocoUnioning: - var unioningTextualNotationBuilder = new UnioningTextualNotationBuilder(this); - return unioningTextualNotationBuilder.BuildTextualNotation(pocoUnioning); - - case SysML2.NET.Core.POCO.Core.Types.Intersecting pocoIntersecting: - var intersectingTextualNotationBuilder = new IntersectingTextualNotationBuilder(this); - return intersectingTextualNotationBuilder.BuildTextualNotation(pocoIntersecting); - - case SysML2.NET.Core.POCO.Core.Classifiers.Subclassification pocoSubclassification: - var subclassificationTextualNotationBuilder = new SubclassificationTextualNotationBuilder(this); - return subclassificationTextualNotationBuilder.BuildTextualNotation(pocoSubclassification); - - case SysML2.NET.Core.POCO.Core.Classifiers.Classifier pocoClassifier: - var classifierTextualNotationBuilder = new ClassifierTextualNotationBuilder(this); - return classifierTextualNotationBuilder.BuildTextualNotation(pocoClassifier); - - case SysML2.NET.Core.POCO.Core.Features.Redefinition pocoRedefinition: - var redefinitionTextualNotationBuilder = new RedefinitionTextualNotationBuilder(this); - return redefinitionTextualNotationBuilder.BuildTextualNotation(pocoRedefinition); - - case SysML2.NET.Core.POCO.Core.Features.Feature pocoFeature: - var featureTextualNotationBuilder = new FeatureTextualNotationBuilder(this); - return featureTextualNotationBuilder.BuildTextualNotation(pocoFeature); - - case SysML2.NET.Core.POCO.Core.Features.FeatureTyping pocoFeatureTyping: - var featureTypingTextualNotationBuilder = new FeatureTypingTextualNotationBuilder(this); - return featureTypingTextualNotationBuilder.BuildTextualNotation(pocoFeatureTyping); - - case SysML2.NET.Core.POCO.Core.Features.Subsetting pocoSubsetting: - var subsettingTextualNotationBuilder = new SubsettingTextualNotationBuilder(this); - return subsettingTextualNotationBuilder.BuildTextualNotation(pocoSubsetting); - - case SysML2.NET.Core.POCO.Core.Features.TypeFeaturing pocoTypeFeaturing: - var typeFeaturingTextualNotationBuilder = new TypeFeaturingTextualNotationBuilder(this); - return typeFeaturingTextualNotationBuilder.BuildTextualNotation(pocoTypeFeaturing); - - case SysML2.NET.Core.POCO.Core.Features.EndFeatureMembership pocoEndFeatureMembership: - var endFeatureMembershipTextualNotationBuilder = new EndFeatureMembershipTextualNotationBuilder(this); - return endFeatureMembershipTextualNotationBuilder.BuildTextualNotation(pocoEndFeatureMembership); - - case SysML2.NET.Core.POCO.Core.Features.FeatureChaining pocoFeatureChaining: - var featureChainingTextualNotationBuilder = new FeatureChainingTextualNotationBuilder(this); - return featureChainingTextualNotationBuilder.BuildTextualNotation(pocoFeatureChaining); - - case SysML2.NET.Core.POCO.Core.Features.FeatureInverting pocoFeatureInverting: - var featureInvertingTextualNotationBuilder = new FeatureInvertingTextualNotationBuilder(this); - return featureInvertingTextualNotationBuilder.BuildTextualNotation(pocoFeatureInverting); - - case SysML2.NET.Core.POCO.Core.Features.ReferenceSubsetting pocoReferenceSubsetting: - var referenceSubsettingTextualNotationBuilder = new ReferenceSubsettingTextualNotationBuilder(this); - return referenceSubsettingTextualNotationBuilder.BuildTextualNotation(pocoReferenceSubsetting); - - case SysML2.NET.Core.POCO.Core.Features.CrossSubsetting pocoCrossSubsetting: - var crossSubsettingTextualNotationBuilder = new CrossSubsettingTextualNotationBuilder(this); - return crossSubsettingTextualNotationBuilder.BuildTextualNotation(pocoCrossSubsetting); - - case SysML2.NET.Core.POCO.Kernel.Interactions.PayloadFeature pocoPayloadFeature: - var payloadFeatureTextualNotationBuilder = new PayloadFeatureTextualNotationBuilder(this); - return payloadFeatureTextualNotationBuilder.BuildTextualNotation(pocoPayloadFeature); - - case SysML2.NET.Core.POCO.Kernel.Interactions.Interaction pocoInteraction: - var interactionTextualNotationBuilder = new InteractionTextualNotationBuilder(this); - return interactionTextualNotationBuilder.BuildTextualNotation(pocoInteraction); - - case SysML2.NET.Core.POCO.Kernel.Interactions.SuccessionFlow pocoSuccessionFlow: - var successionFlowTextualNotationBuilder = new SuccessionFlowTextualNotationBuilder(this); - return successionFlowTextualNotationBuilder.BuildTextualNotation(pocoSuccessionFlow); - - case SysML2.NET.Core.POCO.Kernel.Interactions.Flow pocoFlow: - var flowTextualNotationBuilder = new FlowTextualNotationBuilder(this); - return flowTextualNotationBuilder.BuildTextualNotation(pocoFlow); - - case SysML2.NET.Core.POCO.Kernel.Interactions.FlowEnd pocoFlowEnd: - var flowEndTextualNotationBuilder = new FlowEndTextualNotationBuilder(this); - return flowEndTextualNotationBuilder.BuildTextualNotation(pocoFlowEnd); - - case SysML2.NET.Core.POCO.Kernel.Packages.LibraryPackage pocoLibraryPackage: - var libraryPackageTextualNotationBuilder = new LibraryPackageTextualNotationBuilder(this); - return libraryPackageTextualNotationBuilder.BuildTextualNotation(pocoLibraryPackage); - - case SysML2.NET.Core.POCO.Kernel.Packages.ElementFilterMembership pocoElementFilterMembership: - var elementFilterMembershipTextualNotationBuilder = new ElementFilterMembershipTextualNotationBuilder(this); - return elementFilterMembershipTextualNotationBuilder.BuildTextualNotation(pocoElementFilterMembership); - - case SysML2.NET.Core.POCO.Kernel.Packages.Package pocoPackage: - var packageTextualNotationBuilder = new PackageTextualNotationBuilder(this); - return packageTextualNotationBuilder.BuildTextualNotation(pocoPackage); - - case SysML2.NET.Core.POCO.Kernel.Classes.Class pocoClass: - var classTextualNotationBuilder = new ClassTextualNotationBuilder(this); - return classTextualNotationBuilder.BuildTextualNotation(pocoClass); - - case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralBoolean pocoLiteralBoolean: - var literalBooleanTextualNotationBuilder = new LiteralBooleanTextualNotationBuilder(this); - return literalBooleanTextualNotationBuilder.BuildTextualNotation(pocoLiteralBoolean); - - case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralExpression pocoLiteralExpression: - var literalExpressionTextualNotationBuilder = new LiteralExpressionTextualNotationBuilder(this); - return literalExpressionTextualNotationBuilder.BuildTextualNotation(pocoLiteralExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralRational pocoLiteralRational: - var literalRationalTextualNotationBuilder = new LiteralRationalTextualNotationBuilder(this); - return literalRationalTextualNotationBuilder.BuildTextualNotation(pocoLiteralRational); - - case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInfinity pocoLiteralInfinity: - var literalInfinityTextualNotationBuilder = new LiteralInfinityTextualNotationBuilder(this); - return literalInfinityTextualNotationBuilder.BuildTextualNotation(pocoLiteralInfinity); - - case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralInteger pocoLiteralInteger: - var literalIntegerTextualNotationBuilder = new LiteralIntegerTextualNotationBuilder(this); - return literalIntegerTextualNotationBuilder.BuildTextualNotation(pocoLiteralInteger); - - case SysML2.NET.Core.POCO.Kernel.Expressions.NullExpression pocoNullExpression: - var nullExpressionTextualNotationBuilder = new NullExpressionTextualNotationBuilder(this); - return nullExpressionTextualNotationBuilder.BuildTextualNotation(pocoNullExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.LiteralString pocoLiteralString: - var literalStringTextualNotationBuilder = new LiteralStringTextualNotationBuilder(this); - return literalStringTextualNotationBuilder.BuildTextualNotation(pocoLiteralString); - - case SysML2.NET.Core.POCO.Kernel.Expressions.InvocationExpression pocoInvocationExpression: - var invocationExpressionTextualNotationBuilder = new InvocationExpressionTextualNotationBuilder(this); - return invocationExpressionTextualNotationBuilder.BuildTextualNotation(pocoInvocationExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.FeatureReferenceExpression pocoFeatureReferenceExpression: - var featureReferenceExpressionTextualNotationBuilder = new FeatureReferenceExpressionTextualNotationBuilder(this); - return featureReferenceExpressionTextualNotationBuilder.BuildTextualNotation(pocoFeatureReferenceExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.SelectExpression pocoSelectExpression: - var selectExpressionTextualNotationBuilder = new SelectExpressionTextualNotationBuilder(this); - return selectExpressionTextualNotationBuilder.BuildTextualNotation(pocoSelectExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.OperatorExpression pocoOperatorExpression: - var operatorExpressionTextualNotationBuilder = new OperatorExpressionTextualNotationBuilder(this); - return operatorExpressionTextualNotationBuilder.BuildTextualNotation(pocoOperatorExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.CollectExpression pocoCollectExpression: - var collectExpressionTextualNotationBuilder = new CollectExpressionTextualNotationBuilder(this); - return collectExpressionTextualNotationBuilder.BuildTextualNotation(pocoCollectExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.FeatureChainExpression pocoFeatureChainExpression: - var featureChainExpressionTextualNotationBuilder = new FeatureChainExpressionTextualNotationBuilder(this); - return featureChainExpressionTextualNotationBuilder.BuildTextualNotation(pocoFeatureChainExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.MetadataAccessExpression pocoMetadataAccessExpression: - var metadataAccessExpressionTextualNotationBuilder = new MetadataAccessExpressionTextualNotationBuilder(this); - return metadataAccessExpressionTextualNotationBuilder.BuildTextualNotation(pocoMetadataAccessExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.IndexExpression pocoIndexExpression: - var indexExpressionTextualNotationBuilder = new IndexExpressionTextualNotationBuilder(this); - return indexExpressionTextualNotationBuilder.BuildTextualNotation(pocoIndexExpression); - - case SysML2.NET.Core.POCO.Kernel.Expressions.ConstructorExpression pocoConstructorExpression: - var constructorExpressionTextualNotationBuilder = new ConstructorExpressionTextualNotationBuilder(this); - return constructorExpressionTextualNotationBuilder.BuildTextualNotation(pocoConstructorExpression); - - case SysML2.NET.Core.POCO.Kernel.Structures.Structure pocoStructure: - var structureTextualNotationBuilder = new StructureTextualNotationBuilder(this); - return structureTextualNotationBuilder.BuildTextualNotation(pocoStructure); - - case SysML2.NET.Core.POCO.Kernel.Functions.Predicate pocoPredicate: - var predicateTextualNotationBuilder = new PredicateTextualNotationBuilder(this); - return predicateTextualNotationBuilder.BuildTextualNotation(pocoPredicate); - - case SysML2.NET.Core.POCO.Kernel.Functions.ReturnParameterMembership pocoReturnParameterMembership: - var returnParameterMembershipTextualNotationBuilder = new ReturnParameterMembershipTextualNotationBuilder(this); - return returnParameterMembershipTextualNotationBuilder.BuildTextualNotation(pocoReturnParameterMembership); - - case SysML2.NET.Core.POCO.Kernel.Functions.Invariant pocoInvariant: - var invariantTextualNotationBuilder = new InvariantTextualNotationBuilder(this); - return invariantTextualNotationBuilder.BuildTextualNotation(pocoInvariant); - - case SysML2.NET.Core.POCO.Kernel.Functions.BooleanExpression pocoBooleanExpression: - var booleanExpressionTextualNotationBuilder = new BooleanExpressionTextualNotationBuilder(this); - return booleanExpressionTextualNotationBuilder.BuildTextualNotation(pocoBooleanExpression); - - case SysML2.NET.Core.POCO.Kernel.Functions.Expression pocoExpression: - var expressionTextualNotationBuilder = new ExpressionTextualNotationBuilder(this); - return expressionTextualNotationBuilder.BuildTextualNotation(pocoExpression); - - case SysML2.NET.Core.POCO.Kernel.Functions.Function pocoFunction: - var functionTextualNotationBuilder = new FunctionTextualNotationBuilder(this); - return functionTextualNotationBuilder.BuildTextualNotation(pocoFunction); - - case SysML2.NET.Core.POCO.Kernel.Functions.ResultExpressionMembership pocoResultExpressionMembership: - var resultExpressionMembershipTextualNotationBuilder = new ResultExpressionMembershipTextualNotationBuilder(this); - return resultExpressionMembershipTextualNotationBuilder.BuildTextualNotation(pocoResultExpressionMembership); - - case SysML2.NET.Core.POCO.Kernel.Multiplicities.MultiplicityRange pocoMultiplicityRange: - var multiplicityRangeTextualNotationBuilder = new MultiplicityRangeTextualNotationBuilder(this); - return multiplicityRangeTextualNotationBuilder.BuildTextualNotation(pocoMultiplicityRange); - - case SysML2.NET.Core.POCO.Kernel.Behaviors.Step pocoStep: - var stepTextualNotationBuilder = new StepTextualNotationBuilder(this); - return stepTextualNotationBuilder.BuildTextualNotation(pocoStep); - - case SysML2.NET.Core.POCO.Kernel.Behaviors.Behavior pocoBehavior: - var behaviorTextualNotationBuilder = new BehaviorTextualNotationBuilder(this); - return behaviorTextualNotationBuilder.BuildTextualNotation(pocoBehavior); - - case SysML2.NET.Core.POCO.Kernel.Behaviors.ParameterMembership pocoParameterMembership: - var parameterMembershipTextualNotationBuilder = new ParameterMembershipTextualNotationBuilder(this); - return parameterMembershipTextualNotationBuilder.BuildTextualNotation(pocoParameterMembership); - - case SysML2.NET.Core.POCO.Kernel.Metadata.Metaclass pocoMetaclass: - var metaclassTextualNotationBuilder = new MetaclassTextualNotationBuilder(this); - return metaclassTextualNotationBuilder.BuildTextualNotation(pocoMetaclass); - - case SysML2.NET.Core.POCO.Kernel.Metadata.MetadataFeature pocoMetadataFeature: - var metadataFeatureTextualNotationBuilder = new MetadataFeatureTextualNotationBuilder(this); - return metadataFeatureTextualNotationBuilder.BuildTextualNotation(pocoMetadataFeature); - - case SysML2.NET.Core.POCO.Kernel.DataTypes.DataType pocoDataType: - var dataTypeTextualNotationBuilder = new DataTypeTextualNotationBuilder(this); - return dataTypeTextualNotationBuilder.BuildTextualNotation(pocoDataType); - - case SysML2.NET.Core.POCO.Kernel.Associations.AssociationStructure pocoAssociationStructure: - var associationStructureTextualNotationBuilder = new AssociationStructureTextualNotationBuilder(this); - return associationStructureTextualNotationBuilder.BuildTextualNotation(pocoAssociationStructure); - - case SysML2.NET.Core.POCO.Kernel.Associations.Association pocoAssociation: - var associationTextualNotationBuilder = new AssociationTextualNotationBuilder(this); - return associationTextualNotationBuilder.BuildTextualNotation(pocoAssociation); - - case SysML2.NET.Core.POCO.Kernel.FeatureValues.FeatureValue pocoFeatureValue: - var featureValueTextualNotationBuilder = new FeatureValueTextualNotationBuilder(this); - return featureValueTextualNotationBuilder.BuildTextualNotation(pocoFeatureValue); - - case SysML2.NET.Core.POCO.Kernel.Connectors.Connector pocoConnector: - var connectorTextualNotationBuilder = new ConnectorTextualNotationBuilder(this); - return connectorTextualNotationBuilder.BuildTextualNotation(pocoConnector); - - case SysML2.NET.Core.POCO.Kernel.Connectors.BindingConnector pocoBindingConnector: - var bindingConnectorTextualNotationBuilder = new BindingConnectorTextualNotationBuilder(this); - return bindingConnectorTextualNotationBuilder.BuildTextualNotation(pocoBindingConnector); - - case SysML2.NET.Core.POCO.Kernel.Connectors.Succession pocoSuccession: - var successionTextualNotationBuilder = new SuccessionTextualNotationBuilder(this); - return successionTextualNotationBuilder.BuildTextualNotation(pocoSuccession); - - default: - throw new ArgumentOutOfRangeException(nameof(element), "Provided element is not supported"); - } - } - } -} - -// ------------------------------------------------------------------------------------------------ -// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- -// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs index abc8bde5..cfe81735 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs @@ -29,38 +29,29 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class TextualRepresentationTextualNotationBuilder : TextualNotationBuilder + public static partial class TextualRepresentationTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule TextualRepresentation + /// TextualRepresentation=('rep'Identification)?'language'language=STRING_VALUEbody=REGULAR_COMMENT /// - /// The used to query textual notation of referenced - public TextualRepresentationTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTextualRepresentation(SysML2.NET.Core.POCO.Root.Annotations.ITextualRepresentation poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Root.Annotations.TextualRepresentation poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : TextualRepresentation=('rep'Identification)?'language'language=STRING_VALUEbody=REGULAR_COMMENT - - - - + // Group Element + stringBuilder.Append("rep "); + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element stringBuilder.Append("language "); // Assignment Element : language = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property language value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement // Assignment Element : body = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property body value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs index a848734b..f38aff43 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs @@ -29,28 +29,53 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class TransitionFeatureMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class TransitionFeatureMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule TriggerActionMember + /// TriggerActionMember:TransitionFeatureMembership='accept'{kind='trigger'}ownedRelatedElement+=TriggerAction /// - /// The used to query textual notation of referenced - public TransitionFeatureMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTriggerActionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, StringBuilder stringBuilder) { + stringBuilder.Append("accept "); + // Assignment Element : kind = 'trigger' + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule GuardExpressionMember + /// GuardExpressionMember:TransitionFeatureMembership='if'{kind='guard'}ownedRelatedElement+=OwnedExpression + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildGuardExpressionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, StringBuilder stringBuilder) + { + stringBuilder.Append("if "); + // Assignment Element : kind = 'guard' + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule EffectBehaviorMember + /// EffectBehaviorMember:TransitionFeatureMembership='do'{kind='effect'}ownedRelatedElement+=EffectBehaviorUsage /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.TransitionFeatureMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEffectBehaviorMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + stringBuilder.Append("do "); + // Assignment Element : kind = 'effect' + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs index d18e8571..9b7fd0e9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs @@ -29,42 +29,124 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class TransitionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class TransitionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule GuardedTargetSuccession + /// GuardedTargetSuccession:TransitionUsage=ownedRelationship+=GuardExpressionMember'then'ownedRelationship+=TransitionSuccessionMember /// - /// The used to query textual notation of referenced - public TransitionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("then "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule DefaultTargetSuccession + /// DefaultTargetSuccession:TransitionUsage='else'ownedRelationship+=TransitionSuccessionMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.States.TransitionUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : TransitionUsage='transition'(UsageDeclaration'first')?ownedRelationship+=FeatureChainMemberownedRelationship+=EmptyParameterMember(ownedRelationship+=EmptyParameterMemberownedRelationship+=TriggerActionMember)?(ownedRelationship+=GuardExpressionMember)?(ownedRelationship+=EffectBehaviorMember)?'then'ownedRelationship+=TransitionSuccessionMemberActionBody + stringBuilder.Append("else "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("transition "); - // Group Element + } + + /// + /// Builds the Textual Notation string for the rule GuardedSuccession + /// GuardedSuccession:TransitionUsage=('succession'UsageDeclaration)?'first'ownedRelationship+=FeatureChainMemberownedRelationship+=GuardExpressionMember'then'ownedRelationship+=TransitionSuccessionMemberUsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) + { + // Group Element + stringBuilder.Append("succession "); + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + + stringBuilder.Append("first "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("then "); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule TargetTransitionUsage + /// TargetTransitionUsage:TransitionUsage=ownedRelationship+=EmptyParameterMember('transition'(ownedRelationship+=EmptyParameterMemberownedRelationship+=TriggerActionMember)?(ownedRelationship+=GuardExpressionMember)?(ownedRelationship+=EffectBehaviorMember)?|ownedRelationship+=EmptyParameterMemberownedRelationship+=TriggerActionMember(ownedRelationship+=GuardExpressionMember)?(ownedRelationship+=EffectBehaviorMember)?|ownedRelationship+=GuardExpressionMember(ownedRelationship+=EffectBehaviorMember)?)?'then'ownedRelationship+=TransitionSuccessionMemberActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) + { // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - // Group Element - // Group Element + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append("then "); // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); + } + + /// + /// Builds the Textual Notation string for the rule TransitionUsage + /// TransitionUsage='transition'(UsageDeclaration'first')?ownedRelationship+=FeatureChainMemberownedRelationship+=EmptyParameterMember(ownedRelationship+=EmptyParameterMemberownedRelationship+=TriggerActionMember)?(ownedRelationship+=GuardExpressionMember)?(ownedRelationship+=EffectBehaviorMember)?'then'ownedRelationship+=TransitionSuccessionMemberActionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) + { + stringBuilder.Append("transition "); + // Group Element + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("first "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + stringBuilder.Append("then "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs index e92a2caf..6d17b9a3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs @@ -29,28 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class TriggerInvocationExpressionTextualNotationBuilder : TextualNotationBuilder + public static partial class TriggerInvocationExpressionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule TriggerExpression + /// TriggerExpression:TriggerInvocationExpression=kind=('at'|'after')ownedRelationship+=ArgumentMember|kind='when'ownedRelationship+=ArgumentExpressionMember /// - /// The used to query textual notation of referenced - public TriggerInvocationExpressionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTriggerExpression(SysML2.NET.Core.POCO.Systems.Actions.ITriggerInvocationExpression poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.TriggerInvocationExpression poco) - { - var stringBuilder = new StringBuilder(); - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs index a6c973f2..464e8c2b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs @@ -29,40 +29,45 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class TypeFeaturingTextualNotationBuilder : TextualNotationBuilder + public static partial class TypeFeaturingTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule OwnedTypeFeaturing + /// OwnedTypeFeaturing:TypeFeaturing=featuringType=[QualifiedName] /// - /// The used to query textual notation of referenced - public TypeFeaturingTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOwnedTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, StringBuilder stringBuilder) { + // Assignment Element : featuringType = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property featuringType value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule TypeFeaturing + /// TypeFeaturing='featuring'(Identification'of')?featureOfType=[QualifiedName]'by'featuringType=[QualifiedName]RelationshipBody /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Features.TypeFeaturing poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : TypeFeaturing='featuring'(Identification'of')?featureOfType=[QualifiedName]'by'featuringType=[QualifiedName]RelationshipBody - stringBuilder.Append("featuring "); - // Group Element - // Assignment Element : featureOfType = - stringBuilder.Append("by "); - // Assignment Element : featuringType = - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' - - - + // Group Element + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append("of "); + // Assignment Element : featureOfType = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property featureOfType value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + stringBuilder.Append("by "); + // Assignment Element : featuringType = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // If property featuringType value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs index aa3cc3ed..c08f980e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -29,40 +29,426 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class TypeTextualNotationBuilder : TextualNotationBuilder + public static partial class TypeTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule DefinitionBody + /// DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' /// - /// The used to query textual notation of referenced - public TypeTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule DefinitionBodyItem + /// DefinitionBodyItem:Type=ownedRelationship+=DefinitionMember|ownedRelationship+=VariantUsageMember|ownedRelationship+=NonOccurrenceUsageMember|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=OccurrenceUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Type poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDefinitionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Type=TypePrefix'type'TypeDeclarationTypeBody + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + /// + /// Builds the Textual Notation string for the rule InterfaceBody + /// InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule InterfaceBodyItem + /// InterfaceBodyItem:Type=ownedRelationship+=DefinitionMember|ownedRelationship+=VariantUsageMember|ownedRelationship+=InterfaceNonOccurrenceUsageMember|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=InterfaceOccurrenceUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } - stringBuilder.Append("type "); - // non Terminal : TypeDeclaration; Found rule TypeDeclaration:Type=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SpecializationPart|ConjugationPart)+TypeRelationshipPart* + /// + /// Builds the Textual Notation string for the rule ActionBody + /// ActionBody:Type=';'|'{'ActionBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ActionBodyItem + /// ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule StateBodyItem + /// StateBodyItem:Type=NonBehaviorBodyItem|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=BehaviorUsageMember(ownedRelationship+=TargetTransitionUsageMember)*|ownedRelationship+=TransitionUsageMember|ownedRelationship+=EntryActionMember(ownedRelationship+=EntryTransitionMember)*|ownedRelationship+=DoActionMember|ownedRelationship+=ExitActionMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStateBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule CalculationBody + /// CalculationBody:Type=';'|'{'CalculationBodyPart'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCalculationBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule CalculationBodyPart + /// CalculationBodyPart:Type=CalculationBodyItem*(ownedRelationship+=ResultExpressionMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCalculationBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + // non Terminal : CalculationBodyItem; Found rule CalculationBodyItem:Type=ActionBodyItem|ownedRelationship+=ReturnParameterMember + BuildCalculationBodyItem(poco, stringBuilder); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + } + + /// + /// Builds the Textual Notation string for the rule CalculationBodyItem + /// CalculationBodyItem:Type=ActionBodyItem|ownedRelationship+=ReturnParameterMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCalculationBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule RequirementBody + /// RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule RequirementBodyItem + /// RequirementBodyItem:Type=DefinitionBodyItem|ownedRelationship+=SubjectMember|ownedRelationship+=RequirementConstraintMember|ownedRelationship+=FramedConcernMember|ownedRelationship+=RequirementVerificationMember|ownedRelationship+=ActorMember|ownedRelationship+=StakeholderMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRequirementBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule CaseBody + /// CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCaseBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule CaseBodyItem + /// CaseBodyItem:Type=ActionBodyItem|ownedRelationship+=SubjectMember|ownedRelationship+=ActorMember|ownedRelationship+=ObjectiveMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildCaseBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule MetadataBody + /// MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildMetadataBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule TypePrefix + /// TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : isAbstract ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isAbstract value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule TypeDeclaration + /// TypeDeclaration:Type=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SpecializationPart|ConjugationPart)+TypeRelationshipPart* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + // Group Element + // Assignment Element : isSufficient ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isSufficient value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : TypeRelationshipPart; Found rule TypeRelationshipPart:Type=DisjoiningPart|UnioningPart|IntersectingPart|DifferencingPart + BuildTypeRelationshipPart(poco, stringBuilder); + + } + /// + /// Builds the Textual Notation string for the rule SpecializationPart + /// SpecializationPart:Type=SPECIALIZESownedRelationship+=OwnedSpecialization(','ownedRelationship+=OwnedSpecialization)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule ConjugationPart + /// ConjugationPart:Type=CONJUGATESownedRelationship+=OwnedConjugation + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildConjugationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + // non Terminal : CONJUGATES; Found rule CONJUGATES='~'|'conjugates' + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule TypeRelationshipPart + /// TypeRelationshipPart:Type=DisjoiningPart|UnioningPart|IntersectingPart|DifferencingPart + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeRelationshipPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule DisjoiningPart + /// DisjoiningPart:Type='disjoint''from'ownedRelationship+=OwnedDisjoining(','ownedRelationship+=OwnedDisjoining)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + stringBuilder.Append("disjoint "); + stringBuilder.Append("from "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule UnioningPart + /// UnioningPart:Type='unions'ownedRelationship+=Unioning(','ownedRelationship+=Unioning)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + stringBuilder.Append("unions "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule IntersectingPart + /// IntersectingPart:Type='intersects'ownedRelationship+=Intersecting(','ownedRelationship+=Intersecting)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + stringBuilder.Append("intersects "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule DifferencingPart + /// DifferencingPart:Type='differences'ownedRelationship+=Differencing(','ownedRelationship+=Differencing)* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildDifferencingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + stringBuilder.Append("differences "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append(", "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule TypeBody + /// TypeBody:Type=';'|'{'TypeBodyElement*'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule TypeBodyElement + /// TypeBodyElement:Type=ownedRelationship+=NonFeatureMember|ownedRelationship+=FeatureMember|ownedRelationship+=AliasMember|ownedRelationship+=Import + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildTypeBodyElement(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FunctionBody + /// FunctionBody:Type=';'|'{'FunctionBodyPart'}' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule FunctionBodyPart + /// FunctionBodyPart:Type=(TypeBodyElement|ownedRelationship+=ReturnFeatureMember)*(ownedRelationship+=ResultExpressionMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule InstantiatedTypeReference + /// InstantiatedTypeReference:Type=[QualifiedName] + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInstantiatedTypeReference(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + // Value Literal Element : [QualifiedName] + + } + + /// + /// Builds the Textual Notation string for the rule Type + /// Type=TypePrefix'type'TypeDeclarationTypeBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildType(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) + { + // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* + BuildTypePrefix(poco, stringBuilder); + stringBuilder.Append("type "); + // non Terminal : TypeDeclaration; Found rule TypeDeclaration:Type=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SpecializationPart|ConjugationPart)+TypeRelationshipPart* + BuildTypeDeclaration(poco, stringBuilder); + // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + BuildTypeBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs index 4e722d83..184ffe9e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs @@ -29,32 +29,19 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class UnioningTextualNotationBuilder : TextualNotationBuilder + public static partial class UnioningTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule Unioning + /// Unioning=unioningType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain /// - /// The used to query textual notation of referenced - public UnioningTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUnioning(SysML2.NET.Core.POCO.Core.Types.IUnioning poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Core.Types.Unioning poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : Unioning=unioningType=[QualifiedName]|ownedRelatedElement+=OwnedFeatureChain - - // Assignment Element : unioningType = - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - - return stringBuilder.ToString(); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs index 484e83a5..e0c2934a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs @@ -29,36 +29,284 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class UsageTextualNotationBuilder : TextualNotationBuilder + public static partial class UsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule UsageElement + /// UsageElement:Usage=NonOccurrenceUsageElement|OccurrenceUsageElement /// - /// The used to query textual notation of referenced - public UsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule RefPrefix + /// RefPrefix:Usage=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract'|isVariation?='variation')?(isConstant?='constant')? /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.Usage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : Usage=UsageDeclarationUsageCompletion + // Group Element + // Assignment Element : direction = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property direction value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + // Group Element + // Assignment Element : isDerived ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isDerived value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Group Element + // Assignment Element : isConstant ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isConstant value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageCompletion; Found rule UsageCompletion:Usage=ValuePart?UsageBody + } + + /// + /// Builds the Textual Notation string for the rule BasicUsagePrefix + /// BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBasicUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // non Terminal : RefPrefix; Found rule RefPrefix:Usage=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract'|isVariation?='variation')?(isConstant?='constant')? + BuildRefPrefix(poco, stringBuilder); + // Group Element + // Assignment Element : isReference ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isReference value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule EndUsagePrefix + /// EndUsagePrefix:Usage=isEnd?='end'(ownedRelationship+=OwnedCrossFeatureMember)? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // Assignment Element : isEnd ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // If property isEnd value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + // Group Element + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + + } + + /// + /// Builds the Textual Notation string for the rule UsageExtensionKeyword + /// UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsageExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + + } + + /// + /// Builds the Textual Notation string for the rule UnextendedUsagePrefix + /// UnextendedUsagePrefix:Usage=EndUsagePrefix|BasicUsagePrefix + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUnextendedUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule UsagePrefix + /// UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // non Terminal : UnextendedUsagePrefix; Found rule UnextendedUsagePrefix:Usage=EndUsagePrefix|BasicUsagePrefix + BuildUnextendedUsagePrefix(poco, stringBuilder); + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + BuildUsageExtensionKeyword(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule UsageDeclaration + /// UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsageDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + // non Terminal : FeatureSpecializationPart; Found rule FeatureSpecializationPart:Feature=FeatureSpecialization+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization* + FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule UsageCompletion + /// UsageCompletion:Usage=ValuePart?UsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsageCompletion(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + BuildUsageBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule UsageBody + /// UsageBody:Usage=DefinitionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsageBody(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' + TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); + + } + /// + /// Builds the Textual Notation string for the rule NonOccurrenceUsageElement + /// NonOccurrenceUsageElement:Usage=DefaultReferenceUsage|ReferenceUsage|AttributeUsage|EnumerationUsage|BindingConnectorAsUsage|SuccessionAsUsage|ExtendedUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildNonOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule OccurrenceUsageElement + /// OccurrenceUsageElement:Usage=StructureUsageElement|BehaviorUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule StructureUsageElement + /// StructureUsageElement:Usage=OccurrenceUsage|IndividualUsage|PortionUsage|EventOccurrenceUsage|ItemUsage|PartUsage|ViewUsage|RenderingUsage|PortUsage|ConnectionUsage|InterfaceUsage|AllocationUsage|Message|FlowUsage|SuccessionFlowUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildStructureUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule BehaviorUsageElement + /// BehaviorUsageElement:Usage=ActionUsage|CalculationUsage|StateUsage|ConstraintUsage|RequirementUsage|ConcernUsage|CaseUsage|AnalysisCaseUsage|VerificationCaseUsage|UseCaseUsage|ViewpointUsage|PerformActionUsage|ExhibitStateUsage|IncludeUseCaseUsage|AssertConstraintUsage|SatisfyRequirementUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildBehaviorUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule VariantUsageElement + /// VariantUsageElement:Usage=VariantReference|ReferenceUsage|AttributeUsage|BindingConnectorAsUsage|SuccessionAsUsage|OccurrenceUsage|IndividualUsage|PortionUsage|EventOccurrenceUsage|ItemUsage|PartUsage|ViewUsage|RenderingUsage|PortUsage|ConnectionUsage|InterfaceUsage|AllocationUsage|Message|FlowUsage|SuccessionFlowUsage|BehaviorUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVariantUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule InterfaceNonOccurrenceUsageElement + /// InterfaceNonOccurrenceUsageElement:Usage=ReferenceUsage|AttributeUsage|EnumerationUsage|BindingConnectorAsUsage|SuccessionAsUsage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceNonOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule InterfaceOccurrenceUsageElement + /// InterfaceOccurrenceUsageElement:Usage=DefaultInterfaceEnd|StructureUsageElement|BehaviorUsageElement + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildInterfaceOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + /// + /// Builds the Textual Notation string for the rule ActionTargetSuccession + /// ActionTargetSuccession:Usage=(TargetSuccession|GuardedTargetSuccession|DefaultTargetSuccession)UsageBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildActionTargetSuccession(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + BuildUsageBody(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule ExtendedUsage + /// ExtendedUsage:Usage=UnextendedUsagePrefixUsageExtensionKeyword+Usage + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildExtendedUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // non Terminal : UnextendedUsagePrefix; Found rule UnextendedUsagePrefix:Usage=EndUsagePrefix|BasicUsagePrefix + BuildUnextendedUsagePrefix(poco, stringBuilder); + // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + BuildUsageExtensionKeyword(poco, stringBuilder); + // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + BuildUsage(poco, stringBuilder); + + } + + /// + /// Builds the Textual Notation string for the rule Usage + /// Usage=UsageDeclarationUsageCompletion + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) + { + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : UsageCompletion; Found rule UsageCompletion:Usage=ValuePart?UsageBody + BuildUsageCompletion(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs index c49f7b97..3d52ac55 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs @@ -29,42 +29,28 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class UseCaseDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class UseCaseDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule UseCaseDefinition + /// UseCaseDefinition=OccurrenceDefinitionPrefix'use''case''def'DefinitionDeclarationCaseBody /// - /// The used to query textual notation of referenced - public UseCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUseCaseDefinition(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.UseCases.UseCaseDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : UseCaseDefinition=OccurrenceDefinitionPrefix'use''case''def'DefinitionDeclarationCaseBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("use "); stringBuilder.Append("case "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs index 752d5434..9193feba 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs @@ -29,45 +29,31 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class UseCaseUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class UseCaseUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule UseCaseUsage + /// UseCaseUsage=OccurrenceUsagePrefix'use''case'ConstraintUsageDeclarationCaseBody /// - /// The used to query textual notation of referenced - public UseCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.UseCases.UseCaseUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : UseCaseUsage=OccurrenceUsagePrefix'use''case'ConstraintUsageDeclarationCaseBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("use "); stringBuilder.Append("case "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - - - - - - - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' - + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs index 23444e06..5a5b2134 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs @@ -29,28 +29,39 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class VariantMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class VariantMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule VariantUsageMember + /// VariantUsageMember:VariantMembership=MemberPrefix'variant'ownedVariantUsage=VariantUsageElement /// - /// The used to query textual notation of referenced - public VariantMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVariantUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, StringBuilder stringBuilder) { + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("variant "); + // Assignment Element : ownedVariantUsage = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedVariantUsage value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule EnumerationUsageMember + /// EnumerationUsageMember:VariantMembership=MemberPrefixownedRelatedElement+=EnumeratedValue /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.VariantMembership poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildEnumerationUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs index 425defbb..10873fae 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class VerificationCaseDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class VerificationCaseDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule VerificationCaseDefinition + /// VerificationCaseDefinition=OccurrenceDefinitionPrefix'verification''def'DefinitionDeclarationCaseBody /// - /// The used to query textual notation of referenced - public VerificationCaseDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVerificationCaseDefinition(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : VerificationCaseDefinition=OccurrenceDefinitionPrefix'verification''def'DefinitionDeclarationCaseBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("verification "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs index 64bbaa09..5907aea3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs @@ -29,44 +29,30 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class VerificationCaseUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class VerificationCaseUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule VerificationCaseUsage + /// VerificationCaseUsage=OccurrenceUsagePrefix'verification'ConstraintUsageDeclarationCaseBody /// - /// The used to query textual notation of referenced - public VerificationCaseUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVerificationCaseUsage(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.VerificationCases.VerificationCaseUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : VerificationCaseUsage=OccurrenceUsagePrefix'verification'ConstraintUsageDeclarationCaseBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("verification "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - - - - - - - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' - + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' + TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs index 0784a909..6255ccd5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs @@ -29,41 +29,49 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ViewDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class ViewDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ViewDefinitionBody + /// ViewDefinitionBody:ViewDefinition=';'|'{'ViewDefinitionBodyItem*'}' /// - /// The used to query textual notation of referenced - public ViewDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewDefinitionBody(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule ViewDefinitionBodyItem + /// ViewDefinitionBodyItem:ViewDefinition=DefinitionBodyItem|ownedRelationship+=ElementFilterMember|ownedRelationship+=ViewRenderingMember /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewDefinition poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewDefinitionBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : ViewDefinition=OccurrenceDefinitionPrefix'view''def'DefinitionDeclarationViewDefinitionBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule ViewDefinition + /// ViewDefinition=OccurrenceDefinitionPrefix'view''def'DefinitionDeclarationViewDefinitionBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("view "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : ViewDefinitionBody; Found rule ViewDefinitionBody:ViewDefinition=';'|'{'ViewDefinitionBodyItem*'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : ViewDefinitionBody; Found rule ViewDefinitionBody:ViewDefinition=';'|'{'ViewDefinitionBodyItem*'}' + BuildViewDefinitionBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs index 656522e1..7745ff9c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs @@ -29,28 +29,24 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ViewRenderingMembershipTextualNotationBuilder : TextualNotationBuilder + public static partial class ViewRenderingMembershipTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ViewRenderingMember + /// ViewRenderingMember:ViewRenderingMembership=MemberPrefix'render'ownedRelatedElement+=ViewRenderingUsage /// - /// The used to query textual notation of referenced - public ViewRenderingMembershipTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewRenderingMember(SysML2.NET.Core.POCO.Systems.Views.IViewRenderingMembership poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewRenderingMembership poco) - { - var stringBuilder = new StringBuilder(); + // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? + MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); + stringBuilder.Append("render "); + // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs index 5da8be3a..5ee321f7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs @@ -29,43 +29,50 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ViewUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ViewUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ViewBody + /// ViewBody:ViewUsage=';'|'{'ViewBodyItem*'}' /// - /// The used to query textual notation of referenced - public ViewUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewBody(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, StringBuilder stringBuilder) { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } /// - /// Builds the Textual Notation string for the provided + /// Builds the Textual Notation string for the rule ViewBodyItem + /// ViewBodyItem:ViewUsage=DefinitionBodyItem|ownedRelationship+=ElementFilterMember|ownedRelationship+=ViewRenderingMember|ownedRelationship+=Expose /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewUsage poco) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, StringBuilder stringBuilder) { - var stringBuilder = new StringBuilder(); - // Rule definition : ViewUsage=OccurrenceUsagePrefix'view'UsageDeclaration?ValuePart?ViewBody - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + /// + /// Builds the Textual Notation string for the rule ViewUsage + /// ViewUsage=OccurrenceUsagePrefix'view'UsageDeclaration?ValuePart?ViewBody + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewUsage(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, StringBuilder stringBuilder) + { + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("view "); - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - - - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue - - - // non Terminal : ViewBody; Found rule ViewBody:ViewUsage=';'|'{'ViewBodyItem*'}' - - + // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); + // non Terminal : ViewBody; Found rule ViewBody:ViewUsage=';'|'{'ViewBodyItem*'}' + BuildViewBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs index d5646706..892b92cd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs @@ -29,41 +29,27 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ViewpointDefinitionTextualNotationBuilder : TextualNotationBuilder + public static partial class ViewpointDefinitionTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ViewpointDefinition + /// ViewpointDefinition=OccurrenceDefinitionPrefix'viewpoint''def'DefinitionDeclarationRequirementBody /// - /// The used to query textual notation of referenced - public ViewpointDefinitionTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewpointDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewpointDefinition poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewpointDefinition poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ViewpointDefinition=OccurrenceDefinitionPrefix'viewpoint''def'DefinitionDeclarationRequirementBody - - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* - - + // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* + OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("viewpoint "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? - - - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' - - + // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? + DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs index 727f0287..c7f56352 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs @@ -29,46 +29,26 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class ViewpointUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class ViewpointUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule ViewpointUsage + /// ViewpointUsage=OccurrenceUsagePrefix'viewpoint'ConstraintUsageDeclarationRequirementBody /// - /// The used to query textual notation of referenced - public ViewpointUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildViewpointUsage(SysML2.NET.Core.POCO.Systems.Views.IViewpointUsage poco, StringBuilder stringBuilder) { - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Views.ViewpointUsage poco) - { - var stringBuilder = new StringBuilder(); - // Rule definition : ViewpointUsage=OccurrenceUsagePrefix'viewpoint'ConstraintUsageDeclarationRequirementBody - - - - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* - - + // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* + OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("viewpoint "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - - - - - - - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' - - + // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? + ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); + // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' + TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs new file mode 100644 index 00000000..a76da1f8 --- /dev/null +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs @@ -0,0 +1,51 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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. +// +// +// ------------------------------------------------------------------------------------------------ + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Root.Elements; + + /// + /// The provides Textual Notation Builder for the element + /// + public static partial class VisibilityKindTextualNotationBuilder + { + /// + /// Builds the Textual Notation string for the rule VisibilityIndicator + /// VisibilityIndicator:VisibilityKind='public'|'private'|'protected' + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildVisibilityIndicator(SysML2.NET.Core.Root.Namespaces.VisibilityKind poco, StringBuilder stringBuilder) + { + + } + } +} + +// ------------------------------------------------------------------------------------------------ +// --------THIS IS AN AUTOMATICALLY GENERATED FILE. ANY MANUAL CHANGES WILL BE OVERWRITTEN!-------- +// ------------------------------------------------------------------------------------------------ diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs index d4f759d4..fb835343 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs @@ -29,28 +29,31 @@ namespace SysML2.NET.TextualNotation using SysML2.NET.Core.POCO.Root.Elements; /// - /// The provides Textual Notation Builder for the element + /// The provides Textual Notation Builder for the element /// - public class WhileLoopActionUsageTextualNotationBuilder : TextualNotationBuilder + public static partial class WhileLoopActionUsageTextualNotationBuilder { /// - /// Initializes a new instance of a + /// Builds the Textual Notation string for the rule WhileLoopNode + /// WhileLoopNode:WhileLoopActionUsage=ActionNodePrefix('while'ownedRelationship+=ExpressionParameterMember|'loop'ownedRelationship+=EmptyParameterMember)ownedRelationship+=ActionBodyParameterMember('until'ownedRelationship+=ExpressionParameterMember';')? /// - /// The used to query textual notation of referenced - public WhileLoopActionUsageTextualNotationBuilder(ITextualNotationBuilderFacade facade) : base(facade) + /// The from which the rule should be build + /// The that contains the entire textual notation + public static void BuildWhileLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IWhileLoopActionUsage poco, StringBuilder stringBuilder) { - } + // non Terminal : ActionNodePrefix; Found rule ActionNodePrefix:ActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration? + ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); + // Group Element + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // Group Element + stringBuilder.Append("until "); + // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("; "); - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public override string BuildTextualNotation(SysML2.NET.Core.POCO.Systems.Actions.WhileLoopActionUsage poco) - { - var stringBuilder = new StringBuilder(); - return stringBuilder.ToString(); } } } diff --git a/SysML2.NET/TextualNotation/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/ConjugatedPortTypingTextualNotationBuilder.cs new file mode 100644 index 00000000..afe670eb --- /dev/null +++ b/SysML2.NET/TextualNotation/ConjugatedPortTypingTextualNotationBuilder.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Systems.Ports; + + /// + /// Hand-coded part of the + /// + public static partial class ConjugatedPortTypingTextualNotationBuilder + { + /// + /// Build the originalPortDefinition=~[QualifiedName] rule part + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + private static void BuildOriginalPortDefinition(IConjugatedPortTyping poco, StringBuilder stringBuilder) + { + } + } +} diff --git a/SysML2.NET/TextualNotation/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/FeatureMembershipTextualNotationBuilder.cs new file mode 100644 index 00000000..e1c0ddbf --- /dev/null +++ b/SysML2.NET/TextualNotation/FeatureMembershipTextualNotationBuilder.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Core.Types; + + /// + /// Hand-coded part of the + /// + public static partial class FeatureMembershipTextualNotationBuilder + { + /// + /// Build the memberFeature=[QualifiedName] of the rule + /// + /// The from which the rule should be build + /// The that contains the entire textual notation + private static void BuildMemberFeature(IFeatureMembership poco, StringBuilder stringBuilder) + { + } + } +} diff --git a/SysML2.NET/TextualNotation/TextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TextualNotationBuilder.cs deleted file mode 100644 index 4ea1b815..00000000 --- a/SysML2.NET/TextualNotation/TextualNotationBuilder.cs +++ /dev/null @@ -1,52 +0,0 @@ -// ------------------------------------------------------------------------------------------------- -// -// -// 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.TextualNotation -{ - using SysML2.NET.Core.POCO.Root.Elements; - - /// - /// Base class that provides Textual Notation string builder for a specific - /// - /// Any concrete class - public abstract class TextualNotationBuilder where TElement : class, IElement - { - /// - /// Gets the used to query textual notation of referenced - /// - protected readonly ITextualNotationBuilderFacade Facade; - - /// - /// Initializes a new instance of a - /// - /// The used to query textual notation of referenced - protected TextualNotationBuilder(ITextualNotationBuilderFacade facade) - { - this.Facade = facade; - } - - /// - /// Builds the Textual Notation string for the provided - /// - /// The from which the textual notation should be build - /// The built textual notation string - public abstract string BuildTextualNotation(TElement poco); - } -} From 1d61fbfb85c8a58943ebce8aaf1278ad55f1156c Mon Sep 17 00:00:00 2001 From: atheate Date: Thu, 26 Feb 2026 13:19:17 +0100 Subject: [PATCH 07/15] Supports assignment for bool and enum --- .../Extensions/PropertyExtension.cs | 44 ++++ .../HandleBarHelpers/RulesHelper.cs | 100 +++++++- ...AcceptActionUsageTextualNotationBuilder.cs | 27 +- .../ActionDefinitionTextualNotationBuilder.cs | 3 - .../ActionUsageTextualNotationBuilder.cs | 29 +-- .../ActorMembershipTextualNotationBuilder.cs | 4 +- ...ocationDefinitionTextualNotationBuilder.cs | 2 - .../AllocationUsageTextualNotationBuilder.cs | 3 - ...sisCaseDefinitionTextualNotationBuilder.cs | 3 - ...AnalysisCaseUsageTextualNotationBuilder.cs | 5 - .../AnnotationTextualNotationBuilder.cs | 11 +- ...rtConstraintUsageTextualNotationBuilder.cs | 12 +- ...gnmentActionUsageTextualNotationBuilder.cs | 11 - ...ociationStructureTextualNotationBuilder.cs | 3 - .../AssociationTextualNotationBuilder.cs | 3 - ...tributeDefinitionTextualNotationBuilder.cs | 2 - .../AttributeUsageTextualNotationBuilder.cs | 2 - .../BehaviorTextualNotationBuilder.cs | 3 - ...gConnectorAsUsageTextualNotationBuilder.cs | 14 +- .../BindingConnectorTextualNotationBuilder.cs | 13 +- ...BooleanExpressionTextualNotationBuilder.cs | 14 +- ...ulationDefinitionTextualNotationBuilder.cs | 3 - .../CalculationUsageTextualNotationBuilder.cs | 3 - .../CaseDefinitionTextualNotationBuilder.cs | 3 - .../CaseUsageTextualNotationBuilder.cs | 5 - .../ClassTextualNotationBuilder.cs | 3 - .../ClassifierTextualNotationBuilder.cs | 50 ++-- ...CollectExpressionTextualNotationBuilder.cs | 8 +- .../CommentTextualNotationBuilder.cs | 27 +- ...ConcernDefinitionTextualNotationBuilder.cs | 3 - .../ConcernUsageTextualNotationBuilder.cs | 3 - ...tedPortDefinitionTextualNotationBuilder.cs | 3 +- ...jugatedPortTypingTextualNotationBuilder.cs | 3 +- .../ConjugationTextualNotationBuilder.cs | 10 +- ...nectionDefinitionTextualNotationBuilder.cs | 2 - .../ConnectionUsageTextualNotationBuilder.cs | 32 ++- .../ConnectorTextualNotationBuilder.cs | 44 ++-- ...straintDefinitionTextualNotationBuilder.cs | 3 - .../ConstraintUsageTextualNotationBuilder.cs | 5 - ...tructorExpressionTextualNotationBuilder.cs | 6 +- .../DataTypeTextualNotationBuilder.cs | 3 - .../DecisionNodeTextualNotationBuilder.cs | 6 +- .../DefinitionTextualNotationBuilder.cs | 12 +- .../DependencyTextualNotationBuilder.cs | 40 ++- .../DisjoiningTextualNotationBuilder.cs | 9 +- .../DocumentationTextualNotationBuilder.cs | 14 +- ...tFilterMembershipTextualNotationBuilder.cs | 13 +- .../ElementTextualNotationBuilder.cs | 20 +- ...FeatureMembershipTextualNotationBuilder.cs | 15 +- ...erationDefinitionTextualNotationBuilder.cs | 3 - .../EnumerationUsageTextualNotationBuilder.cs | 3 - ...ntOccurrenceUsageTextualNotationBuilder.cs | 7 +- ...ExhibitStateUsageTextualNotationBuilder.cs | 5 +- .../ExposeTextualNotationBuilder.cs | 3 +- .../ExpressionTextualNotationBuilder.cs | 27 +- ...reChainExpressionTextualNotationBuilder.cs | 8 +- .../FeatureChainingTextualNotationBuilder.cs | 3 +- .../FeatureInvertingTextualNotationBuilder.cs | 9 +- ...FeatureMembershipTextualNotationBuilder.cs | 93 ++----- ...ferenceExpressionTextualNotationBuilder.cs | 18 +- .../FeatureTextualNotationBuilder.cs | 237 ++++++++---------- .../FeatureTypingTextualNotationBuilder.cs | 3 +- .../FeatureValueTextualNotationBuilder.cs | 38 +-- .../FlowDefinitionTextualNotationBuilder.cs | 2 - .../FlowEndTextualNotationBuilder.cs | 11 +- .../FlowTextualNotationBuilder.cs | 13 +- .../FlowUsageTextualNotationBuilder.cs | 6 - ...orLoopActionUsageTextualNotationBuilder.cs | 10 +- .../ForkNodeTextualNotationBuilder.cs | 6 +- ...ConcernMembershipTextualNotationBuilder.cs | 4 +- .../FunctionTextualNotationBuilder.cs | 3 - .../IfActionUsageTextualNotationBuilder.cs | 17 +- .../ImportTextualNotationBuilder.cs | 13 +- ...cludeUseCaseUsageTextualNotationBuilder.cs | 5 +- .../IndexExpressionTextualNotationBuilder.cs | 12 +- .../InteractionTextualNotationBuilder.cs | 3 - ...terfaceDefinitionTextualNotationBuilder.cs | 3 - .../InterfaceUsageTextualNotationBuilder.cs | 31 +-- .../InvariantTextualNotationBuilder.cs | 15 +- ...ocationExpressionTextualNotationBuilder.cs | 18 +- .../ItemDefinitionTextualNotationBuilder.cs | 2 - .../ItemUsageTextualNotationBuilder.cs | 2 - .../JoinNodeTextualNotationBuilder.cs | 6 +- .../LibraryPackageTextualNotationBuilder.cs | 15 +- .../LiteralBooleanTextualNotationBuilder.cs | 3 +- .../LiteralInfinityTextualNotationBuilder.cs | 2 +- .../LiteralIntegerTextualNotationBuilder.cs | 3 +- .../LiteralStringTextualNotationBuilder.cs | 3 +- .../MembershipExposeTextualNotationBuilder.cs | 1 - .../MembershipImportTextualNotationBuilder.cs | 13 +- .../MembershipTextualNotationBuilder.cs | 41 +-- .../MergeNodeTextualNotationBuilder.cs | 6 +- .../MetaclassTextualNotationBuilder.cs | 3 - ...aAccessExpressionTextualNotationBuilder.cs | 8 +- ...etadataDefinitionTextualNotationBuilder.cs | 10 +- .../MetadataFeatureTextualNotationBuilder.cs | 43 ++-- .../MetadataUsageTextualNotationBuilder.cs | 36 ++- ...MultiplicityRangeTextualNotationBuilder.cs | 35 +-- .../MultiplicityTextualNotationBuilder.cs | 3 - .../NamespaceExposeTextualNotationBuilder.cs | 1 - .../NamespaceTextualNotationBuilder.cs | 12 +- ...jectiveMembershipTextualNotationBuilder.cs | 4 +- ...urrenceDefinitionTextualNotationBuilder.cs | 24 +- .../OccurrenceUsageTextualNotationBuilder.cs | 66 +++-- ...peratorExpressionTextualNotationBuilder.cs | 97 +++---- .../OwningMembershipTextualNotationBuilder.cs | 51 ++-- .../PackageTextualNotationBuilder.cs | 19 +- ...rameterMembershipTextualNotationBuilder.cs | 48 ++-- .../PartDefinitionTextualNotationBuilder.cs | 2 - .../PartUsageTextualNotationBuilder.cs | 6 - .../PayloadFeatureTextualNotationBuilder.cs | 1 - ...erformActionUsageTextualNotationBuilder.cs | 14 +- .../PortDefinitionTextualNotationBuilder.cs | 5 +- .../PortUsageTextualNotationBuilder.cs | 28 +-- .../PredicateTextualNotationBuilder.cs | 3 - .../RedefinitionTextualNotationBuilder.cs | 14 +- .../ReferenceUsageTextualNotationBuilder.cs | 73 +++--- ...nderingDefinitionTextualNotationBuilder.cs | 2 - .../RenderingUsageTextualNotationBuilder.cs | 2 - ...straintMembershipTextualNotationBuilder.cs | 5 +- ...irementDefinitionTextualNotationBuilder.cs | 3 - .../RequirementUsageTextualNotationBuilder.cs | 6 - ...icationMembershipTextualNotationBuilder.cs | 4 +- ...ressionMembershipTextualNotationBuilder.cs | 4 +- ...rameterMembershipTextualNotationBuilder.cs | 14 +- ...yRequirementUsageTextualNotationBuilder.cs | 20 +- .../SelectExpressionTextualNotationBuilder.cs | 6 +- .../SendActionUsageTextualNotationBuilder.cs | 17 +- .../SpecializationTextualNotationBuilder.cs | 9 - ...eholderMembershipTextualNotationBuilder.cs | 4 +- .../StateDefinitionTextualNotationBuilder.cs | 3 - ...bactionMembershipTextualNotationBuilder.cs | 21 +- .../StateUsageTextualNotationBuilder.cs | 3 - .../StepTextualNotationBuilder.cs | 14 +- .../StructureTextualNotationBuilder.cs | 3 - ...SubclassificationTextualNotationBuilder.cs | 15 +- ...SubjectMembershipTextualNotationBuilder.cs | 7 +- .../SubsettingTextualNotationBuilder.cs | 8 - ...SuccessionAsUsageTextualNotationBuilder.cs | 21 +- .../SuccessionFlowTextualNotationBuilder.cs | 13 +- ...ccessionFlowUsageTextualNotationBuilder.cs | 3 - .../SuccessionTextualNotationBuilder.cs | 19 +- ...minateActionUsageTextualNotationBuilder.cs | 11 +- ...ualRepresentationTextualNotationBuilder.cs | 10 +- ...FeatureMembershipTextualNotationBuilder.cs | 9 +- .../TransitionUsageTextualNotationBuilder.cs | 76 +++--- .../TypeFeaturingTextualNotationBuilder.cs | 14 +- .../TypeTextualNotationBuilder.cs | 127 +++++----- .../UsageTextualNotationBuilder.cs | 65 +++-- ...UseCaseDefinitionTextualNotationBuilder.cs | 3 - .../UseCaseUsageTextualNotationBuilder.cs | 5 - ...VariantMembershipTextualNotationBuilder.cs | 8 +- ...ionCaseDefinitionTextualNotationBuilder.cs | 3 - ...ficationCaseUsageTextualNotationBuilder.cs | 5 - .../ViewDefinitionTextualNotationBuilder.cs | 3 - ...nderingMembershipTextualNotationBuilder.cs | 4 +- .../ViewUsageTextualNotationBuilder.cs | 4 - ...ewpointDefinitionTextualNotationBuilder.cs | 3 - .../ViewpointUsageTextualNotationBuilder.cs | 3 - ...leLoopActionUsageTextualNotationBuilder.cs | 18 +- 160 files changed, 1009 insertions(+), 1576 deletions(-) diff --git a/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs b/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs index e9032015..b8c13754 100644 --- a/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs +++ b/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs @@ -92,5 +92,49 @@ public static bool QueryPropertyIsPartOfNonDerivedCompositeAggregation(this IPro return property.Opposite is { IsComposite: true, IsDerived: false }; } + + /// + /// Queries the content of a IF statement for non-empty values + /// + /// The property that have to be used to produce the content + /// The name of the name + /// The If Statement content + public static string QueryIfStatementContentForNonEmpty(this IProperty property, string variableName) + { + var propertyName = property.QueryPropertyNameBasedOnUmlProperties(); + + if (property.QueryIsEnumerable()) + { + return $"{variableName}.{propertyName}.Count != 0"; + } + + if (property.QueryIsReferenceProperty()) + { + return $"{variableName}.{propertyName} != null"; + } + + if (property.QueryIsNullableAndNotString()) + { + return $"{variableName}.{propertyName}.HasValue"; + } + + if (property.QueryIsString()) + { + return $"!string.IsNullOrWhiteSpace({variableName}.{propertyName})"; + } + + if (property.QueryIsBool()) + { + return $"{variableName}.{propertyName}"; + } + + if (property.QueryIsEnum()) + { + var defaultValue = property.QueryIsEnumPropertyWithDefaultValue() ? $"{property.Type.QueryFullyQualifiedTypeName()}.{property.QueryDefaultValueAsString().CapitalizeFirstLetter()}" : ((IEnumeration)property.Type).OwnedLiteral[0].Name; + return $"{variableName}.{propertyName} != {defaultValue}"; + } + + return "THIS WILL PRODUCE COMPILE ERROR"; + } } } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index 6165d7dc..4e491089 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -81,13 +81,45 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) /// The related /// The collection of alternatives to process /// A collection of all existing rules - private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, IReadOnlyCollection rules) + /// + private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, IReadOnlyCollection rules, bool callerElementIsOptional = false) { if (alternatives.Count == 1) { - foreach (var textualRuleElement in alternatives.ElementAt(0).Elements) + var elements = alternatives.ElementAt(0).Elements; + + if (callerElementIsOptional) { - ProcessRuleElement(writer, umlClass, rules, textualRuleElement); + var targetPropertiesName = elements.OfType().Select(x => x.Property).Distinct().ToList(); + + if (targetPropertiesName.Count > 0) + { + var allProperties = umlClass.QueryAllProperties(); + writer.WriteSafeString("if("); + + var ifStatementContent = targetPropertiesName + .Select(propertyName => allProperties.SingleOrDefault(x => string.Equals(x.Name, propertyName, StringComparison.OrdinalIgnoreCase))) + .Select(matchedProperty => matchedProperty.QueryIfStatementContentForNonEmpty("poco")).ToList(); + + writer.WriteSafeString(string.Join(" && ", ifStatementContent)); + writer.WriteSafeString($"){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + + foreach (var textualRuleElement in elements) + { + ProcessRuleElement(writer, umlClass, rules, textualRuleElement); + } + + writer.WriteSafeString($"stringBuilder.Append(' ');{Environment.NewLine}"); + writer.WriteSafeString($"}}{Environment.NewLine}"); + } + } + else + { + foreach (var textualRuleElement in elements) + { + ProcessRuleElement(writer, umlClass, rules, textualRuleElement); + } } } else @@ -109,12 +141,18 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass switch (textualRuleElement) { case TerminalElement terminalElement: - writer.WriteSafeString($"stringBuilder.Append(\"{terminalElement.Value} \");"); + var valueToAdd = terminalElement.Value; + + if (valueToAdd.Length > 1) + { + valueToAdd += ' '; + } + + writer.WriteSafeString($"stringBuilder.Append(\"{valueToAdd}\");"); break; case NonTerminalElement nonTerminalElement: var referencedRule = rules.Single(x => x.RuleName == nonTerminalElement.Name); var typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; - writer.WriteSafeString($"// non Terminal : {nonTerminalElement.Name}; Found rule {referencedRule.RawRule} {Environment.NewLine}"); if (typeTarget != umlClass.Name) { @@ -143,17 +181,61 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass break; case GroupElement groupElement: - writer.WriteSafeString($"// Group Element{Environment.NewLine}"); - ProcessAlternatives(writer, umlClass, groupElement.Alternatives, rules); + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, rules, groupElement.IsOptional); + + if (!groupElement.IsOptional) + { + writer.WriteSafeString($"{Environment.NewLine}stringBuilder.Append(' ');"); + } + break; case AssignmentElement assignmentElement: - writer.WriteSafeString($"// Assignment Element : {assignmentElement.Property} {assignmentElement.Operator} {assignmentElement.Value}{Environment.NewLine}"); var properties = umlClass.QueryAllProperties(); var targetProperty = properties.SingleOrDefault(x => string.Equals(x.Name, assignmentElement.Property, StringComparison.OrdinalIgnoreCase)); if (targetProperty != null) { - writer.WriteSafeString($"// If property {targetProperty.Name} value is set, print {assignmentElement.Value}"); + if (targetProperty.QueryIsEnumerable()) + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of enumerable not supported yet\");"); + } + else + { + if (assignmentElement.IsOptional) + { + writer.WriteSafeString($"{Environment.NewLine}if({targetProperty.QueryIfStatementContentForNonEmpty("poco")}){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + writer.WriteSafeString($"{Environment.NewLine}"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()});{Environment.NewLine}"); + writer.WriteSafeString("}}"); + } + else + { + if (targetProperty.QueryIsString()) + { + writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()});"); + } + else if(targetProperty.QueryIsBool()) + { + if (assignmentElement.Value is TerminalElement terminalElement) + { + writer.WriteSafeString($"stringBuilder.Append(\"{terminalElement.Value}\");"); + } + else + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of bool with rule element value different than TerminalElement not supported\");"); + } + } + else if (targetProperty.QueryIsEnum()) + { + writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()}.ToString().ToLower());"); + } + else + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of non-string value not yet supported\");"); + } + } + } } else { diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs index 21bc64aa..97d150b1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs @@ -41,11 +41,8 @@ public static partial class AcceptActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAcceptNode(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); - // non Terminal : AcceptNodeDeclaration; Found rule AcceptNodeDeclaration:AcceptActionUsage=ActionNodeUsageDeclaration?'accept'AcceptParameterPart BuildAcceptNodeDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -58,10 +55,8 @@ public static void BuildAcceptNode(SysML2.NET.Core.POCO.Systems.Actions.IAcceptA /// The that contains the entire textual notation public static void BuildAcceptNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); stringBuilder.Append("accept "); - // non Terminal : AcceptParameterPart; Found rule AcceptParameterPart:AcceptActionUsage=ownedRelationship+=PayloadParameterMember('via'ownedRelationship+=NodeParameterMember)? BuildAcceptParameterPart(poco, stringBuilder); } @@ -74,12 +69,13 @@ public static void BuildAcceptNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actio /// The that contains the entire textual notation public static void BuildAcceptParameterPart(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append("via "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append("via "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -92,9 +88,7 @@ public static void BuildAcceptParameterPart(SysML2.NET.Core.POCO.Systems.Actions /// The that contains the entire textual notation public static void BuildStateAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : AcceptNodeDeclaration; Found rule AcceptNodeDeclaration:AcceptActionUsage=ActionNodeUsageDeclaration?'accept'AcceptParameterPart BuildAcceptNodeDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -107,7 +101,6 @@ public static void BuildStateAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Acti /// The that contains the entire textual notation public static void BuildTriggerAction(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : AcceptParameterPart; Found rule AcceptParameterPart:AcceptActionUsage=ownedRelationship+=PayloadParameterMember('via'ownedRelationship+=NodeParameterMember)? BuildAcceptParameterPart(poco, stringBuilder); } @@ -120,13 +113,7 @@ public static void BuildTriggerAction(SysML2.NET.Core.POCO.Systems.Actions.IAcce /// The that contains the entire textual notation public static void BuildTransitionAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : AcceptNodeDeclaration; Found rule AcceptNodeDeclaration:AcceptActionUsage=ActionNodeUsageDeclaration?'accept'AcceptParameterPart BuildAcceptNodeDeclaration(poco, stringBuilder); - // Group Element - stringBuilder.Append("{ "); - // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember - TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); - stringBuilder.Append("} "); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs index 5dec7aa8..395ed8bb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class ActionDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildActionDefinition(SysML2.NET.Core.POCO.Systems.Actions.IActionDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("action "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs index e6d8375b..4b0a2f36 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs @@ -41,9 +41,7 @@ public static partial class ActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); } @@ -68,7 +66,6 @@ public static void BuildActionNode(SysML2.NET.Core.POCO.Systems.Actions.IActionU public static void BuildActionNodeUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { stringBuilder.Append("action "); - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); } @@ -81,9 +78,7 @@ public static void BuildActionNodeUsageDeclaration(SysML2.NET.Core.POCO.Systems. /// The that contains the entire textual notation public static void BuildActionNodePrefix(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); - // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? BuildActionNodeUsageDeclaration(poco, stringBuilder); } @@ -96,18 +91,12 @@ public static void BuildActionNodePrefix(SysML2.NET.Core.POCO.Systems.Actions.IA /// The that contains the entire textual notation public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { - // Group Element - // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? - BuildActionNodeUsageDeclaration(poco, stringBuilder); stringBuilder.Append("assign "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append(":= "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -119,15 +108,10 @@ public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.A /// The that contains the entire textual notation public static void BuildActionBodyParameter(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("action "); - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - stringBuilder.Append("{ "); - // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember + stringBuilder.Append("{"); TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); - stringBuilder.Append("} "); + stringBuilder.Append("}"); } @@ -172,12 +156,9 @@ public static void BuildEffectBehaviorUsage(SysML2.NET.Core.POCO.Systems.Actions /// The that contains the entire textual notation public static void BuildActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("action "); - // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? BuildActionUsageDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs index 32cc3c30..5e0d05e6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs @@ -41,10 +41,8 @@ public static partial class ActorMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildActorMember(SysML2.NET.Core.POCO.Systems.Requirements.IActorMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs index 16afccf6..301b2089 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class AllocationDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAllocationDefinition(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("allocation "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs index 3c25ebd6..14776059 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs @@ -52,11 +52,8 @@ public static void BuildAllocationUsageDeclaration(SysML2.NET.Core.POCO.Systems. /// The that contains the entire textual notation public static void BuildAllocationUsage(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); - // non Terminal : AllocationUsageDeclaration; Found rule AllocationUsageDeclaration:AllocationUsage='allocation'UsageDeclaration('allocate'ConnectorPart)?|'allocate'ConnectorPart BuildAllocationUsageDeclaration(poco, stringBuilder); - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs index ad2f0689..cd54c4a4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class AnalysisCaseDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAnalysisCaseDefinition(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("analysis "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs index e34b4e54..4fafd028 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs @@ -41,16 +41,11 @@ public static partial class AnalysisCaseUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAnalysisCaseUsage(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("analysis "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs index 52cc66e8..2951e78c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class AnnotationTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,9 +53,8 @@ public static void BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IA /// The that contains the entire textual notation public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) { - stringBuilder.Append("# "); - // Assignment Element : annotatingElement = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property annotatingElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("#"); + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); // Assignment Element : ownedRelatedElement += annotatingElement } @@ -69,8 +67,7 @@ public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annot /// The that contains the entire textual notation public static void BuildAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) { - // Assignment Element : annotatedElement = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property annotatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs index aaedc496..f6b12595 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs @@ -41,16 +41,16 @@ public static partial class AssertConstraintUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAssertConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IAssertConstraintUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("assert "); - // Group Element - // Assignment Element : isNegated ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isNegated value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsNegated) + { + stringBuilder.Append("not"); + stringBuilder.Append(' '); + } - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' + stringBuilder.Append(' '); TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs index c5ba02b4..85486415 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs @@ -41,11 +41,8 @@ public static partial class AssignmentActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAssignmentNode(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); - // non Terminal : AssignmentNodeDeclaration; Found rule AssignmentNodeDeclaration:ActionUsage=(ActionNodeUsageDeclaration)?'assign'ownedRelationship+=AssignmentTargetMemberownedRelationship+=FeatureChainMember':='ownedRelationship+=NodeParameterMember ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -58,9 +55,7 @@ public static void BuildAssignmentNode(SysML2.NET.Core.POCO.Systems.Actions.IAss /// The that contains the entire textual notation public static void BuildStateAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : AssignmentNodeDeclaration; Found rule AssignmentNodeDeclaration:ActionUsage=(ActionNodeUsageDeclaration)?'assign'ownedRelationship+=AssignmentTargetMemberownedRelationship+=FeatureChainMember':='ownedRelationship+=NodeParameterMember ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -73,13 +68,7 @@ public static void BuildStateAssignmentActionUsage(SysML2.NET.Core.POCO.Systems. /// The that contains the entire textual notation public static void BuildTransitionAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : AssignmentNodeDeclaration; Found rule AssignmentNodeDeclaration:ActionUsage=(ActionNodeUsageDeclaration)?'assign'ownedRelationship+=AssignmentTargetMemberownedRelationship+=FeatureChainMember':='ownedRelationship+=NodeParameterMember ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); - // Group Element - stringBuilder.Append("{ "); - // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember - TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); - stringBuilder.Append("} "); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs index b1528d69..accee2d9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class AssociationStructureTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAssociationStructure(SysML2.NET.Core.POCO.Kernel.Associations.IAssociationStructure poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("assoc "); stringBuilder.Append("struct "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs index 82923aad..e011b18c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class AssociationTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAssociation(SysML2.NET.Core.POCO.Kernel.Associations.IAssociation poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("assoc "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs index c79ef359..17a490ee 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class AttributeDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAttributeDefinition(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeDefinition poco, StringBuilder stringBuilder) { - // non Terminal : DefinitionPrefix; Found rule DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* DefinitionTextualNotationBuilder.BuildDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("attribute "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs index 32677578..3e056fa8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs @@ -41,10 +41,8 @@ public static partial class AttributeUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAttributeUsage(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); stringBuilder.Append("attribute "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs index 0e0fd3d1..6295f00f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class BehaviorTextualNotationBuilder /// The that contains the entire textual notation public static void BuildBehavior(SysML2.NET.Core.POCO.Kernel.Behaviors.IBehavior poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("behavior "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs index 3ac18dde..4dc6ef8a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -41,20 +41,12 @@ public static partial class BindingConnectorAsUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildBindingConnectorAsUsage(SysML2.NET.Core.POCO.Systems.Connections.IBindingConnectorAsUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); - // Group Element - stringBuilder.Append("binding "); - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); stringBuilder.Append("bind "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("= "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("="); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs index 484d0758..9930b1a7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs @@ -52,18 +52,17 @@ public static void BuildBindingConnectorDeclaration(SysML2.NET.Core.POCO.Kernel. /// The that contains the entire textual notation public static void BuildBindingConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, StringBuilder stringBuilder) { - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("binding "); - // non Terminal : BindingConnectorDeclaration; Found rule BindingConnectorDeclaration:BindingConnector=FeatureDeclaration('of'ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)?|(isSufficient?='all')?('of'?ownedRelationship+=ConnectorEndMember'='ownedRelationship+=ConnectorEndMember)? BuildBindingConnectorDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs index f74854e3..a598712e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs @@ -41,20 +41,18 @@ public static partial class BooleanExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildBooleanExpression(SysML2.NET.Core.POCO.Kernel.Functions.IBooleanExpression poco, StringBuilder stringBuilder) { - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("bool "); - // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs index 368a60c5..aa7d25b3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class CalculationDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildCalculationDefinition(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("calc "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs index c78ff9bd..ed4e98cd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class CalculationUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildCalculationUsage(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("calc "); - // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs index b67d14c0..f2ff8064 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class CaseDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildCaseDefinition(SysML2.NET.Core.POCO.Systems.Cases.ICaseDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("case "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs index 59599bdc..fe3a5447 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs @@ -41,16 +41,11 @@ public static partial class CaseUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildCaseUsage(SysML2.NET.Core.POCO.Systems.Cases.ICaseUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("case "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs index 0313ea23..949a875d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class ClassTextualNotationBuilder /// The that contains the entire textual notation public static void BuildClass(SysML2.NET.Core.POCO.Kernel.Classes.IClass poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("class "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs index 4ef89bbe..557158ec 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs @@ -41,14 +41,14 @@ public static partial class ClassifierTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) { - // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -61,19 +61,20 @@ public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifi /// The that contains the entire textual notation public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : isSufficient ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isSufficient value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsSufficient) + { + stringBuilder.Append("all"); + stringBuilder.Append(' '); + } - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : TypeRelationshipPart; Found rule TypeRelationshipPart:Type=DisjoiningPart|UnioningPart|IntersectingPart|DifferencingPart TypeTextualNotationBuilder.BuildTypeRelationshipPart(poco, stringBuilder); } @@ -86,14 +87,14 @@ public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifi /// The that contains the entire textual notation public static void BuildSuperclassingPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) { - // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -106,12 +107,9 @@ public static void BuildSuperclassingPart(SysML2.NET.Core.POCO.Core.Classifiers. /// The that contains the entire textual notation public static void BuildClassifier(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("classifier "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs index 0b36c549..041e9a65 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class CollectExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildCollectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ICollectExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(". "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("."); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs index e303e66d..fcd0f63b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs @@ -41,28 +41,15 @@ public static partial class CommentTextualNotationBuilder /// The that contains the entire textual notation public static void BuildComment(SysML2.NET.Core.POCO.Root.Annotations.IComment poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("comment "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element - stringBuilder.Append("about "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (!string.IsNullOrWhiteSpace(poco.Locale)) + { + stringBuilder.Append("locale "); + stringBuilder.Append(poco.Locale); + stringBuilder.Append(' '); + } - - // Group Element - stringBuilder.Append("locale "); - // Assignment Element : locale = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property locale value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - - // Assignment Element : body = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property body value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Body); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs index 78e52f31..30b698bc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class ConcernDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConcernDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IConcernDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("concern "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs index 8889cd90..468db14d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs @@ -52,12 +52,9 @@ public static void BuildFramedConcernUsage(SysML2.NET.Core.POCO.Systems.Requirem /// The that contains the entire textual notation public static void BuildConcernUsage(SysML2.NET.Core.POCO.Systems.Requirements.IConcernUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("concern "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs index 61256e00..c28e844a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class ConjugatedPortDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConjugatedPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortDefinition poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs index 6780ddf0..14b4483e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class ConjugatedPortTypingTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConjugatedPortTyping(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortTyping poco, StringBuilder stringBuilder) { - stringBuilder.Append("~ "); - // Assignment Element : originalPortDefinition = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + stringBuilder.Append("~"); BuildOriginalPortDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs index fe68b9ca..17a48209 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs @@ -52,19 +52,13 @@ public static void BuildOwnedConjugation(SysML2.NET.Core.POCO.Core.Types.IConjug /// The that contains the entire textual notation public static void BuildConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("conjugation "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); stringBuilder.Append("conjugate "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : CONJUGATES; Found rule CONJUGATES='~'|'conjugates' + stringBuilder.Append(' '); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + stringBuilder.Append(' '); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs index 06b4a2f7..940a3494 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class ConnectionDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConnectionDefinition(SysML2.NET.Core.POCO.Systems.Connections.IConnectionDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("connection "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs index d153424b..3b9224f6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs @@ -52,11 +52,9 @@ public static void BuildConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.I /// The that contains the entire textual notation public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("to "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -68,18 +66,18 @@ public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connect /// The that contains the entire textual notation public static void BuildNaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) { - stringBuilder.Append("( "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("("); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - stringBuilder.Append(") "); + stringBuilder.Append(")"); } @@ -91,11 +89,9 @@ public static void BuildNaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connectio /// The that contains the entire textual notation public static void BuildConnectionUsage(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + stringBuilder.Append(' '); UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs index e4d151c0..ebae891a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs @@ -52,13 +52,10 @@ public static void BuildConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connect /// The that contains the entire textual notation public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) { - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("to "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -70,20 +67,19 @@ public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.C /// The that contains the entire textual notation public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) { - // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); - stringBuilder.Append("( "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("("); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - stringBuilder.Append(") "); + stringBuilder.Append(")"); } @@ -95,18 +91,18 @@ public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Con /// The that contains the entire textual notation public static void BuildConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) { - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("connector "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' + stringBuilder.Append(' '); TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs index 4ebbcdc0..71d48ba6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class ConstraintDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConstraintDefinition(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("constraint "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs index 60157281..1fad681d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs @@ -41,9 +41,7 @@ public static partial class ConstraintUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConstraintUsageDeclaration(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); } @@ -67,12 +65,9 @@ public static void BuildRequirementConstraintUsage(SysML2.NET.Core.POCO.Systems. /// The that contains the entire textual notation public static void BuildConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("constraint "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? BuildConstraintUsageDeclaration(poco, stringBuilder); - // non Terminal : CalculationBody; Found rule CalculationBody:Type=';'|'{'CalculationBodyPart'}' TypeTextualNotationBuilder.BuildCalculationBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs index 8e49a5e2..6abf780e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs @@ -42,10 +42,8 @@ public static partial class ConstructorExpressionTextualNotationBuilder public static void BuildConstructorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IConstructorExpression poco, StringBuilder stringBuilder) { stringBuilder.Append("new "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs index e7bd3f68..70b3ad2b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class DataTypeTextualNotationBuilder /// The that contains the entire textual notation public static void BuildDataType(SysML2.NET.Core.POCO.Kernel.DataTypes.IDataType poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("datatype "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs index ea487f4c..8fe13732 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs @@ -41,13 +41,9 @@ public static partial class DecisionNodeTextualNotationBuilder /// The that contains the entire textual notation public static void BuildDecisionNode(SysML2.NET.Core.POCO.Systems.Actions.IDecisionNode poco, StringBuilder stringBuilder) { - // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); - // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isComposite value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + stringBuilder.Append("decide"); UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs index e5ccadf7..db28a48a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class DefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildDefinitionExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,9 +53,7 @@ public static void BuildDefinitionExtensionKeyword(SysML2.NET.Core.POCO.Systems. /// The that contains the entire textual notation public static void BuildDefinitionPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) { - // non Terminal : BasicDefinitionPrefix; Found rule BasicDefinitionPrefix=isAbstract?='abstract'|isVariation?='variation' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember BuildDefinitionExtensionKeyword(poco, stringBuilder); } @@ -69,9 +66,7 @@ public static void BuildDefinitionPrefix(SysML2.NET.Core.POCO.Systems.Definition /// The that contains the entire textual notation public static void BuildDefinitionDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) { - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // non Terminal : SubclassificationPart; Found rule SubclassificationPart:Classifier=SPECIALIZESownedRelationship+=OwnedSubclassification(','ownedRelationship+=OwnedSubclassification)* ClassifierTextualNotationBuilder.BuildSubclassificationPart(poco, stringBuilder); } @@ -84,12 +79,9 @@ public static void BuildDefinitionDeclaration(SysML2.NET.Core.POCO.Systems.Defin /// The that contains the entire textual notation public static void BuildExtendedDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) { - // non Terminal : BasicDefinitionPrefix; Found rule BasicDefinitionPrefix=isAbstract?='abstract'|isVariation?='variation' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember BuildDefinitionExtensionKeyword(poco, stringBuilder); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody BuildDefinition(poco, stringBuilder); } @@ -102,9 +94,7 @@ public static void BuildExtendedDefinition(SysML2.NET.Core.POCO.Systems.Definiti /// The that contains the entire textual notation public static void BuildDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) { - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs index 4c1d1f68..4f7ecba7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs @@ -41,34 +41,32 @@ public static partial class DependencyTextualNotationBuilder /// The that contains the entire textual notation public static void BuildDependency(SysML2.NET.Core.POCO.Root.Dependencies.IDependency poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("dependency "); - // non Terminal : DependencyDeclaration; Found rule DependencyDeclaration=(Identification'from')?client+=[QualifiedName](','client+=[QualifiedName])*'to'supplier+=[QualifiedName](','supplier+=[QualifiedName])* - // Group Element - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - stringBuilder.Append("from "); - // Assignment Element : client += SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property client value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : client += SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property client value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.Client.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("to "); - // Assignment Element : supplier += SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property supplier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : supplier += SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property supplier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.Supplier.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs index 05c0f019..115075d1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs @@ -52,18 +52,13 @@ public static void BuildOwnedDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoin /// The that contains the entire textual notation public static void BuildDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("disjoining "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); stringBuilder.Append("disjoint "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); stringBuilder.Append("from "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + stringBuilder.Append(' '); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs index 8d6a6429..6be88e17 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs @@ -42,15 +42,15 @@ public static partial class DocumentationTextualNotationBuilder public static void BuildDocumentation(SysML2.NET.Core.POCO.Root.Annotations.IDocumentation poco, StringBuilder stringBuilder) { stringBuilder.Append("doc "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element - stringBuilder.Append("locale "); - // Assignment Element : locale = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property locale value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (!string.IsNullOrWhiteSpace(poco.Locale)) + { + stringBuilder.Append("locale "); + stringBuilder.Append(poco.Locale); + stringBuilder.Append(' '); + } - // Assignment Element : body = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property body value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Body); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs index 424a25f2..514be9fd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs @@ -41,12 +41,10 @@ public static partial class ElementFilterMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("filter "); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("; "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(";"); } @@ -58,10 +56,9 @@ public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages /// The that contains the entire textual notation public static void BuildFilterPackageMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, StringBuilder stringBuilder) { - stringBuilder.Append("[ "); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("] "); + stringBuilder.Append("["); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("]"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs index f06f98ff..dc955936 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs @@ -41,15 +41,19 @@ public static partial class ElementTextualNotationBuilder /// The that contains the entire textual notation public static void BuildIdentification(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("< "); - // Assignment Element : declaredShortName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property declaredShortName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("> "); + if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName)) + { + stringBuilder.Append("<"); + stringBuilder.Append(poco.DeclaredShortName); + stringBuilder.Append(">"); + stringBuilder.Append(' '); + } - // Group Element - // Assignment Element : declaredName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property declaredName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (!string.IsNullOrWhiteSpace(poco.DeclaredName)) + { + stringBuilder.Append(poco.DeclaredName); + stringBuilder.Append(' '); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs index 6b868048..42322c13 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class EndFeatureMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,8 +53,7 @@ public static void BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndF /// The that contains the entire textual notation public static void BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -67,8 +65,7 @@ public static void BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IE /// The that contains the entire textual notation public static void BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -80,8 +77,7 @@ public static void BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IE /// The that contains the entire textual notation public static void BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -93,8 +89,7 @@ public static void BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFea /// The that contains the entire textual notation public static void BuildEmptyEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs index c89f0f5d..9262de82 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs @@ -52,13 +52,10 @@ public static void BuildEnumerationBody(SysML2.NET.Core.POCO.Systems.Enumeration /// The that contains the entire textual notation public static void BuildEnumerationDefinition(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationDefinition poco, StringBuilder stringBuilder) { - // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, stringBuilder); stringBuilder.Append("enum "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : EnumerationBody; Found rule EnumerationBody:EnumerationDefinition=';'|'{'(ownedRelationship+=AnnotatingMember|ownedRelationship+=EnumerationUsageMember)*'}' BuildEnumerationBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs index b81e8827..be47fe15 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs @@ -42,7 +42,6 @@ public static partial class EnumerationUsageTextualNotationBuilder public static void BuildEnumeratedValue(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, StringBuilder stringBuilder) { stringBuilder.Append("enum "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } @@ -55,10 +54,8 @@ public static void BuildEnumeratedValue(SysML2.NET.Core.POCO.Systems.Enumeration /// The that contains the entire textual notation public static void BuildEnumerationUsage(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); stringBuilder.Append("enum "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs index 9514b705..b7a87d9f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class EventOccurrenceUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,12 +53,10 @@ public static void BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IE /// The that contains the entire textual notation public static void BuildEventOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("event "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : UsageCompletion; Found rule UsageCompletion:Usage=ValuePart?UsageBody + stringBuilder.Append(' '); UsageTextualNotationBuilder.BuildUsageCompletion(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs index 8de84ad5..af79c05d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs @@ -41,14 +41,11 @@ public static partial class ExhibitStateUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildExhibitStateUsage(SysML2.NET.Core.POCO.Systems.States.IExhibitStateUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("exhibit "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + stringBuilder.Append(' '); FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : StateUsageBody; Found rule StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' StateUsageTextualNotationBuilder.BuildStateUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs index af3d7bf2..cbd7435e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs @@ -42,9 +42,8 @@ public static partial class ExposeTextualNotationBuilder public static void BuildExpose(SysML2.NET.Core.POCO.Systems.Views.IExpose poco, StringBuilder stringBuilder) { stringBuilder.Append("expose "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + stringBuilder.Append(' '); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs index 4a1d9406..4ab27346 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs @@ -74,10 +74,9 @@ public static void BuildNonFeatureChainPrimaryExpression(SysML2.NET.Core.POCO.Ke /// The that contains the entire textual notation public static void BuildSequenceExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) { - stringBuilder.Append("( "); - // non Terminal : SequenceExpressionList; Found rule SequenceExpressionList:Expression=OwnedExpression','?|SequenceOperatorExpression + stringBuilder.Append("("); BuildSequenceExpressionList(poco, stringBuilder); - stringBuilder.Append(") "); + stringBuilder.Append(")"); } @@ -100,8 +99,7 @@ public static void BuildSequenceExpressionList(SysML2.NET.Core.POCO.Kernel.Funct /// The that contains the entire textual notation public static void BuildFunctionReference(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -124,10 +122,9 @@ public static void BuildBaseExpression(SysML2.NET.Core.POCO.Kernel.Functions.IEx /// The that contains the entire textual notation public static void BuildExpressionBody(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) { - stringBuilder.Append("{ "); - // non Terminal : FunctionBodyPart; Found rule FunctionBodyPart:Type=(TypeBodyElement|ownedRelationship+=ReturnFeatureMember)*(ownedRelationship+=ResultExpressionMember)? + stringBuilder.Append("{"); TypeTextualNotationBuilder.BuildFunctionBodyPart(poco, stringBuilder); - stringBuilder.Append("} "); + stringBuilder.Append("}"); } @@ -139,20 +136,18 @@ public static void BuildExpressionBody(SysML2.NET.Core.POCO.Kernel.Functions.IEx /// The that contains the entire textual notation public static void BuildExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) { - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("expr "); - // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs index f4f46550..6ae602f1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class FeatureChainExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFeatureChainExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureChainExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(". "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("."); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs index dd4c6b8a..4c3aa4b0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class FeatureChainingTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedFeatureChaining(SysML2.NET.Core.POCO.Core.Features.IFeatureChaining poco, StringBuilder stringBuilder) { - // Assignment Element : chainingFeature = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property chainingFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs index 0e3118a2..d12324ea 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs @@ -52,18 +52,13 @@ public static void BuildOwnedFeatureInverting(SysML2.NET.Core.POCO.Core.Features /// The that contains the entire textual notation public static void BuildFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("inverting "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); stringBuilder.Append("inverse "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); stringBuilder.Append("of "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + stringBuilder.Append(' '); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs index c88c60e5..894cc0c0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -41,10 +41,8 @@ public static partial class FeatureMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -56,10 +54,8 @@ public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types /// The that contains the entire textual notation public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -71,10 +67,8 @@ public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IF /// The that contains the entire textual notation public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -86,10 +80,8 @@ public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFe /// The that contains the entire textual notation public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -102,8 +94,7 @@ public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFea public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { stringBuilder.Append("then "); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -115,10 +106,8 @@ public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.I /// The that contains the entire textual notation public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -130,10 +119,8 @@ public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.C /// The that contains the entire textual notation public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -145,8 +132,7 @@ public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core /// The that contains the entire textual notation public static void BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -158,8 +144,7 @@ public static void BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types /// The that contains the entire textual notation public static void BuildFlowFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -182,12 +167,9 @@ public static void BuildActionBehaviorMember(SysML2.NET.Core.POCO.Core.Types.IFe /// The that contains the entire textual notation public static void BuildInitialNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("first "); - // Assignment Element : memberFeature = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement BuildMemberFeature(poco, stringBuilder); - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } @@ -200,10 +182,8 @@ public static void BuildInitialNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatu /// The that contains the entire textual notation public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -215,10 +195,8 @@ public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatur /// The that contains the entire textual notation public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -230,10 +208,8 @@ public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.T /// The that contains the entire textual notation public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -245,8 +221,7 @@ public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types. /// The that contains the entire textual notation public static void BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -258,11 +233,10 @@ public static void BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.T /// The that contains the entire textual notation public static void BuildEntryTransitionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - stringBuilder.Append("; "); + stringBuilder.Append(' '); + stringBuilder.Append(";"); } @@ -274,10 +248,8 @@ public static void BuildEntryTransitionMember(SysML2.NET.Core.POCO.Core.Types.IF /// The that contains the entire textual notation public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -289,10 +261,8 @@ public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IF /// The that contains the entire textual notation public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -304,8 +274,7 @@ public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Ty /// The that contains the entire textual notation public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -317,10 +286,8 @@ public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types. /// The that contains the entire textual notation public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -332,8 +299,7 @@ public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeat /// The that contains the entire textual notation public static void BuildOwnedExpressionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -345,7 +311,6 @@ public static void BuildOwnedExpressionReferenceMember(SysML2.NET.Core.POCO.Core /// The that contains the entire textual notation public static void BuildOwnedExpressionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedFeatureMember = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement BuildOwnedFeatureMember(poco, stringBuilder); } @@ -358,8 +323,7 @@ public static void BuildOwnedExpressionMember(SysML2.NET.Core.POCO.Core.Types.IF /// The that contains the entire textual notation public static void BuildSequenceExpressionListMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -371,8 +335,7 @@ public static void BuildSequenceExpressionListMember(SysML2.NET.Core.POCO.Core.T /// The that contains the entire textual notation public static void BuildFunctionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -384,8 +347,7 @@ public static void BuildFunctionReferenceMember(SysML2.NET.Core.POCO.Core.Types. /// The that contains the entire textual notation public static void BuildNamedArgumentMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -397,8 +359,7 @@ public static void BuildNamedArgumentMember(SysML2.NET.Core.POCO.Core.Types.IFea /// The that contains the entire textual notation public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -410,8 +371,7 @@ public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFe /// The that contains the entire textual notation public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -423,8 +383,7 @@ public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFe /// The that contains the entire textual notation public static void BuildMetadataBodyFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs index 90934ea6..6bcf48cb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class FeatureReferenceExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,8 +53,7 @@ public static void BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Ker /// The that contains the entire textual notation public static void BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -67,8 +65,7 @@ public static void BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Exp /// The that contains the entire textual notation public static void BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -80,10 +77,8 @@ public static void BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel. /// The that contains the entire textual notation public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -95,8 +90,7 @@ public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.E /// The that contains the entire textual notation public static void BuildBodyExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs index 53b9088e..5915679b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class FeatureTextualNotationBuilder /// The that contains the entire textual notation public static void BuildValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -76,12 +75,13 @@ public static void BuildFeatureSpecialization(SysML2.NET.Core.POCO.Core.Features /// The that contains the entire textual notation public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // non Terminal : TypedBy; Found rule TypedBy:Feature=DEFINED_BYownedRelationship+=FeatureTyping BuildTypedBy(poco, stringBuilder); - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -94,10 +94,8 @@ public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// The that contains the entire textual notation public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // non Terminal : DEFINED_BY; Found rule DEFINED_BY=':'|'defined''by' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -109,12 +107,13 @@ public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// The that contains the entire textual notation public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // non Terminal : Subsets; Found rule Subsets:Feature=SUBSETSownedRelationship+=OwnedSubsetting BuildSubsets(poco, stringBuilder); - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -127,10 +126,8 @@ public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature /// The that contains the entire textual notation public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // non Terminal : SUBSETS; Found rule SUBSETS=':>'|'subsets' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -142,10 +139,8 @@ public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// The that contains the entire textual notation public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // non Terminal : REFERENCES; Found rule REFERENCES='::>'|'references' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -157,10 +152,8 @@ public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature p /// The that contains the entire textual notation public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // non Terminal : CROSSES; Found rule CROSSES='=>'|'crosses' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -172,12 +165,13 @@ public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// The that contains the entire textual notation public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // non Terminal : Redefines; Found rule Redefines:Feature=REDEFINESownedRelationship+=OwnedRedefinition BuildRedefines(poco, stringBuilder); - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -190,10 +184,8 @@ public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeatur /// The that contains the entire textual notation public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // non Terminal : REDEFINES; Found rule REDEFINES=':>>'|'redefines' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -205,13 +197,11 @@ public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature po /// The that contains the entire textual notation public static void BuildOwnedFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(". "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("."); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); } @@ -234,8 +224,7 @@ public static void BuildMultiplicityPart(SysML2.NET.Core.POCO.Core.Features.IFea /// The that contains the entire textual notation public static void BuildOwnedCrossMultiplicity(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -269,14 +258,12 @@ public static void BuildPayloadFeatureSpecializationPart(SysML2.NET.Core.POCO.Co /// The that contains the entire textual notation public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(". "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("."); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(". "); + stringBuilder.Append(' '); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("."); } @@ -288,8 +275,7 @@ public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IF /// The that contains the entire textual notation public static void BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -301,8 +287,7 @@ public static void BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFea /// The that contains the entire textual notation public static void BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -314,8 +299,7 @@ public static void BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poc /// The that contains the entire textual notation public static void BuildArgumentExpression(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -338,13 +322,14 @@ public static void BuildFeatureElement(SysML2.NET.Core.POCO.Core.Features.IFeatu /// The that contains the entire textual notation public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : isConstant ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isConstant value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : isVariable = true + if (poco.IsConstant) + { + stringBuilder.Append("const"); + // Assignment Element : isVariable = true + stringBuilder.Append(' '); + } - // Assignment Element : isEnd ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isEnd value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + stringBuilder.Append("end"); } @@ -356,21 +341,25 @@ public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFea /// The that contains the entire textual notation public static void BuildBasicFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : direction = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property direction value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.Direction.HasValue) + { + stringBuilder.Append(poco.Direction.ToString().ToLower()); + stringBuilder.Append(' '); + } - // Group Element - // Assignment Element : isDerived ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isDerived value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsDerived) + { + stringBuilder.Append("derived"); + stringBuilder.Append(' '); + } - // Group Element - // Assignment Element : isAbstract ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isAbstract value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsAbstract) + { + stringBuilder.Append("abstract"); + stringBuilder.Append(' '); + } - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } @@ -383,13 +372,14 @@ public static void BuildBasicFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IF /// The that contains the entire textual notation public static void BuildFeatureDeclaration(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : isSufficient ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isSufficient value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsSufficient) + { + stringBuilder.Append("all"); + stringBuilder.Append(' '); + } - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : FeatureRelationshipPart; Found rule FeatureRelationshipPart:Feature=TypeRelationshipPart|ChainingPart|InvertingPart|TypeFeaturingPart + stringBuilder.Append(' '); BuildFeatureRelationshipPart(poco, stringBuilder); } @@ -425,8 +415,8 @@ public static void BuildFeatureRelationshipPart(SysML2.NET.Core.POCO.Core.Featur public static void BuildChainingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { stringBuilder.Append("chains "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); } @@ -440,8 +430,7 @@ public static void BuildInvertingPart(SysML2.NET.Core.POCO.Core.Features.IFeatur { stringBuilder.Append("inverse "); stringBuilder.Append("of "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -455,12 +444,13 @@ public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFe { stringBuilder.Append("featured "); stringBuilder.Append("by "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedTypeFeaturing += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedTypeFeaturing value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.ownedTypeFeaturing.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -473,13 +463,11 @@ public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFe /// The that contains the entire textual notation public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(". "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("."); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); } @@ -491,8 +479,7 @@ public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature /// The that contains the entire textual notation public static void BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -504,8 +491,7 @@ public static void BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFea /// The that contains the entire textual notation public static void BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -517,8 +503,7 @@ public static void BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeatur /// The that contains the entire textual notation public static void BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -530,8 +515,7 @@ public static void BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeat /// The that contains the entire textual notation public static void BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -543,8 +527,7 @@ public static void BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core /// The that contains the entire textual notation public static void BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -556,8 +539,7 @@ public static void BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature /// The that contains the entire textual notation public static void BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -581,7 +563,6 @@ public static void BuildFeatureReference(SysML2.NET.Core.POCO.Core.Features.IFea /// The that contains the entire textual notation public static void BuildConstructorResult(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // non Terminal : ArgumentList; Found rule ArgumentList:Feature='('(PositionalArgumentList|NamedArgumentList)?')' BuildArgumentList(poco, stringBuilder); } @@ -594,10 +575,9 @@ public static void BuildConstructorResult(SysML2.NET.Core.POCO.Core.Features.IFe /// The that contains the entire textual notation public static void BuildArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - stringBuilder.Append("( "); - // Group Element + stringBuilder.Append("("); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - stringBuilder.Append(") "); + stringBuilder.Append(")"); } @@ -609,12 +589,13 @@ public static void BuildArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature /// The that contains the entire textual notation public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -627,12 +608,13 @@ public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Feature /// The that contains the entire textual notation public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -645,11 +627,9 @@ public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFe /// The that contains the entire textual notation public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("= "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("="); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -662,15 +642,10 @@ public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeatur public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { stringBuilder.Append("feature "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : FeatureSpecializationPart; Found rule FeatureSpecializationPart:Feature=FeatureSpecialization+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization* + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); BuildFeatureSpecializationPart(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue BuildValuePart(poco, stringBuilder); - // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); } @@ -683,11 +658,9 @@ public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.I /// The that contains the entire textual notation public static void BuildFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + stringBuilder.Append(' '); BuildValuePart(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs index 8a3bcb35..0ebdf2b0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs @@ -52,8 +52,7 @@ public static void BuildOwnedFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IF /// The that contains the entire textual notation public static void BuildReferenceTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, StringBuilder stringBuilder) { - // Assignment Element : type = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property type value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs index d2ba52fb..788230c7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class FeatureValueTextualNotationBuilder /// The that contains the entire textual notation public static void BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,8 +53,7 @@ public static void BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureV /// The that contains the entire textual notation public static void BuildArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -67,8 +65,7 @@ public static void BuildArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues. /// The that contains the entire textual notation public static void BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -80,8 +77,7 @@ public static void BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.Feat /// The that contains the entire textual notation public static void BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -93,8 +89,7 @@ public static void BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues /// The that contains the entire textual notation public static void BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -106,8 +101,7 @@ public static void BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.Feat /// The that contains the entire textual notation public static void BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -119,8 +113,7 @@ public static void BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.Fea /// The that contains the entire textual notation public static void BuildMetadataValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -132,8 +125,7 @@ public static void BuildMetadataValue(SysML2.NET.Core.POCO.Kernel.FeatureValues. /// The that contains the entire textual notation public static void BuildPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -145,8 +137,7 @@ public static void BuildPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.Feature /// The that contains the entire textual notation public static void BuildNonFeatureChainPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -158,8 +149,7 @@ public static void BuildNonFeatureChainPrimaryArgumentValue(SysML2.NET.Core.POCO /// The that contains the entire textual notation public static void BuildBodyArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -171,8 +161,7 @@ public static void BuildBodyArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureVal /// The that contains the entire textual notation public static void BuildFunctionReferenceArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -184,10 +173,9 @@ public static void BuildFunctionReferenceArgumentValue(SysML2.NET.Core.POCO.Kern /// The that contains the entire textual notation public static void BuildFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs index d1bf3698..6771417c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class FlowDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFlowDefinition(SysML2.NET.Core.POCO.Systems.Flows.IFlowDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("flow "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs index 1b58aab6..2dace9da 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs @@ -41,12 +41,13 @@ public static partial class FlowEndTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFlowEnd(SysML2.NET.Core.POCO.Kernel.Interactions.IFlowEnd poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs index d76d86df..fd460f29 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs @@ -41,18 +41,17 @@ public static partial class FlowTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFlow(SysML2.NET.Core.POCO.Kernel.Interactions.IFlow poco, StringBuilder stringBuilder) { - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("flow "); - // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs index 43644f24..ce5d1e7e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class FlowUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMessage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("message "); - // non Terminal : MessageDeclaration; Found rule MessageDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=MessageEventMember'to'ownedRelationship+=MessageEventMember)?|ownedRelationship+=MessageEventMember'to'ownedRelationship+=MessageEventMember BuildMessageDeclaration(poco, stringBuilder); - // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); // Assignment Element : isAbstract = true @@ -82,12 +79,9 @@ public static void BuildFlowDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlow /// The that contains the entire textual notation public static void BuildFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("flow "); - // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember BuildFlowDeclaration(poco, stringBuilder); - // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs index bba3ffc9..8e56eaa4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs @@ -41,16 +41,12 @@ public static partial class ForLoopActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildForLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IForLoopActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : ActionNodePrefix; Found rule ActionNodePrefix:ActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration? ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); stringBuilder.Append("for "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("in "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs index ec9f26d1..c8732103 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs @@ -41,13 +41,9 @@ public static partial class ForkNodeTextualNotationBuilder /// The that contains the entire textual notation public static void BuildForkNode(SysML2.NET.Core.POCO.Systems.Actions.IForkNode poco, StringBuilder stringBuilder) { - // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); - // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isComposite value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + stringBuilder.Append("fork"); UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs index c2d50f48..0106cd4d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class FramedConcernMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFramedConcernMember(SysML2.NET.Core.POCO.Systems.Requirements.IFramedConcernMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("frame "); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs index 26af9410..89e9d649 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class FunctionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFunction(SysML2.NET.Core.POCO.Kernel.Functions.IFunction poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("function "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs index a70f729c..5f10dccf 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs @@ -41,17 +41,16 @@ public static partial class IfActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildIfNode(SysML2.NET.Core.POCO.Systems.Actions.IIfActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : ActionNodePrefix; Found rule ActionNodePrefix:ActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration? ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); stringBuilder.Append("if "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append("else "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.GroupElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.GroupElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append("else "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs index a380989d..df1e7e6d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs @@ -52,16 +52,15 @@ public static void BuildImportDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.I /// The that contains the entire textual notation public static void BuildImport(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco, StringBuilder stringBuilder) { - // Assignment Element : visibility = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property visibility value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Visibility.ToString().ToLower()); stringBuilder.Append("import "); - // Group Element - // Assignment Element : isImportAll ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isImportAll value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsImportAll) + { + stringBuilder.Append("all"); + stringBuilder.Append(' '); + } - // non Terminal : ImportDeclaration; Found rule ImportDeclaration:Import=MembershipImport|NamespaceImport BuildImportDeclaration(poco, stringBuilder); - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs index 2d195a8d..0297af1a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs @@ -41,14 +41,11 @@ public static partial class IncludeUseCaseUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildIncludeUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IIncludeUseCaseUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("include "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + stringBuilder.Append(' '); FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs index bef87935..823e4d7e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs @@ -41,13 +41,11 @@ public static partial class IndexExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildIndexExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IIndexExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("# "); - stringBuilder.Append("( "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(") "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("#"); + stringBuilder.Append("("); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(")"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs index 90481249..131c6eac 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class InteractionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildInteraction(SysML2.NET.Core.POCO.Kernel.Interactions.IInteraction poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("interaction "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs index 2164c9aa..d855c825 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class InterfaceDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildInterfaceDefinition(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("interface "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : InterfaceBody; Found rule InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' TypeTextualNotationBuilder.BuildInterfaceBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs index 8c664e03..a8edd8a2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs @@ -63,11 +63,9 @@ public static void BuildInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.II /// The that contains the entire textual notation public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("to "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -79,18 +77,18 @@ public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfa /// The that contains the entire textual notation public static void BuildNaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) { - stringBuilder.Append("( "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("("); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - stringBuilder.Append(") "); + stringBuilder.Append(")"); } @@ -102,12 +100,9 @@ public static void BuildNaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interface /// The that contains the entire textual notation public static void BuildInterfaceUsage(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("interface "); - // non Terminal : InterfaceUsageDeclaration; Found rule InterfaceUsageDeclaration:InterfaceUsage=UsageDeclarationValuePart?('connect'InterfacePart)?|InterfacePart BuildInterfaceUsageDeclaration(poco, stringBuilder); - // non Terminal : InterfaceBody; Found rule InterfaceBody:Type=';'|'{'InterfaceBodyItem*'}' TypeTextualNotationBuilder.BuildInterfaceBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs index 761ecea4..acff88ca 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs @@ -41,22 +41,19 @@ public static partial class InvariantTextualNotationBuilder /// The that contains the entire textual notation public static void BuildInvariant(SysML2.NET.Core.POCO.Kernel.Functions.IInvariant poco, StringBuilder stringBuilder) { - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("inv "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs index dcbb525f..78d28bd1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs @@ -41,15 +41,12 @@ public static partial class InvocationExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("-> "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -61,12 +58,9 @@ public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel. /// The that contains the entire textual notation public static void BuildInvocationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : ArgumentList; Found rule ArgumentList:Feature='('(PositionalArgumentList|NamedArgumentList)?')' + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); FeatureTextualNotationBuilder.BuildArgumentList(poco, stringBuilder); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs index d9459d04..e35af46e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class ItemDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildItemDefinition(SysML2.NET.Core.POCO.Systems.Items.IItemDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("item "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs index 147f8534..a7b599ca 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs @@ -41,10 +41,8 @@ public static partial class ItemUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildItemUsage(SysML2.NET.Core.POCO.Systems.Items.IItemUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("item "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs index dd822154..4f76eac2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs @@ -41,13 +41,9 @@ public static partial class JoinNodeTextualNotationBuilder /// The that contains the entire textual notation public static void BuildJoinNode(SysML2.NET.Core.POCO.Systems.Actions.IJoinNode poco, StringBuilder stringBuilder) { - // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); - // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isComposite value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + stringBuilder.Append("join"); UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs index 901adcce..2931b48b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs @@ -41,18 +41,17 @@ public static partial class LibraryPackageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildLibraryPackage(SysML2.NET.Core.POCO.Kernel.Packages.ILibraryPackage poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : isStandard ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isStandard value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + stringBuilder.Append("standard"); + stringBuilder.Append(' '); stringBuilder.Append("library "); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // non Terminal : PackageDeclaration; Found rule PackageDeclaration:Package='package'Identification PackageTextualNotationBuilder.BuildPackageDeclaration(poco, stringBuilder); - // non Terminal : PackageBody; Found rule PackageBody:Package=';'|'{'PackageBodyElement*'}' PackageTextualNotationBuilder.BuildPackageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs index 8ec970c4..eb9cb34d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class LiteralBooleanTextualNotationBuilder /// The that contains the entire textual notation public static void BuildLiteralBoolean(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralBoolean poco, StringBuilder stringBuilder) { - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of bool with rule element value different than TerminalElement not supported"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs index 55ea2a17..78830938 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs @@ -41,7 +41,7 @@ public static partial class LiteralInfinityTextualNotationBuilder /// The that contains the entire textual notation public static void BuildLiteralInfinity(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInfinity poco, StringBuilder stringBuilder) { - stringBuilder.Append("* "); + stringBuilder.Append("*"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs index 0b61f6ff..06b4bf1e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class LiteralIntegerTextualNotationBuilder /// The that contains the entire textual notation public static void BuildLiteralInteger(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInteger poco, StringBuilder stringBuilder) { - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs index 11d80c82..a1eec88a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class LiteralStringTextualNotationBuilder /// The that contains the entire textual notation public static void BuildLiteralString(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralString poco, StringBuilder stringBuilder) { - // Assignment Element : value = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property value value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Value); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs index c9c8ccf1..c26c9a7e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs @@ -41,7 +41,6 @@ public static partial class MembershipExposeTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMembershipExpose(SysML2.NET.Core.POCO.Systems.Views.IMembershipExpose poco, StringBuilder stringBuilder) { - // non Terminal : MembershipImport; Found rule MembershipImport=importedMembership=[QualifiedName]('::'isRecursive?='**')? MembershipImportTextualNotationBuilder.BuildMembershipImport(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs index 95dba6bd..30617fe2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs @@ -41,12 +41,13 @@ public static partial class MembershipImportTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMembershipImport(SysML2.NET.Core.POCO.Root.Namespaces.IMembershipImport poco, StringBuilder stringBuilder) { - // Assignment Element : importedMembership = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property importedMembership value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // Group Element - stringBuilder.Append(":: "); - // Assignment Element : isRecursive ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isRecursive value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + if (poco.IsRecursive) + { + stringBuilder.Append(":: "); + stringBuilder.Append("**"); + stringBuilder.Append(' '); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs index f74f88d1..16910204 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs @@ -41,9 +41,11 @@ public static partial class MembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMemberPrefix(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : visibility = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property visibility value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.Visibility != SysML2.NET.Core.Root.Namespaces.VisibilityKind.Public) + { + stringBuilder.Append(poco.Visibility.ToString().ToLower()); + stringBuilder.Append(' '); + } } @@ -56,23 +58,24 @@ public static void BuildMemberPrefix(SysML2.NET.Core.POCO.Root.Namespaces.IMembe /// The that contains the entire textual notation public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("alias "); - // Group Element - stringBuilder.Append("< "); - // Assignment Element : memberShortName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property memberShortName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("> "); - - // Group Element - // Assignment Element : memberName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property memberName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (!string.IsNullOrWhiteSpace(poco.MemberShortName)) + { + stringBuilder.Append("<"); + stringBuilder.Append(poco.MemberShortName); + stringBuilder.Append(">"); + stringBuilder.Append(' '); + } + + if (!string.IsNullOrWhiteSpace(poco.MemberName)) + { + stringBuilder.Append(poco.MemberName); + stringBuilder.Append(' '); + } stringBuilder.Append("for "); - // Assignment Element : memberElement = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property memberElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } @@ -96,8 +99,7 @@ public static void BuildFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces. /// The that contains the entire textual notation public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { - // Assignment Element : memberElement = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property memberElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -109,8 +111,7 @@ public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespa /// The that contains the entire textual notation public static void BuildElementReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { - // Assignment Element : memberElement = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property memberElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs index f1f99737..ec77b98f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs @@ -41,13 +41,9 @@ public static partial class MergeNodeTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMergeNode(SysML2.NET.Core.POCO.Systems.Actions.IMergeNode poco, StringBuilder stringBuilder) { - // non Terminal : ControlNodePrefix; Found rule ControlNodePrefix:OccurrenceUsage=RefPrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, stringBuilder); - // Assignment Element : isComposite ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isComposite value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? + stringBuilder.Append("merge"); UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs index 0205deb3..d0a12732 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class MetaclassTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMetaclass(SysML2.NET.Core.POCO.Kernel.Metadata.IMetaclass poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("metaclass "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs index 5fa58924..6b3dc338 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class MetadataAccessExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,9 +53,8 @@ public static void BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expression /// The that contains the entire textual notation public static void BuildMetadataAccessExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(". "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("."); stringBuilder.Append("metadata "); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs index 8730c7f6..a1158a0f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs @@ -41,15 +41,15 @@ public static partial class MetadataDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMetadataDefinition(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataDefinition poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : isAbstract ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isAbstract value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsAbstract) + { + stringBuilder.Append("abstract"); + stringBuilder.Append(' '); + } - // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, stringBuilder); stringBuilder.Append("metadata "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs index 0828421b..38c50000 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class MetadataFeatureTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,14 +53,8 @@ public static void BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metada /// The that contains the entire textual notation public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) { - // Group Element - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element - throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -73,25 +66,29 @@ public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.M /// The that contains the entire textual notation public static void BuildMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : MetadataFeatureDeclaration; Found rule MetadataFeatureDeclaration:MetadataFeature=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping + stringBuilder.Append(' '); BuildMetadataFeatureDeclaration(poco, stringBuilder); - // Group Element - stringBuilder.Append("about "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append("about "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } + stringBuilder.Append(' '); + } - // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs index e228b194..14fbe831 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class MetadataUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,14 +53,8 @@ public static void BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadat /// The that contains the entire textual notation public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) { - // Group Element - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element - throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -73,23 +66,24 @@ public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Me /// The that contains the entire textual notation public static void BuildMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : MetadataUsageDeclaration; Found rule MetadataUsageDeclaration:MetadataUsage=(Identification(':'|'typed''by'))?ownedRelationship+=OwnedFeatureTyping + stringBuilder.Append(' '); BuildMetadataUsageDeclaration(poco, stringBuilder); - // Group Element - stringBuilder.Append("about "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append("about "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } + stringBuilder.Append(' '); + } - // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs index e71cbe8b..a4800701 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs @@ -41,7 +41,6 @@ public static partial class MultiplicityRangeTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) { - // non Terminal : MultiplicityBounds; Found rule MultiplicityBounds:MultiplicityRange='['(ownedRelationship+=MultiplicityExpressionMember'..')?ownedRelationship+=MultiplicityExpressionMember']' BuildMultiplicityBounds(poco, stringBuilder); } @@ -54,15 +53,16 @@ public static void BuildOwnedMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multi /// The that contains the entire textual notation public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) { - stringBuilder.Append("[ "); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(".. "); + stringBuilder.Append("["); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(".. "); + stringBuilder.Append(' '); + } - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("] "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("]"); } @@ -74,15 +74,16 @@ public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplic /// The that contains the entire textual notation public static void BuildMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) { - stringBuilder.Append("[ "); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(".. "); + stringBuilder.Append("["); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(".. "); + stringBuilder.Append(' '); + } - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("] "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("]"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs index 488e68ed..c0f0e236 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs @@ -53,11 +53,8 @@ public static void BuildEmptyMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMulti public static void BuildMultiplicitySubset(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, StringBuilder stringBuilder) { stringBuilder.Append("multiplicity "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // non Terminal : Subsets; Found rule Subsets:Feature=SUBSETSownedRelationship+=OwnedSubsetting FeatureTextualNotationBuilder.BuildSubsets(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs index 3b0da7ef..b0364f64 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs @@ -41,7 +41,6 @@ public static partial class NamespaceExposeTextualNotationBuilder /// The that contains the entire textual notation public static void BuildNamespaceExpose(SysML2.NET.Core.POCO.Systems.Views.INamespaceExpose poco, StringBuilder stringBuilder) { - // non Terminal : NamespaceImport; Found rule NamespaceImport=importedNamespace=[QualifiedName]'::''*'('::'isRecursive?='**')?|importedNamespace=FilterPackage{ownedRelatedElement+=importedNamespace} NamespaceImportTextualNotationBuilder.BuildNamespaceImport(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs index fbd07bee..177d277a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs @@ -41,7 +41,6 @@ public static partial class NamespaceTextualNotationBuilder /// The that contains the entire textual notation public static void BuildRootNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) { - // non Terminal : PackageBodyElement; Found rule PackageBodyElement:Package=ownedRelationship+=PackageMember|ownedRelationship+=ElementFilterMember|ownedRelationship+=AliasMember|ownedRelationship+=Import throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } @@ -55,7 +54,6 @@ public static void BuildRootNamespace(SysML2.NET.Core.POCO.Root.Namespaces.IName public static void BuildNamespaceDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) { stringBuilder.Append("namespace "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); } @@ -90,13 +88,13 @@ public static void BuildNamespaceBodyElement(SysML2.NET.Core.POCO.Root.Namespace /// The that contains the entire textual notation public static void BuildNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // non Terminal : NamespaceDeclaration; Found rule NamespaceDeclaration:Namespace='namespace'Identification BuildNamespaceDeclaration(poco, stringBuilder); - // non Terminal : NamespaceBody; Found rule NamespaceBody:Namespace=';'|'{'NamespaceBodyElement*'}' BuildNamespaceBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs index a528eb54..48344b16 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class ObjectiveMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildObjectiveMember(SysML2.NET.Core.POCO.Systems.Cases.IObjectiveMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("objective "); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs index 76e5dd02..f8fecfe6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs @@ -41,15 +41,14 @@ public static partial class OccurrenceDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) { - // non Terminal : BasicDefinitionPrefix; Found rule BasicDefinitionPrefix=isAbstract?='abstract'|isVariation?='variation' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.IsIndividual && poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append("individual"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, stringBuilder); } @@ -62,17 +61,12 @@ public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems. /// The that contains the entire textual notation public static void BuildIndividualDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) { - // non Terminal : BasicDefinitionPrefix; Found rule BasicDefinitionPrefix=isAbstract?='abstract'|isVariation?='variation' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : DefinitionExtensionKeyword; Found rule DefinitionExtensionKeyword:Definition=ownedRelationship+=PrefixMetadataMember + stringBuilder.Append("individual"); DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, stringBuilder); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -84,11 +78,9 @@ public static void BuildIndividualDefinition(SysML2.NET.Core.POCO.Systems.Occurr /// The that contains the entire textual notation public static void BuildOccurrenceDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("occurrence "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs index b6256367..0d33beb0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs @@ -41,18 +41,20 @@ public static partial class OccurrenceUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOccurrenceUsagePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { - // non Terminal : BasicUsagePrefix; Found rule BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); - // Group Element - // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsIndividual) + { + stringBuilder.Append("individual"); + stringBuilder.Append(' '); + } + + if (poco.PortionKind.HasValue) + { + stringBuilder.Append(poco.PortionKind.ToString().ToLower()); + // Assignment Element : isPortion = true + stringBuilder.Append(' '); + } - // Group Element - // Assignment Element : portionKind = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property portionKind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : isPortion = true - - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); } @@ -65,13 +67,9 @@ public static void BuildOccurrenceUsagePrefix(SysML2.NET.Core.POCO.Systems.Occur /// The that contains the entire textual notation public static void BuildIndividualUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { - // non Terminal : BasicUsagePrefix; Found rule BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); - // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + stringBuilder.Append("individual"); UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } @@ -84,17 +82,15 @@ public static void BuildIndividualUsage(SysML2.NET.Core.POCO.Systems.Occurrences /// The that contains the entire textual notation public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { - // non Terminal : BasicUsagePrefix; Found rule BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); - // Group Element - // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsIndividual) + { + stringBuilder.Append("individual"); + stringBuilder.Append(' '); + } - // Assignment Element : portionKind = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property portionKind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember + stringBuilder.Append(poco.PortionKind.ToString().ToLower()); UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); // Assignment Element : isPortion = true @@ -108,18 +104,20 @@ public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IO /// The that contains the entire textual notation public static void BuildControlNodePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { - // non Terminal : RefPrefix; Found rule RefPrefix:Usage=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract'|isVariation?='variation')?(isConstant?='constant')? UsageTextualNotationBuilder.BuildRefPrefix(poco, stringBuilder); - // Group Element - // Assignment Element : isIndividual ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isIndividual value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - - // Group Element - // Assignment Element : portionKind = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property portionKind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : isPortion = true + if (poco.IsIndividual) + { + stringBuilder.Append("individual"); + stringBuilder.Append(' '); + } + + if (poco.PortionKind.HasValue) + { + stringBuilder.Append(poco.PortionKind.ToString().ToLower()); + // Assignment Element : isPortion = true + stringBuilder.Append(' '); + } - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); } @@ -132,10 +130,8 @@ public static void BuildControlNodePrefix(SysML2.NET.Core.POCO.Systems.Occurrenc /// The that contains the entire textual notation public static void BuildOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("occurrence "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs index d4d0d3f7..a43d6cee 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs @@ -41,18 +41,13 @@ public static partial class OperatorExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("? "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Operator); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("?"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("else "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -64,14 +59,10 @@ public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expres /// The that contains the entire textual notation public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(poco.Operator); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -83,14 +74,10 @@ public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO /// The that contains the entire textual notation public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(poco.Operator); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -102,12 +89,9 @@ public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Exp /// The that contains the entire textual notation public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Operator); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -119,14 +103,15 @@ public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expr /// The that contains the entire textual notation public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -138,12 +123,10 @@ public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Exp /// The that contains the entire textual notation public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -155,10 +138,8 @@ public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel /// The that contains the entire textual notation public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Operator); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -170,13 +151,10 @@ public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions /// The that contains the entire textual notation public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("] "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(poco.Operator); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("]"); } @@ -188,12 +166,9 @@ public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expression /// The that contains the entire textual notation public static void BuildSequenceOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : operator = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property operator value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(poco.Operator); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs index 4a4ad2e4..057b3c9f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class OwningMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,10 +53,9 @@ public static void BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IO /// The that contains the entire textual notation public static void BuildPackageMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); } @@ -69,10 +67,8 @@ public static void BuildPackageMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwni /// The that contains the entire textual notation public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -84,8 +80,7 @@ public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IO /// The that contains the entire textual notation public static void BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -97,8 +92,7 @@ public static void BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namesp /// The that contains the entire textual notation public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -110,8 +104,7 @@ public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.I /// The that contains the entire textual notation public static void BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.GroupElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.GroupElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -123,8 +116,7 @@ public static void BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.N /// The that contains the entire textual notation public static void BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -136,8 +128,7 @@ public static void BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namesp /// The that contains the entire textual notation public static void BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -149,8 +140,7 @@ public static void BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root /// The that contains the entire textual notation public static void BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -162,8 +152,7 @@ public static void BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.N /// The that contains the entire textual notation public static void BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -175,8 +164,7 @@ public static void BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namesp /// The that contains the entire textual notation public static void BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -188,9 +176,8 @@ public static void BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Nam /// The that contains the entire textual notation public static void BuildPrefixMetadataMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - stringBuilder.Append("# "); - // Assignment Element : ownedRelatedElement = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("#"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -213,10 +200,8 @@ public static void BuildNamespaceMember(SysML2.NET.Core.POCO.Root.Namespaces.IOw /// The that contains the entire textual notation public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -228,10 +213,8 @@ public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IO /// The that contains the entire textual notation public static void BuildNamespaceFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -254,11 +237,9 @@ public static void BuildFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwni /// The that contains the entire textual notation public static void BuildTypeFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("member "); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs index 355a2a4f..408b7a1a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs @@ -42,7 +42,6 @@ public static partial class PackageTextualNotationBuilder public static void BuildPackageDeclaration(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) { stringBuilder.Append("package "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); } @@ -77,12 +76,10 @@ public static void BuildPackageBodyElement(SysML2.NET.Core.POCO.Kernel.Packages. /// The that contains the entire textual notation public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); } @@ -94,13 +91,13 @@ public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPack /// The that contains the entire textual notation public static void BuildPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // non Terminal : PackageDeclaration; Found rule PackageDeclaration:Package='package'Identification BuildPackageDeclaration(poco, stringBuilder); - // non Terminal : PackageBody; Found rule PackageBody:Package=';'|'{'PackageBodyElement*'}' BuildPackageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs index b015f440..c2cf33c4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class ParameterMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,8 +53,7 @@ public static void BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors /// The that contains the entire textual notation public static void BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -67,8 +65,7 @@ public static void BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behav /// The that contains the entire textual notation public static void BuildArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -80,8 +77,7 @@ public static void BuildArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IPa /// The that contains the entire textual notation public static void BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -93,8 +89,7 @@ public static void BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Beh /// The that contains the entire textual notation public static void BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -106,8 +101,7 @@ public static void BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behavior /// The that contains the entire textual notation public static void BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -119,8 +113,7 @@ public static void BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behavio /// The that contains the entire textual notation public static void BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -132,8 +125,7 @@ public static void BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behav /// The that contains the entire textual notation public static void BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -145,8 +137,7 @@ public static void BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Be /// The that contains the entire textual notation public static void BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -158,8 +149,7 @@ public static void BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Be /// The that contains the entire textual notation public static void BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -171,8 +161,7 @@ public static void BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behavi /// The that contains the entire textual notation public static void BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -184,8 +173,7 @@ public static void BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behav /// The that contains the entire textual notation public static void BuildTypeReferenceMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberFeature = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -197,8 +185,7 @@ public static void BuildTypeReferenceMember(SysML2.NET.Core.POCO.Kernel.Behavior /// The that contains the entire textual notation public static void BuildPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -210,8 +197,7 @@ public static void BuildPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behavi /// The that contains the entire textual notation public static void BuildNonFeatureChainPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -223,8 +209,7 @@ public static void BuildNonFeatureChainPrimaryArgumentMember(SysML2.NET.Core.POC /// The that contains the entire textual notation public static void BuildBodyArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -236,8 +221,7 @@ public static void BuildBodyArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors /// The that contains the entire textual notation public static void BuildFunctionReferenceArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedMemberParameter = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedMemberParameter value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs index 2472661b..67f9a91e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class PartDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPartDefinition(SysML2.NET.Core.POCO.Systems.Parts.IPartDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("part "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs index b09bd8dc..7a07d73c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs @@ -42,9 +42,7 @@ public static partial class PartUsageTextualNotationBuilder public static void BuildActorUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, StringBuilder stringBuilder) { stringBuilder.Append("actor "); - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } @@ -58,9 +56,7 @@ public static void BuildActorUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage public static void BuildStakeholderUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, StringBuilder stringBuilder) { stringBuilder.Append("stakeholder "); - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } @@ -73,10 +69,8 @@ public static void BuildStakeholderUsage(SysML2.NET.Core.POCO.Systems.Parts.IPar /// The that contains the entire textual notation public static void BuildPartUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("part "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs index 3192759d..35f89455 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs @@ -41,7 +41,6 @@ public static partial class PayloadFeatureTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFlowPayloadFeature(SysML2.NET.Core.POCO.Kernel.Interactions.IPayloadFeature poco, StringBuilder stringBuilder) { - // non Terminal : PayloadFeature; Found rule PayloadFeature:Feature=Identification?PayloadFeatureSpecializationPartValuePart?|ownedRelationship+=OwnedFeatureTyping(ownedRelationship+=OwnedMultiplicity)?|ownedRelationship+=OwnedMultiplicityownedRelationship+=OwnedFeatureTyping FeatureTextualNotationBuilder.BuildPayloadFeature(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs index 546dece4..5364c23e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs @@ -41,9 +41,8 @@ public static partial class PerformActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPerformActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) { - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + stringBuilder.Append(' '); FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); } @@ -56,9 +55,7 @@ public static void BuildPerformActionUsageDeclaration(SysML2.NET.Core.POCO.Syste /// The that contains the entire textual notation public static void BuildStatePerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : PerformActionUsageDeclaration; Found rule PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? BuildPerformActionUsageDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -71,13 +68,7 @@ public static void BuildStatePerformActionUsage(SysML2.NET.Core.POCO.Systems.Act /// The that contains the entire textual notation public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : PerformActionUsageDeclaration; Found rule PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? BuildPerformActionUsageDeclaration(poco, stringBuilder); - // Group Element - stringBuilder.Append("{ "); - // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember - TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); - stringBuilder.Append("} "); } @@ -90,12 +81,9 @@ public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.System /// The that contains the entire textual notation public static void BuildPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("perform "); - // non Terminal : PerformActionUsageDeclaration; Found rule PerformActionUsageDeclaration:PerformActionUsage=(ownedRelationship+=OwnedReferenceSubsettingFeatureSpecializationPart?|'action'UsageDeclaration)ValuePart? BuildPerformActionUsageDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs index 17fd78ab..e5358fe6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs @@ -41,14 +41,11 @@ public static partial class PortDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IPortDefinition poco, StringBuilder stringBuilder) { - // non Terminal : DefinitionPrefix; Found rule DefinitionPrefix:Definition=BasicDefinitionPrefix?DefinitionExtensionKeyword* DefinitionTextualNotationBuilder.BuildDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("port "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); // Assignment Element : conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition = this } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs index 07e78c98..6aee48d8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs @@ -41,9 +41,7 @@ public static partial class PortUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildDefaultInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) { - // Assignment Element : isEnd ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isEnd value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion + stringBuilder.Append("end"); UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } @@ -56,18 +54,20 @@ public static void BuildDefaultInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.I /// The that contains the entire textual notation public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // Group Element - // Assignment Element : declaredName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property declaredName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : REFERENCES; Found rule REFERENCES='::>'|'references' - throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + if (!string.IsNullOrWhiteSpace(poco.DeclaredName)) + { + stringBuilder.Append(poco.DeclaredName); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + } - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -79,10 +79,8 @@ public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsa /// The that contains the entire textual notation public static void BuildPortUsage(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("port "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs index 6a7769ba..32ebf78c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class PredicateTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPredicate(SysML2.NET.Core.POCO.Kernel.Functions.IPredicate poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("predicate "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : FunctionBody; Found rule FunctionBody:Type=';'|'{'FunctionBodyPart'}' TypeTextualNotationBuilder.BuildFunctionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs index 85da06d8..c01e3ec4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs @@ -52,8 +52,7 @@ public static void BuildOwnedRedefinition(SysML2.NET.Core.POCO.Core.Features.IRe /// The that contains the entire textual notation public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { - // Assignment Element : redefinedFeature = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property redefinedFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -65,8 +64,7 @@ public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Featur /// The that contains the entire textual notation public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { - // Assignment Element : redefinedFeature = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property redefinedFeature value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -78,19 +76,11 @@ public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features /// The that contains the entire textual notation public static void BuildRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("specialization "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); stringBuilder.Append("redefinition "); - // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} SpecializationTextualNotationBuilder.BuildSpecificType(poco, stringBuilder); - // non Terminal : REDEFINES; Found rule REDEFINES=':>>'|'redefines' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} SpecializationTextualNotationBuilder.BuildGeneralType(poco, stringBuilder); - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs index 14e9f6ad..0f8cd2fd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs @@ -41,9 +41,7 @@ public static partial class ReferenceUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedCrossFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // non Terminal : BasicUsagePrefix; Found rule BasicUsagePrefix:Usage=RefPrefix(isReference?='ref')? UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); } @@ -56,9 +54,7 @@ public static void BuildOwnedCrossFeature(SysML2.NET.Core.POCO.Systems.Definitio /// The that contains the entire textual notation public static void BuildDefaultReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // non Terminal : RefPrefix; Found rule RefPrefix:Usage=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract'|isVariation?='variation')?(isConstant?='constant')? UsageTextualNotationBuilder.BuildRefPrefix(poco, stringBuilder); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } @@ -71,11 +67,8 @@ public static void BuildDefaultReferenceUsage(SysML2.NET.Core.POCO.Systems.Defin /// The that contains the entire textual notation public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : FeatureSpecialization; Found rule FeatureSpecialization:Feature=Typings|Subsettings|References|Crosses|Redefinitions + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); FeatureTextualNotationBuilder.BuildFeatureSpecialization(poco, stringBuilder); - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } @@ -88,9 +81,11 @@ public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.Definition /// The that contains the entire textual notation public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -103,18 +98,20 @@ public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsag /// The that contains the entire textual notation public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - - // Group Element - // Assignment Element : declaredName = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property declaredName value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : REFERENCES; Found rule REFERENCES='::>'|'references' - throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } + + if (!string.IsNullOrWhiteSpace(poco.DeclaredName)) + { + stringBuilder.Append(poco.DeclaredName); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + } - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -126,8 +123,7 @@ public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// The that contains the entire textual notation public static void BuildFlowFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -150,8 +146,7 @@ public static void BuildPayloadParameter(SysML2.NET.Core.POCO.Systems.Definition /// The that contains the entire textual notation public static void BuildNodeParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -174,10 +169,12 @@ public static void BuildEmptyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsa /// The that contains the entire textual notation public static void BuildAssignmentTargetParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append(". "); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append("."); + stringBuilder.Append(' '); + } } @@ -190,7 +187,6 @@ public static void BuildAssignmentTargetParameter(SysML2.NET.Core.POCO.Systems.D /// The that contains the entire textual notation public static void BuildForVariableDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); } @@ -215,9 +211,7 @@ public static void BuildEmptyFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndU public static void BuildSubjectUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { stringBuilder.Append("subject "); - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } @@ -230,8 +224,7 @@ public static void BuildSubjectUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// The that contains the entire textual notation public static void BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -244,15 +237,10 @@ public static void BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.Defin public static void BuildMetadataBodyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { stringBuilder.Append("ref "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : FeatureSpecializationPart; Found rule FeatureSpecializationPart:Feature=FeatureSpecialization+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization* + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : MetadataBody; Found rule MetadataBody:Type=';'|'{'(ownedRelationship+=DefinitionMember|ownedRelationship+=MetadataBodyUsageMember|ownedRelationship+=AliasMember|ownedRelationship+=Import)*'}' TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); } @@ -265,10 +253,9 @@ public static void BuildMetadataBodyUsage(SysML2.NET.Core.POCO.Systems.Definitio /// The that contains the entire textual notation public static void BuildReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); stringBuilder.Append("ref "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs index 327438b7..acbf42cc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class RenderingDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildRenderingDefinition(SysML2.NET.Core.POCO.Systems.Views.IRenderingDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("rendering "); stringBuilder.Append("def "); - // non Terminal : Definition; Found rule Definition=DefinitionDeclarationDefinitionBody DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs index 07f3ad6a..223a99cc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs @@ -52,10 +52,8 @@ public static void BuildViewRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IR /// The that contains the entire textual notation public static void BuildRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("rendering "); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs index 26a4e00a..b9ace0d9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class RequirementConstraintMembershipTextualNotationBuilde /// The that contains the entire textual notation public static void BuildRequirementConstraintMember(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // non Terminal : RequirementKind; Found rule RequirementKind:RequirementConstraintMembership='assume'{kind='assumption'}|'require'{kind='requirement'} BuildRequirementKind(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs index 9cabc030..671fb56c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class RequirementDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildRequirementDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("requirement "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs index eac6fee0..1bfb9bea 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs @@ -41,11 +41,8 @@ public static partial class RequirementUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildObjectiveRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); } @@ -69,12 +66,9 @@ public static void BuildRequirementVerificationUsage(SysML2.NET.Core.POCO.System /// The that contains the entire textual notation public static void BuildRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("requirement "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs index eff80fd3..24d2edce 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs @@ -41,12 +41,10 @@ public static partial class RequirementVerificationMembershipTextualNotationBuil /// The that contains the entire textual notation public static void BuildRequirementVerificationMember(SysML2.NET.Core.POCO.Systems.VerificationCases.IRequirementVerificationMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("verify "); // Assignment Element : kind = 'requirement' - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs index f8f176bb..bd741750 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs @@ -41,10 +41,8 @@ public static partial class ResultExpressionMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildResultExpressionMember(SysML2.NET.Core.POCO.Kernel.Functions.IResultExpressionMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs index 7000f70f..fc6051a9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class ReturnParameterMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("return "); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -57,11 +55,9 @@ public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functi /// The that contains the entire textual notation public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("return "); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -73,8 +69,7 @@ public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Function /// The that contains the entire textual notation public static void BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -86,8 +81,7 @@ public static void BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions. /// The that contains the entire textual notation public static void BuildConstructorResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs index d8a0820d..b7f95900 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs @@ -41,24 +41,22 @@ public static partial class SatisfyRequirementUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSatisfyRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.ISatisfyRequirementUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("assert "); - // Group Element - // Assignment Element : isNegated ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isNegated value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + stringBuilder.Append("not"); + stringBuilder.Append(' '); stringBuilder.Append("satisfy "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue + stringBuilder.Append(' '); FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // Group Element - stringBuilder.Append("by "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append("by "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs index a5070298..1195b653 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class SelectExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSelectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ISelectExpression poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append(".? "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs index 1c64068f..c4829fc6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs @@ -41,14 +41,10 @@ public static partial class SendActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSendNode(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); - // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); stringBuilder.Append("send "); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -61,12 +57,9 @@ public static void BuildSendNode(SysML2.NET.Core.POCO.Systems.Actions.ISendActio /// The that contains the entire textual notation public static void BuildSendNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); stringBuilder.Append("send "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : SenderReceiverPart; Found rule SenderReceiverPart:SendActionUsage='via'ownedRelationship+=NodeParameterMember('to'ownedRelationship+=NodeParameterMember)?|ownedRelationship+=EmptyParameterMember'to'ownedRelationship+=NodeParameterMember + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); BuildSenderReceiverPart(poco, stringBuilder); } @@ -90,9 +83,7 @@ public static void BuildSenderReceiverPart(SysML2.NET.Core.POCO.Systems.Actions. /// The that contains the entire textual notation public static void BuildStateSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : SendNodeDeclaration; Found rule SendNodeDeclaration:SendActionUsage=ActionNodeUsageDeclaration?'send'ownedRelationship+=NodeParameterMemberSenderReceiverPart? BuildSendNodeDeclaration(poco, stringBuilder); - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -105,13 +96,7 @@ public static void BuildStateSendActionUsage(SysML2.NET.Core.POCO.Systems.Action /// The that contains the entire textual notation public static void BuildTransitionSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : SendNodeDeclaration; Found rule SendNodeDeclaration:SendActionUsage=ActionNodeUsageDeclaration?'send'ownedRelationship+=NodeParameterMemberSenderReceiverPart? BuildSendNodeDeclaration(poco, stringBuilder); - // Group Element - stringBuilder.Append("{ "); - // non Terminal : ActionBodyItem; Found rule ActionBodyItem:Type=NonBehaviorBodyItem|ownedRelationship+=InitialNodeMember(ownedRelationship+=ActionTargetSuccessionMember)*|(ownedRelationship+=SourceSuccessionMember)?ownedRelationship+=ActionBehaviorMember(ownedRelationship+=ActionTargetSuccessionMember)*|ownedRelationship+=GuardedSuccessionMember - TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); - stringBuilder.Append("} "); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs index 37383b30..971380f3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs @@ -41,7 +41,6 @@ public static partial class SpecializationTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, StringBuilder stringBuilder) { - // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} BuildGeneralType(poco, stringBuilder); } @@ -76,19 +75,11 @@ public static void BuildGeneralType(SysML2.NET.Core.POCO.Core.Types.ISpecializat /// The that contains the entire textual notation public static void BuildSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("specialization "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); stringBuilder.Append("subtype "); - // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} BuildSpecificType(poco, stringBuilder); - // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} BuildGeneralType(poco, stringBuilder); - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs index 22568394..56414522 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs @@ -41,10 +41,8 @@ public static partial class StakeholderMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildStakeholderMember(SysML2.NET.Core.POCO.Systems.Requirements.IStakeholderMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs index 8aefc1e5..e499d380 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs @@ -52,13 +52,10 @@ public static void BuildStateDefBody(SysML2.NET.Core.POCO.Systems.States.IStateD /// The that contains the entire textual notation public static void BuildStateDefinition(SysML2.NET.Core.POCO.Systems.States.IStateDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("state "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : StateDefBody; Found rule StateDefBody:StateDefinition=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' BuildStateDefBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs index 3bf417c2..f715fe7f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class StateSubactionMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : kind = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property kind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Kind.ToString().ToLower()); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -58,12 +55,9 @@ public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IS /// The that contains the entire textual notation public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : kind = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property kind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Kind.ToString().ToLower()); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -75,12 +69,9 @@ public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStat /// The that contains the entire textual notation public static void BuildExitActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : kind = SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property kind value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Kind.ToString().ToLower()); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs index 4d2c2ef6..0db5fdab 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs @@ -52,12 +52,9 @@ public static void BuildStateUsageBody(SysML2.NET.Core.POCO.Systems.States.IStat /// The that contains the entire textual notation public static void BuildStateUsage(SysML2.NET.Core.POCO.Systems.States.IStateUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("state "); - // non Terminal : ActionUsageDeclaration; Found rule ActionUsageDeclaration:ActionUsage=UsageDeclarationValuePart? ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); - // non Terminal : StateUsageBody; Found rule StateUsageBody:StateUsage=';'|(isParallel?='parallel')?'{'StateBodyItem*'}' BuildStateUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs index f5a9d724..08d12ffd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs @@ -41,20 +41,18 @@ public static partial class StepTextualNotationBuilder /// The that contains the entire textual notation public static void BuildStep(SysML2.NET.Core.POCO.Kernel.Behaviors.IStep poco, StringBuilder stringBuilder) { - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("step "); - // non Terminal : FeatureDeclaration; Found rule FeatureDeclaration:Feature=(isSufficient?='all')?(FeatureIdentification(FeatureSpecializationPart|ConjugationPart)?|FeatureSpecializationPart|ConjugationPart)FeatureRelationshipPart* FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs index b7e1ed7a..20cb543c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class StructureTextualNotationBuilder /// The that contains the entire textual notation public static void BuildStructure(SysML2.NET.Core.POCO.Kernel.Structures.IStructure poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* TypeTextualNotationBuilder.BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("struct "); - // non Terminal : ClassifierDeclaration; Found rule ClassifierDeclaration:Classifier=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SuperclassingPart|ConjugationPart)?TypeRelationshipPart* ClassifierTextualNotationBuilder.BuildClassifierDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs index e2546bed..5b3cacf9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class SubclassificationTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, StringBuilder stringBuilder) { - // Assignment Element : superClassifier = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property superclassifier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -54,19 +53,11 @@ public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classif /// The that contains the entire textual notation public static void BuildSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("specialization "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); stringBuilder.Append("subclassifier "); - // Assignment Element : subclassifier = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property subclassifier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : superclassifier = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property superclassifier value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs index 405b3537..3ad8096a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs @@ -41,10 +41,8 @@ public static partial class SubjectMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -56,8 +54,7 @@ public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements. /// The that contains the entire textual notation public static void BuildSatisfactionSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs index 3c1d4674..0eab1d88 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs @@ -52,19 +52,11 @@ public static void BuildOwnedSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubs /// The that contains the entire textual notation public static void BuildSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("specialization "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); stringBuilder.Append("subset "); - // non Terminal : SpecificType; Found rule SpecificType:Specialization=specific=[QualifiedName]|specific+=OwnedFeatureChain{ownedRelatedElement+=specific} SpecializationTextualNotationBuilder.BuildSpecificType(poco, stringBuilder); - // non Terminal : SUBSETS; Found rule SUBSETS=':>'|'subsets' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : GeneralType; Found rule GeneralType:Specialization=general=[QualifiedName]|general+=OwnedFeatureChain{ownedRelatedElement+=general} SpecializationTextualNotationBuilder.BuildGeneralType(poco, stringBuilder); - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs index 8761e5f7..20e813c3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class SuccessionAsUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -54,11 +53,9 @@ public static void BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connection /// The that contains the entire textual notation public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("then "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -70,20 +67,12 @@ public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connection /// The that contains the entire textual notation public static void BuildSuccessionAsUsage(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsagePrefix; Found rule UsagePrefix:Usage=UnextendedUsagePrefixUsageExtensionKeyword* UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); - // Group Element - stringBuilder.Append("succession "); - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); stringBuilder.Append("first "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("then "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs index cd9efa5f..4765066e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs @@ -41,19 +41,18 @@ public static partial class SuccessionFlowTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSuccessionFlow(SysML2.NET.Core.POCO.Kernel.Interactions.ISuccessionFlow poco, StringBuilder stringBuilder) { - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("succession "); stringBuilder.Append("flow "); - // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs index ab339d4e..5cf15568 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class SuccessionFlowUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSuccessionFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.ISuccessionFlowUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("succession "); stringBuilder.Append("flow "); - // non Terminal : FlowDeclaration; Found rule FlowDeclaration:FlowUsage=UsageDeclarationValuePart?('of'ownedRelationship+=FlowPayloadFeatureMember)?('from'ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember)?|ownedRelationship+=FlowEndMember'to'ownedRelationship+=FlowEndMember FlowUsageTextualNotationBuilder.BuildFlowDeclaration(poco, stringBuilder); - // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs index eea58269..da9276a0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs @@ -41,10 +41,8 @@ public static partial class SuccessionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildTransitionSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -67,18 +65,17 @@ public static void BuildSuccessionDeclaration(SysML2.NET.Core.POCO.Kernel.Connec /// The that contains the entire textual notation public static void BuildSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) { - // non Terminal : FeaturePrefix; Found rule FeaturePrefix=(EndFeaturePrefix(ownedRelationship+=OwnedCrossFeatureMember)?|BasicFeaturePrefix)(ownedRelationship+=PrefixMetadataMember)* - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(' '); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("succession "); - // non Terminal : SuccessionDeclaration; Found rule SuccessionDeclaration:Succession=FeatureDeclaration('first'ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)?|(s.isSufficient?='all')?('first'?ownedRelationship+=ConnectorEndMember'then'ownedRelationship+=ConnectorEndMember)? BuildSuccessionDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' TypeTextualNotationBuilder.BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs index 79445b00..3592a3ac 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs @@ -41,16 +41,15 @@ public static partial class TerminateActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildTerminateNode(SysML2.NET.Core.POCO.Systems.Actions.ITerminateActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); - // non Terminal : ActionNodeUsageDeclaration; Found rule ActionNodeUsageDeclaration:ActionUsage='action'UsageDeclaration? ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); stringBuilder.Append("terminate "); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs index cfe81735..3123697d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs @@ -41,16 +41,10 @@ public static partial class TextualRepresentationTextualNotationBuilder /// The that contains the entire textual notation public static void BuildTextualRepresentation(SysML2.NET.Core.POCO.Root.Annotations.ITextualRepresentation poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("rep "); - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); stringBuilder.Append("language "); - // Assignment Element : language = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property language value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : body = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property body value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append(poco.Language); + stringBuilder.Append(poco.Body); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs index f38aff43..f9b3b079 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs @@ -43,8 +43,7 @@ public static void BuildTriggerActionMember(SysML2.NET.Core.POCO.Systems.States. { stringBuilder.Append("accept "); // Assignment Element : kind = 'trigger' - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -58,8 +57,7 @@ public static void BuildGuardExpressionMember(SysML2.NET.Core.POCO.Systems.State { stringBuilder.Append("if "); // Assignment Element : kind = 'guard' - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -73,8 +71,7 @@ public static void BuildEffectBehaviorMember(SysML2.NET.Core.POCO.Systems.States { stringBuilder.Append("do "); // Assignment Element : kind = 'effect' - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs index 9b7fd0e9..80890ab0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class TransitionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("then "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -58,8 +56,7 @@ public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.Sta public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { stringBuilder.Append("else "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -71,20 +68,12 @@ public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.Sta /// The that contains the entire textual notation public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { - // Group Element - stringBuilder.Append("succession "); - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); stringBuilder.Append("first "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); stringBuilder.Append("then "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } @@ -97,14 +86,10 @@ public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.IT /// The that contains the entire textual notation public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append("then "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -118,33 +103,30 @@ public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.State public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { stringBuilder.Append("transition "); - // Group Element - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? - UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - stringBuilder.Append("first "); - - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } + + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } + + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } stringBuilder.Append("then "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // non Terminal : ActionBody; Found rule ActionBody:Type=';'|'{'ActionBodyItem*'}' + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs index 464e8c2b..7689a67b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs @@ -41,8 +41,7 @@ public static partial class TypeFeaturingTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, StringBuilder stringBuilder) { - // Assignment Element : featuringType = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property featuringType value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -55,17 +54,10 @@ public static void BuildOwnedTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.IT public static void BuildTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, StringBuilder stringBuilder) { stringBuilder.Append("featuring "); - // Group Element - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? - ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - stringBuilder.Append("of "); - // Assignment Element : featureOfType = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property featureOfType value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); stringBuilder.Append("by "); - // Assignment Element : featuringType = SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // If property featuringType value is set, print SysML2.NET.CodeGenerator.Grammar.Model.ValueLiteralElement - // non Terminal : RelationshipBody; Found rule RelationshipBody:Relationship=';'|'{'(ownedRelationship+=OwnedAnnotation)*'}' + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs index c08f980e..9e681d7b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -129,11 +129,12 @@ public static void BuildCalculationBody(SysML2.NET.Core.POCO.Core.Types.IType po /// The that contains the entire textual notation public static void BuildCalculationBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - // non Terminal : CalculationBodyItem; Found rule CalculationBodyItem:Type=ActionBodyItem|ownedRelationship+=ReturnParameterMember BuildCalculationBodyItem(poco, stringBuilder); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -212,13 +213,17 @@ public static void BuildMetadataBody(SysML2.NET.Core.POCO.Core.Types.IType poco, /// The that contains the entire textual notation public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : isAbstract ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isAbstract value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsAbstract) + { + stringBuilder.Append("abstract"); + stringBuilder.Append(' '); + } - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -231,19 +236,21 @@ public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, S /// The that contains the entire textual notation public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : isSufficient ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isSufficient value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsSufficient) + { + stringBuilder.Append("all"); + stringBuilder.Append(' '); + } - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : TypeRelationshipPart; Found rule TypeRelationshipPart:Type=DisjoiningPart|UnioningPart|IntersectingPart|DifferencingPart + stringBuilder.Append(' '); BuildTypeRelationshipPart(poco, stringBuilder); } @@ -256,14 +263,14 @@ public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType po /// The that contains the entire textual notation public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - // non Terminal : SPECIALIZES; Found rule SPECIALIZES=':>'|'specializes' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -276,10 +283,8 @@ public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType /// The that contains the entire textual notation public static void BuildConjugationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - // non Terminal : CONJUGATES; Found rule CONJUGATES='~'|'conjugates' throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -304,12 +309,13 @@ public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poc { stringBuilder.Append("disjoint "); stringBuilder.Append("from "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -323,12 +329,13 @@ public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poc public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { stringBuilder.Append("unions "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -342,12 +349,13 @@ public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { stringBuilder.Append("intersects "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -361,12 +369,13 @@ public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType p public static void BuildDifferencingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { stringBuilder.Append("differences "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append(", "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -412,11 +421,12 @@ public static void BuildFunctionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, /// The that contains the entire textual notation public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -441,12 +451,9 @@ public static void BuildInstantiatedTypeReference(SysML2.NET.Core.POCO.Core.Type /// The that contains the entire textual notation public static void BuildType(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - // non Terminal : TypePrefix; Found rule TypePrefix:Type=(isAbstract?='abstract')?(ownedRelationship+=PrefixMetadataMember)* BuildTypePrefix(poco, stringBuilder); stringBuilder.Append("type "); - // non Terminal : TypeDeclaration; Found rule TypeDeclaration:Type=(isSufficient?='all')?Identification(ownedRelationship+=OwnedMultiplicity)?(SpecializationPart|ConjugationPart)+TypeRelationshipPart* BuildTypeDeclaration(poco, stringBuilder); - // non Terminal : TypeBody; Found rule TypeBody:Type=';'|'{'TypeBodyElement*'}' BuildTypeBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs index e0c2934a..c72a6019 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs @@ -52,19 +52,24 @@ public static void BuildUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// The that contains the entire textual notation public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // Group Element - // Assignment Element : direction = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property direction value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + if (poco.Direction.HasValue) + { + stringBuilder.Append(poco.Direction.ToString().ToLower()); + stringBuilder.Append(' '); + } + + if (poco.IsDerived) + { + stringBuilder.Append("derived"); + stringBuilder.Append(' '); + } - // Group Element - // Assignment Element : isDerived ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isDerived value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Group Element - // Assignment Element : isConstant ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isConstant value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.IsConstant) + { + stringBuilder.Append("constant"); + stringBuilder.Append(' '); + } } @@ -77,11 +82,12 @@ public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsag /// The that contains the entire textual notation public static void BuildBasicUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // non Terminal : RefPrefix; Found rule RefPrefix:Usage=(direction=FeatureDirection)?(isDerived?='derived')?(isAbstract?='abstract'|isVariation?='variation')?(isConstant?='constant')? BuildRefPrefix(poco, stringBuilder); - // Group Element - // Assignment Element : isReference ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isReference value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement + if (poco.isReference) + { + stringBuilder.Append("ref"); + stringBuilder.Append(' '); + } } @@ -94,11 +100,12 @@ public static void BuildBasicUsagePrefix(SysML2.NET.Core.POCO.Systems.Definition /// The that contains the entire textual notation public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // Assignment Element : isEnd ?= SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // If property isEnd value is set, print SysML2.NET.CodeGenerator.Grammar.Model.TerminalElement - // Group Element - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + stringBuilder.Append("end"); + if (poco.OwnedRelationship.Count != 0) + { + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(' '); + } } @@ -111,8 +118,7 @@ public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAn /// The that contains the entire textual notation public static void BuildUsageExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } @@ -135,9 +141,7 @@ public static void BuildUnextendedUsagePrefix(SysML2.NET.Core.POCO.Systems.Defin /// The that contains the entire textual notation public static void BuildUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // non Terminal : UnextendedUsagePrefix; Found rule UnextendedUsagePrefix:Usage=EndUsagePrefix|BasicUsagePrefix BuildUnextendedUsagePrefix(poco, stringBuilder); - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember BuildUsageExtensionKeyword(poco, stringBuilder); } @@ -150,9 +154,7 @@ public static void BuildUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUs /// The that contains the entire textual notation public static void BuildUsageDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // non Terminal : Identification; Found rule Identification:Element=('<'declaredShortName=NAME'>')?(declaredName=NAME)? ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - // non Terminal : FeatureSpecializationPart; Found rule FeatureSpecializationPart:Feature=FeatureSpecialization+MultiplicityPart?FeatureSpecialization*|MultiplicityPartFeatureSpecialization* FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco, stringBuilder); } @@ -165,9 +167,7 @@ public static void BuildUsageDeclaration(SysML2.NET.Core.POCO.Systems.Definition /// The that contains the entire textual notation public static void BuildUsageCompletion(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody BuildUsageBody(poco, stringBuilder); } @@ -180,7 +180,6 @@ public static void BuildUsageCompletion(SysML2.NET.Core.POCO.Systems.DefinitionA /// The that contains the entire textual notation public static void BuildUsageBody(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // non Terminal : DefinitionBody; Found rule DefinitionBody:Type=';'|'{'DefinitionBodyItem*'}' TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); } @@ -270,9 +269,8 @@ public static void BuildInterfaceOccurrenceUsageElement(SysML2.NET.Core.POCO.Sys /// The that contains the entire textual notation public static void BuildActionTargetSuccession(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // non Terminal : UsageBody; Found rule UsageBody:Usage=DefinitionBody + stringBuilder.Append(' '); BuildUsageBody(poco, stringBuilder); } @@ -285,11 +283,8 @@ public static void BuildActionTargetSuccession(SysML2.NET.Core.POCO.Systems.Defi /// The that contains the entire textual notation public static void BuildExtendedUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // non Terminal : UnextendedUsagePrefix; Found rule UnextendedUsagePrefix:Usage=EndUsagePrefix|BasicUsagePrefix BuildUnextendedUsagePrefix(poco, stringBuilder); - // non Terminal : UsageExtensionKeyword; Found rule UsageExtensionKeyword:Usage=ownedRelationship+=PrefixMetadataMember BuildUsageExtensionKeyword(poco, stringBuilder); - // non Terminal : Usage; Found rule Usage=UsageDeclarationUsageCompletion BuildUsage(poco, stringBuilder); } @@ -302,9 +297,7 @@ public static void BuildExtendedUsage(SysML2.NET.Core.POCO.Systems.DefinitionAnd /// The that contains the entire textual notation public static void BuildUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : UsageCompletion; Found rule UsageCompletion:Usage=ValuePart?UsageBody BuildUsageCompletion(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs index 3d52ac55..200bbf75 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs @@ -41,14 +41,11 @@ public static partial class UseCaseDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildUseCaseDefinition(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("use "); stringBuilder.Append("case "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs index 9193feba..edb9dbb8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs @@ -41,17 +41,12 @@ public static partial class UseCaseUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("use "); stringBuilder.Append("case "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs index 5a5b2134..47d4575c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class VariantMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildVariantUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("variant "); - // Assignment Element : ownedVariantUsage = SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedVariantUsage value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); } @@ -57,10 +55,8 @@ public static void BuildVariantUsageMember(SysML2.NET.Core.POCO.Systems.Definiti /// The that contains the entire textual notation public static void BuildEnumerationUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs index 10873fae..5b56142f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class VerificationCaseDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildVerificationCaseDefinition(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("verification "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs index 5907aea3..00116d92 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs @@ -41,16 +41,11 @@ public static partial class VerificationCaseUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildVerificationCaseUsage(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("verification "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : CaseBody; Found rule CaseBody:Type=';'|'{'CaseBodyItem*(ownedRelationship+=ResultExpressionMember)?'}' TypeTextualNotationBuilder.BuildCaseBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs index 6255ccd5..8dcc0e5f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs @@ -63,13 +63,10 @@ public static void BuildViewDefinitionBodyItem(SysML2.NET.Core.POCO.Systems.View /// The that contains the entire textual notation public static void BuildViewDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("view "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : ViewDefinitionBody; Found rule ViewDefinitionBody:ViewDefinition=';'|'{'ViewDefinitionBodyItem*'}' BuildViewDefinitionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs index 7745ff9c..912be900 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs @@ -41,11 +41,9 @@ public static partial class ViewRenderingMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildViewRenderingMember(SysML2.NET.Core.POCO.Systems.Views.IViewRenderingMembership poco, StringBuilder stringBuilder) { - // non Terminal : MemberPrefix; Found rule MemberPrefix:Membership=(visibility=VisibilityIndicator)? MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("render "); - // Assignment Element : ownedRelatedElement += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelatedElement value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs index 5ee321f7..1269af97 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs @@ -63,14 +63,10 @@ public static void BuildViewBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewUsa /// The that contains the entire textual notation public static void BuildViewUsage(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("view "); - // non Terminal : UsageDeclaration; Found rule UsageDeclaration:Usage=IdentificationFeatureSpecializationPart? UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); - // non Terminal : ValuePart; Found rule ValuePart:Feature=ownedRelationship+=FeatureValue FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - // non Terminal : ViewBody; Found rule ViewBody:ViewUsage=';'|'{'ViewBodyItem*'}' BuildViewBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs index 892b92cd..8f9952aa 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs @@ -41,13 +41,10 @@ public static partial class ViewpointDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildViewpointDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewpointDefinition poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceDefinitionPrefix; Found rule OccurrenceDefinitionPrefix:OccurrenceDefinition=BasicDefinitionPrefix?(isIndividual?='individual'ownedRelationship+=EmptyMultiplicityMember)?DefinitionExtensionKeyword* OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("viewpoint "); stringBuilder.Append("def "); - // non Terminal : DefinitionDeclaration; Found rule DefinitionDeclaration:Definition=IdentificationSubclassificationPart? DefinitionTextualNotationBuilder.BuildDefinitionDeclaration(poco, stringBuilder); - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs index c7f56352..fb78fe85 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs @@ -41,12 +41,9 @@ public static partial class ViewpointUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildViewpointUsage(SysML2.NET.Core.POCO.Systems.Views.IViewpointUsage poco, StringBuilder stringBuilder) { - // non Terminal : OccurrenceUsagePrefix; Found rule OccurrenceUsagePrefix:OccurrenceUsage=BasicUsagePrefix(isIndividual?='individual')?(portionKind=PortionKind{isPortion=true})?UsageExtensionKeyword* OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("viewpoint "); - // non Terminal : ConstraintUsageDeclaration; Found rule ConstraintUsageDeclaration:ConstraintUsage=UsageDeclarationValuePart? ConstraintUsageTextualNotationBuilder.BuildConstraintUsageDeclaration(poco, stringBuilder); - // non Terminal : RequirementBody; Found rule RequirementBody:Type=';'|'{'RequirementBodyItem*'}' TypeTextualNotationBuilder.BuildRequirementBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs index fb835343..cccd2e57 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs @@ -41,17 +41,17 @@ public static partial class WhileLoopActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildWhileLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IWhileLoopActionUsage poco, StringBuilder stringBuilder) { - // non Terminal : ActionNodePrefix; Found rule ActionNodePrefix:ActionUsage=OccurrenceUsagePrefixActionNodeUsageDeclaration? ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); - // Group Element throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // Group Element - stringBuilder.Append("until "); - // Assignment Element : ownedRelationship += SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - // If property ownedRelationship value is set, print SysML2.NET.CodeGenerator.Grammar.Model.NonTerminalElement - stringBuilder.Append("; "); + stringBuilder.Append(' '); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (poco.OwnedRelationship.Count != 0) + { + stringBuilder.Append("until "); + throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + stringBuilder.Append(";"); + stringBuilder.Append(' '); + } } From de4ae2ff83d14544286190ade39e0ad03c12dcd5 Mon Sep 17 00:00:00 2001 From: atheate Date: Tue, 3 Mar 2026 15:49:23 +0100 Subject: [PATCH 08/15] [WIP] Most assignment case handle, including collection --- .../Extensions/PropertyExtension.cs | 2 +- .../Grammar/Model/Alternatives.cs | 11 +- .../Grammar/Model/IPartOfTextualRule.cs | 33 ++ .../Grammar/Model/RuleElement.cs | 12 +- .../TextualNotationSpecificationVisitor.cs | 43 ++- .../HandleBarHelpers/RulesHelper.cs | 355 +++++++++++++++--- ...core-textual-notation-builder-template.hbs | 1 + ...AcceptActionUsageTextualNotationBuilder.cs | 40 ++ .../ActionUsageTextualNotationBuilder.cs | 50 +++ ...gnmentActionUsageTextualNotationBuilder.cs | 40 ++ ...AcceptActionUsageTextualNotationBuilder.cs | 19 +- .../ActionDefinitionTextualNotationBuilder.cs | 1 + .../ActionUsageTextualNotationBuilder.cs | 25 +- .../ActorMembershipTextualNotationBuilder.cs | 5 +- ...ocationDefinitionTextualNotationBuilder.cs | 1 + .../AllocationUsageTextualNotationBuilder.cs | 1 + ...sisCaseDefinitionTextualNotationBuilder.cs | 1 + ...AnalysisCaseUsageTextualNotationBuilder.cs | 1 + ...AnnotatingElementTextualNotationBuilder.cs | 1 + .../AnnotationTextualNotationBuilder.cs | 5 +- ...rtConstraintUsageTextualNotationBuilder.cs | 3 + ...gnmentActionUsageTextualNotationBuilder.cs | 9 + ...ociationStructureTextualNotationBuilder.cs | 1 + .../AssociationTextualNotationBuilder.cs | 1 + ...tributeDefinitionTextualNotationBuilder.cs | 1 + .../AttributeUsageTextualNotationBuilder.cs | 1 + .../BehaviorTextualNotationBuilder.cs | 1 + ...gConnectorAsUsageTextualNotationBuilder.cs | 15 +- .../BindingConnectorTextualNotationBuilder.cs | 10 +- ...BooleanExpressionTextualNotationBuilder.cs | 10 +- ...ulationDefinitionTextualNotationBuilder.cs | 1 + .../CalculationUsageTextualNotationBuilder.cs | 1 + .../CaseDefinitionTextualNotationBuilder.cs | 1 + .../CaseUsageTextualNotationBuilder.cs | 1 + .../ClassTextualNotationBuilder.cs | 1 + .../ClassifierTextualNotationBuilder.cs | 32 +- ...CollectExpressionTextualNotationBuilder.cs | 8 +- .../CommentTextualNotationBuilder.cs | 25 ++ ...ConcernDefinitionTextualNotationBuilder.cs | 1 + .../ConcernUsageTextualNotationBuilder.cs | 1 + ...tedPortDefinitionTextualNotationBuilder.cs | 5 +- ...jugatedPortTypingTextualNotationBuilder.cs | 1 + .../ConjugationTextualNotationBuilder.cs | 8 + ...nectionDefinitionTextualNotationBuilder.cs | 1 + .../ConnectionUsageTextualNotationBuilder.cs | 23 +- .../ConnectorTextualNotationBuilder.cs | 32 +- ...straintDefinitionTextualNotationBuilder.cs | 1 + .../ConstraintUsageTextualNotationBuilder.cs | 1 + ...tructorExpressionTextualNotationBuilder.cs | 9 +- .../ControlNodeTextualNotationBuilder.cs | 1 + .../CrossSubsettingTextualNotationBuilder.cs | 1 + .../DataTypeTextualNotationBuilder.cs | 1 + .../DecisionNodeTextualNotationBuilder.cs | 1 + .../DefinitionTextualNotationBuilder.cs | 5 +- .../DependencyTextualNotationBuilder.cs | 31 +- .../DifferencingTextualNotationBuilder.cs | 1 + .../DisjoiningTextualNotationBuilder.cs | 8 + .../DocumentationTextualNotationBuilder.cs | 2 + ...tFilterMembershipTextualNotationBuilder.cs | 9 +- .../ElementTextualNotationBuilder.cs | 3 + ...FeatureMembershipTextualNotationBuilder.cs | 21 +- ...erationDefinitionTextualNotationBuilder.cs | 1 + .../EnumerationUsageTextualNotationBuilder.cs | 1 + ...ntOccurrenceUsageTextualNotationBuilder.cs | 6 +- ...ExhibitStateUsageTextualNotationBuilder.cs | 2 + .../ExposeTextualNotationBuilder.cs | 1 + .../ExpressionTextualNotationBuilder.cs | 14 +- ...reChainExpressionTextualNotationBuilder.cs | 9 +- .../FeatureChainingTextualNotationBuilder.cs | 1 + ...tureDirectionKindTextualNotationBuilder.cs | 1 + .../FeatureInvertingTextualNotationBuilder.cs | 9 + ...FeatureMembershipTextualNotationBuilder.cs | 75 +++- ...ferenceExpressionTextualNotationBuilder.cs | 25 +- .../FeatureTextualNotationBuilder.cs | 188 +++++++--- .../FeatureTypingTextualNotationBuilder.cs | 1 + .../FeatureValueTextualNotationBuilder.cs | 25 +- .../FlowDefinitionTextualNotationBuilder.cs | 1 + .../FlowEndTextualNotationBuilder.cs | 11 +- .../FlowTextualNotationBuilder.cs | 10 +- .../FlowUsageTextualNotationBuilder.cs | 1 + ...orLoopActionUsageTextualNotationBuilder.cs | 12 +- .../ForkNodeTextualNotationBuilder.cs | 1 + ...ConcernMembershipTextualNotationBuilder.cs | 5 +- .../FunctionTextualNotationBuilder.cs | 1 + .../IfActionUsageTextualNotationBuilder.cs | 13 +- .../ImportTextualNotationBuilder.cs | 2 + ...cludeUseCaseUsageTextualNotationBuilder.cs | 2 + .../IndexExpressionTextualNotationBuilder.cs | 9 +- .../InteractionTextualNotationBuilder.cs | 1 + ...terfaceDefinitionTextualNotationBuilder.cs | 1 + .../InterfaceUsageTextualNotationBuilder.cs | 23 +- .../IntersectingTextualNotationBuilder.cs | 1 + .../InvariantTextualNotationBuilder.cs | 10 +- ...ocationExpressionTextualNotationBuilder.cs | 21 +- .../ItemDefinitionTextualNotationBuilder.cs | 1 + .../ItemUsageTextualNotationBuilder.cs | 1 + .../JoinNodeTextualNotationBuilder.cs | 1 + .../LibraryPackageTextualNotationBuilder.cs | 10 +- .../LiteralBooleanTextualNotationBuilder.cs | 1 + ...LiteralExpressionTextualNotationBuilder.cs | 1 + .../LiteralInfinityTextualNotationBuilder.cs | 1 + .../LiteralIntegerTextualNotationBuilder.cs | 1 + .../LiteralStringTextualNotationBuilder.cs | 1 + .../MembershipExposeTextualNotationBuilder.cs | 1 + .../MembershipImportTextualNotationBuilder.cs | 2 + .../MembershipTextualNotationBuilder.cs | 4 + .../MergeNodeTextualNotationBuilder.cs | 1 + .../MetaclassTextualNotationBuilder.cs | 1 + ...aAccessExpressionTextualNotationBuilder.cs | 9 +- ...etadataDefinitionTextualNotationBuilder.cs | 2 + .../MetadataFeatureTextualNotationBuilder.cs | 40 +- .../MetadataUsageTextualNotationBuilder.cs | 31 +- ...MultiplicityRangeTextualNotationBuilder.cs | 19 +- .../MultiplicityTextualNotationBuilder.cs | 1 + .../NamespaceExposeTextualNotationBuilder.cs | 1 + .../NamespaceImportTextualNotationBuilder.cs | 1 + .../NamespaceTextualNotationBuilder.cs | 10 +- .../NullExpressionTextualNotationBuilder.cs | 1 + ...jectiveMembershipTextualNotationBuilder.cs | 5 +- ...urrenceDefinitionTextualNotationBuilder.cs | 11 +- .../OccurrenceUsageTextualNotationBuilder.cs | 6 + ...peratorExpressionTextualNotationBuilder.cs | 84 +++-- .../OwningMembershipTextualNotationBuilder.cs | 57 ++- .../PackageTextualNotationBuilder.cs | 21 +- ...rameterMembershipTextualNotationBuilder.cs | 41 +- .../PartDefinitionTextualNotationBuilder.cs | 1 + .../PartUsageTextualNotationBuilder.cs | 1 + .../PayloadFeatureTextualNotationBuilder.cs | 1 + ...erformActionUsageTextualNotationBuilder.cs | 10 + .../PortConjugationTextualNotationBuilder.cs | 1 + .../PortDefinitionTextualNotationBuilder.cs | 5 +- .../PortUsageTextualNotationBuilder.cs | 12 +- .../PortionKindTextualNotationBuilder.cs | 1 + .../PredicateTextualNotationBuilder.cs | 1 + .../RedefinitionTextualNotationBuilder.cs | 8 + ...ferenceSubsettingTextualNotationBuilder.cs | 1 + .../ReferenceUsageTextualNotationBuilder.cs | 44 ++- .../RelationshipTextualNotationBuilder.cs | 1 + ...nderingDefinitionTextualNotationBuilder.cs | 1 + .../RenderingUsageTextualNotationBuilder.cs | 1 + ...straintMembershipTextualNotationBuilder.cs | 5 +- ...irementDefinitionTextualNotationBuilder.cs | 1 + .../RequirementUsageTextualNotationBuilder.cs | 1 + ...icationMembershipTextualNotationBuilder.cs | 5 +- ...ressionMembershipTextualNotationBuilder.cs | 5 +- ...rameterMembershipTextualNotationBuilder.cs | 17 +- ...yRequirementUsageTextualNotationBuilder.cs | 8 +- .../SelectExpressionTextualNotationBuilder.cs | 8 +- .../SendActionUsageTextualNotationBuilder.cs | 14 +- .../SpecializationTextualNotationBuilder.cs | 8 + ...eholderMembershipTextualNotationBuilder.cs | 5 +- .../StateDefinitionTextualNotationBuilder.cs | 1 + ...bactionMembershipTextualNotationBuilder.cs | 13 +- .../StateUsageTextualNotationBuilder.cs | 1 + .../StepTextualNotationBuilder.cs | 10 +- .../StructureTextualNotationBuilder.cs | 1 + ...SubclassificationTextualNotationBuilder.cs | 8 + ...SubjectMembershipTextualNotationBuilder.cs | 9 +- .../SubsettingTextualNotationBuilder.cs | 8 + ...SuccessionAsUsageTextualNotationBuilder.cs | 26 +- .../SuccessionFlowTextualNotationBuilder.cs | 10 +- ...ccessionFlowUsageTextualNotationBuilder.cs | 1 + .../SuccessionTextualNotationBuilder.cs | 17 +- ...minateActionUsageTextualNotationBuilder.cs | 7 +- ...ualRepresentationTextualNotationBuilder.cs | 8 + ...FeatureMembershipTextualNotationBuilder.cs | 13 +- .../TransitionUsageTextualNotationBuilder.cs | 78 +++- ...ocationExpressionTextualNotationBuilder.cs | 1 + .../TypeFeaturingTextualNotationBuilder.cs | 8 + .../TypeTextualNotationBuilder.cs | 105 ++++-- .../UnioningTextualNotationBuilder.cs | 1 + .../UsageTextualNotationBuilder.cs | 15 +- ...UseCaseDefinitionTextualNotationBuilder.cs | 1 + .../UseCaseUsageTextualNotationBuilder.cs | 1 + ...VariantMembershipTextualNotationBuilder.cs | 5 +- ...ionCaseDefinitionTextualNotationBuilder.cs | 1 + ...ficationCaseUsageTextualNotationBuilder.cs | 1 + .../ViewDefinitionTextualNotationBuilder.cs | 1 + ...nderingMembershipTextualNotationBuilder.cs | 5 +- .../ViewUsageTextualNotationBuilder.cs | 1 + ...ewpointDefinitionTextualNotationBuilder.cs | 1 + .../ViewpointUsageTextualNotationBuilder.cs | 1 + .../VisibilityKindTextualNotationBuilder.cs | 1 + ...leLoopActionUsageTextualNotationBuilder.cs | 10 +- ...gConnectorAsUsageTextualNotationBuilder.cs | 40 ++ .../CommentTextualNotationBuilder.cs | 40 ++ .../ConjugationTextualNotationBuilder.cs | 40 ++ .../DependencyTextualNotationBuilder.cs | 40 ++ .../DisjoiningTextualNotationBuilder.cs | 40 ++ .../FeatureInvertingTextualNotationBuilder.cs | 40 ++ .../IfActionUsageTextualNotationBuilder.cs | 40 ++ ...ocationExpressionTextualNotationBuilder.cs | 41 ++ .../MetadataFeatureTextualNotationBuilder.cs | 40 ++ .../MetadataUsageTextualNotationBuilder.cs | 40 ++ .../PackageTextualNotationBuilder.cs | 41 ++ ...erformActionUsageTextualNotationBuilder.cs | 40 ++ .../RedefinitionTextualNotationBuilder.cs | 40 ++ .../SendActionUsageTextualNotationBuilder.cs | 40 ++ .../SpecializationTextualNotationBuilder.cs | 40 ++ ...SubclassificationTextualNotationBuilder.cs | 40 ++ .../SubsettingTextualNotationBuilder.cs | 40 ++ ...SuccessionAsUsageTextualNotationBuilder.cs | 40 ++ ...ualRepresentationTextualNotationBuilder.cs | 40 ++ .../TransitionUsageTextualNotationBuilder.cs | 50 +++ .../TypeFeaturingTextualNotationBuilder.cs | 40 ++ 205 files changed, 2698 insertions(+), 477 deletions(-) create mode 100644 SysML2.NET.CodeGenerator/Grammar/Model/IPartOfTextualRule.cs create mode 100644 SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/IfActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/InvocationExpressionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/PackageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs create mode 100644 SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs diff --git a/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs b/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs index b8c13754..c56b1937 100644 --- a/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs +++ b/SysML2.NET.CodeGenerator/Extensions/PropertyExtension.cs @@ -105,7 +105,7 @@ public static string QueryIfStatementContentForNonEmpty(this IProperty property, if (property.QueryIsEnumerable()) { - return $"{variableName}.{propertyName}.Count != 0"; + return $"{variableName}.MoveNext()"; } if (property.QueryIsReferenceProperty()) diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs b/SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs index 7ea1b61d..ff3ba663 100644 --- a/SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs +++ b/SysML2.NET.CodeGenerator/Grammar/Model/Alternatives.cs @@ -18,20 +18,23 @@ // // ------------------------------------------------------------------------------------------------ -namespace SysML2.NET.CodeGenerator.Grammar +namespace SysML2.NET.CodeGenerator.Grammar.Model { using System.Collections.Generic; - using SysML2.NET.CodeGenerator.Grammar.Model; - /// /// Provides mapping data class for the alternative grammar part /// - public class Alternatives + public class Alternatives: IPartOfTextualRule { /// /// Gets a collection of that is part of the /// public List Elements { get; } = []; + + /// + /// Gets the + /// + public TextualNotationRule TextualNotationRule { get; init; } } } diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/IPartOfTextualRule.cs b/SysML2.NET.CodeGenerator/Grammar/Model/IPartOfTextualRule.cs new file mode 100644 index 00000000..c47436d8 --- /dev/null +++ b/SysML2.NET.CodeGenerator/Grammar/Model/IPartOfTextualRule.cs @@ -0,0 +1,33 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.CodeGenerator.Grammar.Model +{ + /// + /// Asserts that the current element is part of + /// + public interface IPartOfTextualRule + { + /// + /// Gets the + /// + TextualNotationRule TextualNotationRule { get; } + } +} diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs index c7858dfb..dc937d23 100644 --- a/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs +++ b/SysML2.NET.CodeGenerator/Grammar/Model/RuleElement.cs @@ -25,7 +25,7 @@ namespace SysML2.NET.CodeGenerator.Grammar.Model /// /// Base class that provides information about element that is part of a rule /// - public abstract class RuleElement + public abstract class RuleElement: IPartOfTextualRule { /// /// Defines all suffix that defines optional elements @@ -51,5 +51,15 @@ public abstract class RuleElement /// Asserts that the current rule element defines an collection element /// public bool IsCollection => !string.IsNullOrEmpty(this.Suffix) && CollectionSuffix.Contains(this.Suffix); + + /// + /// Gets or sets an optional that acts as container + /// + public RuleElement Container { get; set; } + + /// + /// Gets the + /// + public TextualNotationRule TextualNotationRule { get; init; } } } diff --git a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs index aeeeb1b8..2a17f4dd 100644 --- a/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs +++ b/SysML2.NET.CodeGenerator/Grammar/TextualNotationSpecificationVisitor.cs @@ -56,6 +56,8 @@ public override object VisitRule_definition(kebnfParser.Rule_definitionContext c TargetElementName = context.target_ast?.Text, RawRule = context.GetText().Trim() }; + + this.CurrentRule = rule; if (string.IsNullOrWhiteSpace(rule.RuleName)) { @@ -74,7 +76,12 @@ public override object VisitRule_definition(kebnfParser.Rule_definitionContext c rule.Alternatives.AddRange((IEnumerable)this.Visit(context.rule_body)); return rule; } - + + /// + /// Gets or sets the current that is processed + /// + public TextualNotationRule CurrentRule { get; set; } + /// /// Visit a parse tree produced by . /// @@ -92,7 +99,11 @@ public override object VisitAlternatives(kebnfParser.AlternativesContext context /// The visitor result, as an . public override object VisitAlternative(kebnfParser.AlternativeContext context) { - var alternatives = new Alternatives(); + var alternatives = new Alternatives() + { + TextualNotationRule = this.CurrentRule + }; + alternatives.Elements.AddRange(context.element().Select(e => (RuleElement)this.Visit(e)).Where(x => x != null)); return alternatives; } @@ -104,14 +115,18 @@ public override object VisitAlternative(kebnfParser.AlternativeContext context) /// The visitor result, as . public override object VisitAssignment(kebnfParser.AssignmentContext context) { - return new AssignmentElement() + var assignement = new AssignmentElement() { Property = context.property.GetText().Split(".")[^1], Operator = context.op.Text, Suffix = context.suffix?.GetText(), Value = (RuleElement)this.Visit(context.content), - Prefix = context.prefix?.Text + Prefix = context.prefix?.Text, + TextualNotationRule = this.CurrentRule }; + + assignement.Value.Container = assignement; + return assignement; } /// @@ -125,7 +140,8 @@ public override object VisitNon_parsing_assignment(kebnfParser.Non_parsing_assig { PropertyName = context.property.GetText(), Operator = context.op.Text, - Value = context.val.GetText() + Value = context.val.GetText(), + TextualNotationRule = this.CurrentRule }; } @@ -138,7 +154,8 @@ public override object VisitValue_literal(kebnfParser.Value_literalContext conte { return new ValueLiteralElement() { - Value = context.GetText() + Value = context.GetText(), + TextualNotationRule = this.CurrentRule }; } @@ -152,10 +169,16 @@ public override object VisitGroup(kebnfParser.GroupContext context) var group = new GroupElement { Suffix = context.suffix?.GetText(), + TextualNotationRule = this.CurrentRule }; group.Alternatives.AddRange((IEnumerable)this.Visit(context.alternatives())); - + + foreach (var element in group.Alternatives.SelectMany(x => x.Elements)) + { + element.Container = group; + } + return group; } @@ -169,7 +192,8 @@ public override object VisitTerminal(kebnfParser.TerminalContext context) return new TerminalElement() { Value = context.val.Text.Trim('\''), - Suffix = context.suffix?.GetText() + Suffix = context.suffix?.GetText(), + TextualNotationRule = this.CurrentRule }; } @@ -183,7 +207,8 @@ public override object VisitNon_terminal(kebnfParser.Non_terminalContext context return new NonTerminalElement() { Name = context.name.Text, - Suffix = context.suffix?.GetText() + Suffix = context.suffix?.GetText(), + TextualNotationRule = this.CurrentRule }; } } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index 4e491089..55b4ae0b 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -30,6 +30,7 @@ namespace SysML2.NET.CodeGenerator.HandleBarHelpers using SysML2.NET.CodeGenerator.Grammar; using SysML2.NET.CodeGenerator.Grammar.Model; + using uml4net.Classification; using uml4net.CommonStructure; using uml4net.Extensions; using uml4net.StructuredClassifiers; @@ -69,7 +70,7 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) if (namedElement is IClass umlClass) { - ProcessAlternatives(writer, umlClass, textualRule.Alternatives, allRules); + ProcessAlternatives(writer, umlClass, textualRule.Alternatives, allRules, definedIterators: null); } }); } @@ -81,25 +82,46 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) /// The related /// The collection of alternatives to process /// A collection of all existing rules - /// - private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, IReadOnlyCollection rules, bool callerElementIsOptional = false) + /// Collection of that keep tracks of defined iterator + /// An optional that is calling this function + private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, + IReadOnlyCollection rules, List definedIterators, RuleElement callerElement = null) { + definedIterators ??= []; + if (alternatives.Count == 1) { - var elements = alternatives.ElementAt(0).Elements; + var alternative = alternatives.ElementAt(0); + var elements = alternative.Elements; + DeclareAllRequiredIterators(writer, umlClass, rules, alternative, definedIterators); - if (callerElementIsOptional) + if (callerElement is { IsOptional: true, IsCollection: false }) { var targetPropertiesName = elements.OfType().Select(x => x.Property).Distinct().ToList(); - + var allProperties = umlClass.QueryAllProperties(); + if (targetPropertiesName.Count > 0) { - var allProperties = umlClass.QueryAllProperties(); + writer.WriteSafeString(Environment.NewLine); writer.WriteSafeString("if("); - var ifStatementContent = targetPropertiesName - .Select(propertyName => allProperties.SingleOrDefault(x => string.Equals(x.Name, propertyName, StringComparison.OrdinalIgnoreCase))) - .Select(matchedProperty => matchedProperty.QueryIfStatementContentForNonEmpty("poco")).ToList(); + var ifStatementContent = new List(); + + foreach (var targetPropertyName in targetPropertiesName) + { + var property = allProperties.Single(x => string.Equals(x.Name, targetPropertyName, StringComparison.OrdinalIgnoreCase)); + + if (property.QueryIsEnumerable()) + { + var assigment = elements.OfType().First(x => x.Property == targetPropertyName); + var iterator = definedIterators.FirstOrDefault(x => x.ApplicableRuleElements.Contains(assigment)); + ifStatementContent.Add(iterator == null ? $"BuildGroupConditionFor{assigment.TextualNotationRule.RuleName}(poco)" : property.QueryIfStatementContentForNonEmpty(iterator.IteratorVariableName)); + } + else + { + ifStatementContent.Add(property.QueryIfStatementContentForNonEmpty("poco")); + } + } writer.WriteSafeString(string.Join(" && ", ifStatementContent)); writer.WriteSafeString($"){Environment.NewLine}"); @@ -107,18 +129,27 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas foreach (var textualRuleElement in elements) { - ProcessRuleElement(writer, umlClass, rules, textualRuleElement); + ProcessRuleElement(writer, umlClass, rules, textualRuleElement, definedIterators); } - - writer.WriteSafeString($"stringBuilder.Append(' ');{Environment.NewLine}"); - writer.WriteSafeString($"}}{Environment.NewLine}"); } + else + { + writer.WriteSafeString($"{Environment.NewLine}if(BuildGroupConditionFor{alternative.TextualNotationRule.RuleName}(poco))"); + writer.WriteSafeString($"{Environment.NewLine}{{{Environment.NewLine}"); + + foreach (var textualRuleElement in elements) + { + ProcessRuleElement(writer, umlClass, rules, textualRuleElement, definedIterators); + } + } + + writer.WriteSafeString($"}}{Environment.NewLine}"); } else { foreach (var textualRuleElement in elements) { - ProcessRuleElement(writer, umlClass, rules, textualRuleElement); + ProcessRuleElement(writer, umlClass, rules, textualRuleElement, definedIterators); } } } @@ -128,6 +159,37 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas } } + /// + /// Declares all required iterator for all present inside an + /// + /// The used to write into output content + /// The related + /// A collection of all existing rules + /// The to process + /// Collection of that keep tracks of defined iterator + private static void DeclareAllRequiredIterators(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, Alternatives alternatives, List definedIterators) + { + foreach (var ruleElement in alternatives.Elements) + { + switch (ruleElement) + { + case AssignmentElement { Value: NonTerminalElement } assignmentElement: + DeclareIteratorIfRequired(writer, umlClass, rules, assignmentElement, definedIterators); + break; + case AssignmentElement { Value: GroupElement } assignmentElement: + DeclareIteratorIfRequired(writer, umlClass, rules, assignmentElement, definedIterators); + break; + case GroupElement groupElement: + foreach (var groupElementAlternative in groupElement.Alternatives) + { + DeclareAllRequiredIterators(writer, umlClass, rules, groupElementAlternative, definedIterators); + } + + break; + } + } + } + /// /// Processes a /// @@ -135,54 +197,53 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas /// The related /// A collection of all existing rules /// The to process + /// Collection of that keep tracks of defined iterator /// If the type of the is not supported - private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, RuleElement textualRuleElement) + private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, RuleElement textualRuleElement, List definedIterators) { switch (textualRuleElement) { case TerminalElement terminalElement: var valueToAdd = terminalElement.Value; - if (valueToAdd.Length > 1) + if (valueToAdd!="<" && valueToAdd!=">") { - valueToAdd += ' '; + if (valueToAdd == "=") + { + valueToAdd = $" {valueToAdd} "; + } + else + { + valueToAdd += ' '; + } } writer.WriteSafeString($"stringBuilder.Append(\"{valueToAdd}\");"); break; case NonTerminalElement nonTerminalElement: - var referencedRule = rules.Single(x => x.RuleName == nonTerminalElement.Name); - var typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; - - if (typeTarget != umlClass.Name) + ProcessNonTerminalElement(writer, umlClass, rules, definedIterators, nonTerminalElement, "poco"); + + break; + case GroupElement groupElement: + if (groupElement.IsCollection) { - var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); - - if (targetType != null) - { - if (targetType is IClass targetClass && umlClass.QueryAllGeneralClassifiers().Contains(targetClass)) - { - writer.WriteSafeString($"{targetType.Name}TextualNotationBuilder.Build{referencedRule.RuleName}(poco, stringBuilder);"); - } - else - { - ProcessAlternatives(writer, umlClass, referencedRule.Alternatives, rules); - } - } - else + var assignmentRule = groupElement.Alternatives.SelectMany(x => x.Elements).FirstOrDefault(x => x is AssignmentElement { Value: NonTerminalElement }); + + if (assignmentRule is AssignmentElement assignmentElement) { - ProcessAlternatives(writer, umlClass, referencedRule.Alternatives, rules); + var iteratorToUse = definedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + writer.WriteSafeString($"{Environment.NewLine}while({iteratorToUse.IteratorVariableName}.MoveNext()){Environment.NewLine}"); } + + writer.WriteSafeString($"{{{Environment.NewLine}"); + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, rules, definedIterators, groupElement); + writer.WriteSafeString($"{Environment.NewLine}}}"); } else { - writer.WriteSafeString($"Build{referencedRule.RuleName}(poco, stringBuilder);"); + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, rules,definedIterators, groupElement); } - break; - case GroupElement groupElement: - ProcessAlternatives(writer, umlClass, groupElement.Alternatives, rules, groupElement.IsOptional); - if (!groupElement.IsOptional) { writer.WriteSafeString($"{Environment.NewLine}stringBuilder.Append(' ');"); @@ -197,7 +258,21 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass { if (targetProperty.QueryIsEnumerable()) { - writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of enumerable not supported yet\");"); + if (assignmentElement.Value is NonTerminalElement nonTerminalElement) + { + var iteratorToUse = definedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + + if (assignmentElement.Container is not GroupElement { IsCollection: true } && assignmentElement.Container is not GroupElement { IsOptional: true }) + { + writer.WriteSafeString($"{iteratorToUse.IteratorVariableName}.MoveNext();{Environment.NewLine}"); + } + + ProcessNonTerminalElement(writer, umlClass, rules, definedIterators, nonTerminalElement, $"{iteratorToUse.IteratorVariableName}.Current"); + } + else + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of enumerable with non NonTerminalElement not supported yet\");"); + } } else { @@ -205,7 +280,6 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass { writer.WriteSafeString($"{Environment.NewLine}if({targetProperty.QueryIfStatementContentForNonEmpty("poco")}){Environment.NewLine}"); writer.WriteSafeString($"{{{Environment.NewLine}"); - writer.WriteSafeString($"{Environment.NewLine}"); writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()});{Environment.NewLine}"); writer.WriteSafeString("}}"); } @@ -255,5 +329,198 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass writer.WriteSafeString(Environment.NewLine); } + + /// + /// Process a + /// + /// The used to write into output content + /// The related + /// A collection of all existing rules + /// The to process + /// Collection of that keep tracks of defined iterator + /// The name of the variable that should be used to call the non-terminal method + private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, List definedIterators, NonTerminalElement nonTerminalElement, string variableName) + { + var referencedRule = rules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); + + string typeTarget; + + if (referencedRule == null) + { + typeTarget = umlClass.Name; + } + else + { + typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; + } + + if (typeTarget != umlClass.Name) + { + var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); + + if (targetType != null) + { + if (targetType is IClass targetClass && (umlClass.QueryAllGeneralClassifiers().Contains(targetClass) || variableName != "poco")) + { + writer.WriteSafeString($"{targetType.Name}TextualNotationBuilder.Build{nonTerminalElement.Name}({variableName}, stringBuilder);"); + } + else + { + ProcessAlternatives(writer, umlClass, referencedRule!.Alternatives, rules, definedIterators); + } + } + else + { + ProcessAlternatives(writer, umlClass, referencedRule!.Alternatives, rules, definedIterators); + } + } + else + { + writer.WriteSafeString($"Build{ nonTerminalElement.Name}({variableName}, stringBuilder);"); + } + } + + /// + /// Declares an iterator to perform iteration over a collection, if required to declare it + /// + /// The used to write into output content + /// The related + /// A collection of all existing rules + /// The to process + /// Collection of that keep tracks of defined iterator + private static void DeclareIteratorIfRequired(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, AssignmentElement assignmentElement, List definedIterators) + { + var allProperties = umlClass.QueryAllProperties(); + var targetProperty = allProperties.SingleOrDefault(x => string.Equals(x.Name, assignmentElement.Property, StringComparison.OrdinalIgnoreCase)); + + if (targetProperty == null || !targetProperty.QueryIsEnumerable()) + { + return; + } + + if (assignmentElement.Value is GroupElement groupElement) + { + var groupedAssignment = groupElement.Alternatives.SelectMany(x => x.Elements).OfType(); + + foreach (var assignment in groupedAssignment) + { + DeclareIteratorIfRequired(writer, umlClass, rules, assignment, definedIterators); + } + } + + if (assignmentElement.Value is not NonTerminalElement nonTerminalElement) + { + return; + } + + var referencedRule = rules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); + + if (definedIterators.SingleOrDefault(x => x.IsIteratorValidForProperty(targetProperty, referencedRule) || x.ApplicableRuleElements.Contains(assignmentElement)) is { } alreadyDefinedIterator) + { + alreadyDefinedIterator.ApplicableRuleElements.Add(assignmentElement); + return; + } + + var iteratorToUse = new IteratorDefinition + { + DefinedForProperty = targetProperty + }; + + iteratorToUse.ApplicableRuleElements.Add(assignmentElement); + + string typeTarget; + + if (referencedRule == null) + { + typeTarget = umlClass.Name; + } + else + { + typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; + } + + if (typeTarget != targetProperty.Type.Name) + { + var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); + iteratorToUse.ConstrainedType = targetType; + + writer.WriteSafeString(targetType != null + ? $"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.OfType<{targetType.QueryFullyQualifiedTypeName(targetInterface: false)}>().GetEnumerator();" + : $"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); + } + else + { + writer.WriteSafeString($"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); + } + + writer.WriteSafeString(Environment.NewLine); + definedIterators.Add(iteratorToUse); + } + + /// + /// Keeps tracks of defined iterator for enumerable + /// + private class IteratorDefinition + { + /// + /// Gets or sets the that have to have an iterator defined + /// + public IProperty DefinedForProperty { get; init; } + + /// + /// Gets or sets the that should be + /// + public INamedElement ConstrainedType { get; set; } + + /// + /// Gets the name of the variable defined for the iterator + /// + public string IteratorVariableName => this.ComputeIteratorName(); + + /// + /// Provides a collection of that will use the defined iterator + /// + public HashSet ApplicableRuleElements { get; } = []; + + /// + /// Compute the name of the iterator variable + /// + /// The computed name + private string ComputeIteratorName() + { + var name = this.DefinedForProperty.Name.LowerCaseFirstLetter(); + + if (this.ConstrainedType != null) + { + name += $"Of{this.ConstrainedType.Name.CapitalizeFirstLetter()}"; + } + + name += "Iterator"; + return name; + } + + /// + /// Asserts that the current is valid for an for a specific + /// + /// The specific + /// The specific that should constraint a collection type + /// True if the is valid for the provided parameters + public bool IsIteratorValidForProperty(IProperty property, TextualNotationRule targetRule) + { + if (property != this.DefinedForProperty) + { + return false; + } + + if (targetRule == null) + { + return this.ConstrainedType == null; + } + + var typeTarget = targetRule.TargetElementName ?? targetRule.RuleName; + + return string.Equals(this.ConstrainedType?.Name, typeTarget, StringComparison.InvariantCultureIgnoreCase); + } + } } } diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs index ae78deaf..c92a1ed1 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..c48d60bd --- /dev/null +++ b/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of the + /// + public static partial class AcceptActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the TransitionAcceptActionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionAcceptActionUsage(IAcceptActionUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..a35780dd --- /dev/null +++ b/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs @@ -0,0 +1,50 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of + /// + public static partial class ActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the ActionBodyParameter rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForActionBodyParameter(IActionUsage poco) + { + return false; + } + + /// + /// Builds the conditional part for the AssignmentNodeDeclaration rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForAssignmentNodeDeclaration(IActionUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..cd8d98ae --- /dev/null +++ b/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of + /// + public static partial class AssignmentActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the TransitionAssignmentActionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionAssignmentActionUsage(IAssignmentActionUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs index 97d150b1..35b56867 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs @@ -24,9 +24,11 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Core.POCO.Systems.Actions; /// /// The provides Textual Notation Builder for the element @@ -69,11 +71,14 @@ public static void BuildAcceptNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actio /// The that contains the entire textual notation public static void BuildAcceptParameterPart(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildPayloadParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { stringBuilder.Append("via "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } @@ -115,6 +120,14 @@ public static void BuildTransitionAcceptActionUsage(SysML2.NET.Core.POCO.Systems { BuildAcceptNodeDeclaration(poco, stringBuilder); + if (BuildGroupConditionForTransitionAcceptActionUsage(poco)) + { + stringBuilder.Append("{"); + TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); + stringBuilder.Append("}"); + stringBuilder.Append(' '); + } + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs index 395ed8bb..c92602c5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs index 4b0a2f36..9f1f9a01 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -91,12 +92,23 @@ public static void BuildActionNodePrefix(SysML2.NET.Core.POCO.Systems.Actions.IA /// The that contains the entire textual notation public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (BuildGroupConditionForAssignmentNodeDeclaration(poco)) + { + BuildActionNodeUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } stringBuilder.Append("assign "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildAssignmentTargetMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); stringBuilder.Append(":= "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); } @@ -109,6 +121,13 @@ public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.A public static void BuildActionBodyParameter(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, StringBuilder stringBuilder) { + if (BuildGroupConditionForActionBodyParameter(poco)) + { + stringBuilder.Append("action "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("{"); TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); stringBuilder.Append("}"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs index 5e0d05e6..9472be9f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,8 +42,10 @@ public static partial class ActorMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildActorMember(SysML2.NET.Core.POCO.Systems.Requirements.IActorMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfPartUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfPartUsageIterator.MoveNext(); + PartUsageTextualNotationBuilder.BuildActorUsage(ownedRelatedElementOfPartUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs index 301b2089..ff58ecec 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs index 14776059..650f7ef7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs index cd54c4a4..cfca3f93 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs index 4fafd028..1d0f4015 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs index 177e3ddc..d3b6c1d1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs index 2951e78c..90508df7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class AnnotationTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfAnnotatingElementIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfAnnotatingElementIterator.MoveNext(); + AnnotatingElementTextualNotationBuilder.BuildAnnotatingElement(ownedRelatedElementOfAnnotatingElementIterator.Current, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs index f6b12595..f21db1ea 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,8 +42,10 @@ public static partial class AssertConstraintUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAssertConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IAssertConstraintUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("assert "); + if (poco.IsNegated) { stringBuilder.Append("not"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs index 85486415..069d63a8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -70,6 +71,14 @@ public static void BuildTransitionAssignmentActionUsage(SysML2.NET.Core.POCO.Sys { ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, stringBuilder); + if (BuildGroupConditionForTransitionAssignmentActionUsage(poco)) + { + stringBuilder.Append("{"); + TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); + stringBuilder.Append("}"); + stringBuilder.Append(' '); + } + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs index accee2d9..ff949da0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs index e011b18c..c9c173a3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs index 17a490ee..5f2260a7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs index 3e056fa8..1be2d1f5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs index 6295f00f..11522991 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs index 4dc6ef8a..86768557 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,12 +42,22 @@ public static partial class BindingConnectorAsUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildBindingConnectorAsUsage(SysML2.NET.Core.POCO.Systems.Connections.IBindingConnectorAsUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); + if (BuildGroupConditionForBindingConnectorAsUsage(poco)) + { + stringBuilder.Append("binding "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("bind "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("="); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs index 9930b1a7..b72eaa90 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -52,14 +53,15 @@ public static void BuildBindingConnectorDeclaration(SysML2.NET.Core.POCO.Kernel. /// The that contains the entire textual notation public static void BuildBindingConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("binding "); BuildBindingConnectorDeclaration(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs index a598712e..ab61cf40 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,14 +42,15 @@ public static partial class BooleanExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildBooleanExpression(SysML2.NET.Core.POCO.Kernel.Functions.IBooleanExpression poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("bool "); FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs index aa7d25b3..8195eecc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs index ed4e98cd..72a021ce 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs index f2ff8064..4a6f2971 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs index fe3a5447..00ef1b6b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs index 949a875d..4abead85 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs index 557158ec..d5b3cf56 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,15 +42,17 @@ public static partial class ClassifierTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfSubclassificationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfSubclassificationIterator.MoveNext(); + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + + while (ownedRelationshipOfSubclassificationIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } } @@ -61,6 +64,8 @@ public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifi /// The that contains the entire textual notation public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + if (poco.IsSufficient) { stringBuilder.Append("all"); @@ -68,9 +73,10 @@ public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifi } ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } @@ -87,15 +93,17 @@ public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifi /// The that contains the entire textual notation public static void BuildSuperclassingPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfSubclassificationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfSubclassificationIterator.MoveNext(); + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + + while (ownedRelationshipOfSubclassificationIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs index 041e9a65..f15cb1ba 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,12 @@ public static partial class CollectExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildCollectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ICollectExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append("."); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildBodyArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs index fcd0f63b..3296b9e0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,6 +42,30 @@ public static partial class CommentTextualNotationBuilder /// The that contains the entire textual notation public static void BuildComment(SysML2.NET.Core.POCO.Root.Annotations.IComment poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfAnnotationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (BuildGroupConditionForComment(poco)) + { + stringBuilder.Append("comment "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.MoveNext()) + { + stringBuilder.Append("about "); + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + while (ownedRelationshipOfAnnotationIterator.MoveNext()) + { + stringBuilder.Append(","); + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + } + stringBuilder.Append(' '); + } + + stringBuilder.Append(' '); + } + if (!string.IsNullOrWhiteSpace(poco.Locale)) { diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs index 30b698bc..3fefd30c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs index 468db14d..993889c7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs index c28e844a..e2de57b1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class ConjugatedPortDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConjugatedPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortDefinition poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfPortConjugationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfPortConjugationIterator.MoveNext(); + PortConjugationTextualNotationBuilder.BuildPortConjugation(ownedRelationshipOfPortConjugationIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs index 14b4483e..6ca6cc1f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs index 17a48209..5868a148 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -53,6 +54,13 @@ public static void BuildOwnedConjugation(SysML2.NET.Core.POCO.Core.Types.IConjug public static void BuildConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, StringBuilder stringBuilder) { + if (BuildGroupConditionForConjugation(poco)) + { + stringBuilder.Append("conjugation "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("conjugate "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs index 940a3494..5d1fcc6d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs index 3b9224f6..5a60fe85 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -52,9 +53,12 @@ public static void BuildConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.I /// The that contains the entire textual notation public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("to "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); } @@ -66,17 +70,20 @@ public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connect /// The that contains the entire textual notation public static void BuildNaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("("); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + while (ownedRelationshipOfEndFeatureMembershipIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(")"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs index ebae891a..a72e8e63 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -52,10 +53,13 @@ public static void BuildConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connect /// The that contains the entire textual notation public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("to "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); } @@ -67,18 +71,21 @@ public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.C /// The that contains the entire textual notation public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); stringBuilder.Append("("); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + while (ownedRelationshipOfEndFeatureMembershipIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(")"); } @@ -91,14 +98,15 @@ public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Con /// The that contains the entire textual notation public static void BuildConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("connector "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs index 71d48ba6..e80cb7a2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs index 1fad681d..151ba9f0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs index 6abf780e..8dd9b4e4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,13 @@ public static partial class ConstructorExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConstructorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IConstructorExpression poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("new "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildInstantiatedTypeMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildConstructorResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs index ed69bd4f..64b1f731 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs index 3401445a..b64b8cad 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs index 70b3ad2b..ea76f159 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs index 8fe13732..3f8b633b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs index db28a48a..67bf804c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class DefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildDefinitionExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs index 4f7ecba7..38ba6810 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,31 +42,35 @@ public static partial class DependencyTextualNotationBuilder /// The that contains the entire textual notation public static void BuildDependency(SysML2.NET.Core.POCO.Root.Dependencies.IDependency poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfAnnotationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfAnnotationIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + AnnotationTextualNotationBuilder.BuildPrefixMetadataAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } stringBuilder.Append("dependency "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.Client.Count != 0) + if (BuildGroupConditionForDependencyDeclaration(poco)) { - stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append("from "); stringBuilder.Append(' '); } - stringBuilder.Append("to "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.Supplier.Count != 0) + throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); + throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); + } + stringBuilder.Append("to "); + throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); + { + stringBuilder.Append(","); + throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); + } RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs index bc3d0f48..d45fe372 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs index 115075d1..0202d5b3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -53,6 +54,13 @@ public static void BuildOwnedDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoin public static void BuildDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, StringBuilder stringBuilder) { + if (BuildGroupConditionForDisjoining(poco)) + { + stringBuilder.Append("disjoining "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("disjoint "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs index 6be88e17..faa8e2ab 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -43,6 +44,7 @@ public static void BuildDocumentation(SysML2.NET.Core.POCO.Root.Annotations.IDoc { stringBuilder.Append("doc "); ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + if (!string.IsNullOrWhiteSpace(poco.Locale)) { stringBuilder.Append("locale "); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs index 514be9fd..ee7f0088 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,11 @@ public static partial class ElementFilterMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("filter "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfExpressionIterator.MoveNext(); + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); stringBuilder.Append(";"); } @@ -56,8 +59,10 @@ public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages /// The that contains the entire textual notation public static void BuildFilterPackageMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("["); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfExpressionIterator.MoveNext(); + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); stringBuilder.Append("]"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs index dc955936..9e720f52 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,6 +42,7 @@ public static partial class ElementTextualNotationBuilder /// The that contains the entire textual notation public static void BuildIdentification(SysML2.NET.Core.POCO.Root.Elements.IElement poco, StringBuilder stringBuilder) { + if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName)) { stringBuilder.Append("<"); @@ -49,6 +51,7 @@ public static void BuildIdentification(SysML2.NET.Core.POCO.Root.Elements.IEleme stringBuilder.Append(' '); } + if (!string.IsNullOrWhiteSpace(poco.DeclaredName)) { stringBuilder.Append(poco.DeclaredName); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs index 42322c13..be3e18f0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class EndFeatureMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildSourceEnd(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -53,7 +56,9 @@ public static void BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndF /// The that contains the entire textual notation public static void BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildConnectorEnd(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -65,7 +70,9 @@ public static void BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IE /// The that contains the entire textual notation public static void BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfPortUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfPortUsageIterator.MoveNext(); + PortUsageTextualNotationBuilder.BuildInterfaceEnd(ownedRelatedElementOfPortUsageIterator.Current, stringBuilder); } @@ -77,7 +84,9 @@ public static void BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IE /// The that contains the entire textual notation public static void BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfFlowEndIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFlowEndIterator.MoveNext(); + FlowEndTextualNotationBuilder.BuildFlowEnd(ownedRelatedElementOfFlowEndIterator.Current, stringBuilder); } @@ -89,7 +98,9 @@ public static void BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFea /// The that contains the entire textual notation public static void BuildEmptyEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildEmptyFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs index 9262de82..164f20a3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs index be47fe15..9058751c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs index b7a87d9f..af4af9bc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class EventOccurrenceUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); } @@ -53,6 +56,7 @@ public static void BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IE /// The that contains the entire textual notation public static void BuildEventOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("event "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs index af79c05d..6cd6147c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,6 +42,7 @@ public static partial class ExhibitStateUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildExhibitStateUsage(SysML2.NET.Core.POCO.Systems.States.IExhibitStateUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("exhibit "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs index cbd7435e..49cd6253 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs index 4ab27346..e162d784 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -99,7 +100,9 @@ public static void BuildSequenceExpressionList(SysML2.NET.Core.POCO.Kernel.Funct /// The that contains the entire textual notation public static void BuildFunctionReference(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + FeatureTypingTextualNotationBuilder.BuildReferenceTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); } @@ -136,14 +139,15 @@ public static void BuildExpressionBody(SysML2.NET.Core.POCO.Kernel.Functions.IEx /// The that contains the entire textual notation public static void BuildExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("expr "); FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs index 6ae602f1..c4e2d667 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,13 @@ public static partial class FeatureChainExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFeatureChainExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureChainExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildNonFeatureChainPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append("."); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs index 4c3aa4b0..4ab2815e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs index 0c5a9609..78100323 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs index d12324ea..2592aed0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -52,6 +53,14 @@ public static void BuildOwnedFeatureInverting(SysML2.NET.Core.POCO.Core.Features /// The that contains the entire textual notation public static void BuildFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + + if (BuildGroupConditionForFeatureInverting(poco)) + { + stringBuilder.Append("inverting "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } stringBuilder.Append("inverse "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs index 894cc0c0..26010af1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,8 +42,10 @@ public static partial class FeatureMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfUsageIterator.MoveNext(); + UsageTextualNotationBuilder.BuildNonOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); } @@ -54,8 +57,10 @@ public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types /// The that contains the entire textual notation public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfUsageIterator.MoveNext(); + UsageTextualNotationBuilder.BuildOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); } @@ -67,8 +72,10 @@ public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IF /// The that contains the entire textual notation public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfUsageIterator.MoveNext(); + UsageTextualNotationBuilder.BuildStructureUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); } @@ -80,8 +87,10 @@ public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFe /// The that contains the entire textual notation public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfUsageIterator.MoveNext(); + UsageTextualNotationBuilder.BuildBehaviorUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); } @@ -93,8 +102,10 @@ public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFea /// The that contains the entire textual notation public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfSuccessionAsUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("then "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfSuccessionAsUsageIterator.MoveNext(); + SuccessionAsUsageTextualNotationBuilder.BuildSourceSuccession(ownedRelatedElementOfSuccessionAsUsageIterator.Current, stringBuilder); } @@ -106,8 +117,10 @@ public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.I /// The that contains the entire textual notation public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfUsageIterator.MoveNext(); + UsageTextualNotationBuilder.BuildInterfaceNonOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); } @@ -119,8 +132,10 @@ public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.C /// The that contains the entire textual notation public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfUsageIterator.MoveNext(); + UsageTextualNotationBuilder.BuildInterfaceOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); } @@ -132,7 +147,9 @@ public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core /// The that contains the entire textual notation public static void BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfPayloadFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfPayloadFeatureIterator.MoveNext(); + PayloadFeatureTextualNotationBuilder.BuildFlowPayloadFeature(ownedRelatedElementOfPayloadFeatureIterator.Current, stringBuilder); } @@ -144,7 +161,9 @@ public static void BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types /// The that contains the entire textual notation public static void BuildFlowFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildFlowFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -182,8 +201,10 @@ public static void BuildInitialNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatu /// The that contains the entire textual notation public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + ActionUsageTextualNotationBuilder.BuildActionNode(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); } @@ -195,8 +216,10 @@ public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatur /// The that contains the entire textual notation public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfUsageIterator.MoveNext(); + UsageTextualNotationBuilder.BuildActionTargetSuccession(ownedRelatedElementOfUsageIterator.Current, stringBuilder); } @@ -208,8 +231,10 @@ public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.T /// The that contains the entire textual notation public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfTransitionUsageIterator.MoveNext(); + TransitionUsageTextualNotationBuilder.BuildGuardedSuccession(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); } @@ -221,7 +246,9 @@ public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types. /// The that contains the entire textual notation public static void BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfUsageIterator.MoveNext(); + UsageTextualNotationBuilder.BuildUsageDeclaration(ownedRelatedElementOfUsageIterator.Current, stringBuilder); } @@ -233,6 +260,8 @@ public static void BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.T /// The that contains the entire textual notation public static void BuildEntryTransitionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + using var ownedRelatedElementOfSuccessionAsUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); @@ -248,8 +277,10 @@ public static void BuildEntryTransitionMember(SysML2.NET.Core.POCO.Core.Types.IF /// The that contains the entire textual notation public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfTransitionUsageIterator.MoveNext(); + TransitionUsageTextualNotationBuilder.BuildTransitionUsage(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); } @@ -261,8 +292,10 @@ public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IF /// The that contains the entire textual notation public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfTransitionUsageIterator.MoveNext(); + TransitionUsageTextualNotationBuilder.BuildTargetTransitionUsage(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); } @@ -286,8 +319,10 @@ public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types. /// The that contains the entire textual notation public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } @@ -299,7 +334,9 @@ public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeat /// The that contains the entire textual notation public static void BuildOwnedExpressionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureReferenceExpressionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureReferenceExpressionIterator.MoveNext(); + FeatureReferenceExpressionTextualNotationBuilder.BuildOwnedExpressionReference(ownedRelationshipOfFeatureReferenceExpressionIterator.Current, stringBuilder); } @@ -371,7 +408,9 @@ public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFe /// The that contains the entire textual notation public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildPayloadFeature(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs index 6bcf48cb..bd53ca79 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class FeatureReferenceExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); } @@ -53,7 +56,9 @@ public static void BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Ker /// The that contains the entire textual notation public static void BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildOwnedExpressionMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); } @@ -65,7 +70,9 @@ public static void BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Exp /// The that contains the entire textual notation public static void BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildFunctionReferenceMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); } @@ -77,8 +84,12 @@ public static void BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel. /// The that contains the entire textual notation public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildFeatureReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } @@ -90,7 +101,9 @@ public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.E /// The that contains the entire textual notation public static void BuildBodyExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildExpressionBodyMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs index 5915679b..51edd639 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class FeatureTextualNotationBuilder /// The that contains the entire textual notation public static void BuildValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -75,14 +78,15 @@ public static void BuildFeatureSpecialization(SysML2.NET.Core.POCO.Core.Features /// The that contains the entire textual notation public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); BuildTypedBy(poco, stringBuilder); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfFeatureTypingIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + FeatureTypingTextualNotationBuilder.BuildFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } } @@ -94,8 +98,10 @@ public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// The that contains the entire textual notation public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + FeatureTypingTextualNotationBuilder.BuildFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); } @@ -107,14 +113,15 @@ public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// The that contains the entire textual notation public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); BuildSubsets(poco, stringBuilder); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfSubsettingIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + SubsettingTextualNotationBuilder.BuildOwnedSubsetting(ownedRelationshipOfSubsettingIterator.Current, stringBuilder); + } } @@ -126,8 +133,10 @@ public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature /// The that contains the entire textual notation public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfSubsettingIterator.MoveNext(); + SubsettingTextualNotationBuilder.BuildOwnedSubsetting(ownedRelationshipOfSubsettingIterator.Current, stringBuilder); } @@ -139,8 +148,10 @@ public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// The that contains the entire textual notation public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); } @@ -152,8 +163,10 @@ public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature p /// The that contains the entire textual notation public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfCrossSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfCrossSubsettingIterator.MoveNext(); + CrossSubsettingTextualNotationBuilder.BuildOwnedCrossSubsetting(ownedRelationshipOfCrossSubsettingIterator.Current, stringBuilder); } @@ -165,14 +178,15 @@ public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// The that contains the entire textual notation public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); BuildRedefines(poco, stringBuilder); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfRedefinitionIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } } @@ -184,8 +198,10 @@ public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeatur /// The that contains the entire textual notation public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); } @@ -197,10 +213,16 @@ public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature po /// The that contains the entire textual notation public static void BuildOwnedFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append("."); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureChainingIterator.MoveNext(); + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + while (ownedRelationshipOfFeatureChainingIterator.MoveNext()) + { + stringBuilder.Append("."); + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + + } stringBuilder.Append(' '); } @@ -224,7 +246,9 @@ public static void BuildMultiplicityPart(SysML2.NET.Core.POCO.Core.Features.IFea /// The that contains the entire textual notation public static void BuildOwnedCrossMultiplicity(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); } @@ -258,11 +282,17 @@ public static void BuildPayloadFeatureSpecializationPart(SysML2.NET.Core.POCO.Co /// The that contains the entire textual notation public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append("."); + using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfFeatureChainingIterator.MoveNext()) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + stringBuilder.Append("."); + } stringBuilder.Append(' '); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfFeatureChainingIterator.MoveNext(); + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); stringBuilder.Append("."); } @@ -275,7 +305,9 @@ public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IF /// The that contains the entire textual notation public static void BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildTriggerFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -287,7 +319,9 @@ public static void BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFea /// The that contains the entire textual notation public static void BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -299,7 +333,9 @@ public static void BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poc /// The that contains the entire textual notation public static void BuildArgumentExpression(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildArgumentExpressionValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -322,6 +358,7 @@ public static void BuildFeatureElement(SysML2.NET.Core.POCO.Core.Features.IFeatu /// The that contains the entire textual notation public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + if (poco.IsConstant) { stringBuilder.Append("const"); @@ -341,18 +378,21 @@ public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFea /// The that contains the entire textual notation public static void BuildBasicFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + if (poco.Direction.HasValue) { stringBuilder.Append(poco.Direction.ToString().ToLower()); stringBuilder.Append(' '); } + if (poco.IsDerived) { stringBuilder.Append("derived"); stringBuilder.Append(' '); } + if (poco.IsAbstract) { stringBuilder.Append("abstract"); @@ -372,6 +412,7 @@ public static void BuildBasicFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IF /// The that contains the entire textual notation public static void BuildFeatureDeclaration(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + if (poco.IsSufficient) { stringBuilder.Append("all"); @@ -414,6 +455,7 @@ public static void BuildFeatureRelationshipPart(SysML2.NET.Core.POCO.Core.Featur /// The that contains the entire textual notation public static void BuildChainingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("chains "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); @@ -428,9 +470,11 @@ public static void BuildChainingPart(SysML2.NET.Core.POCO.Core.Features.IFeature /// The that contains the entire textual notation public static void BuildInvertingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfFeatureInvertingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("inverse "); stringBuilder.Append("of "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfFeatureInvertingIterator.MoveNext(); + FeatureInvertingTextualNotationBuilder.BuildOwnedFeatureInverting(ownedRelationshipOfFeatureInvertingIterator.Current, stringBuilder); } @@ -442,16 +486,19 @@ public static void BuildInvertingPart(SysML2.NET.Core.POCO.Core.Features.IFeatur /// The that contains the entire textual notation public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfTypeFeaturingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedTypeFeaturingIterator = poco.ownedTypeFeaturing.GetEnumerator(); stringBuilder.Append("featured "); stringBuilder.Append("by "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.ownedTypeFeaturing.Count != 0) + ownedRelationshipOfTypeFeaturingIterator.MoveNext(); + TypeFeaturingTextualNotationBuilder.BuildOwnedTypeFeaturing(ownedRelationshipOfTypeFeaturingIterator.Current, stringBuilder); + + while (ownedTypeFeaturingIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + TypeFeaturingTextualNotationBuilder.BuildOwnedTypeFeaturing(ownedTypeFeaturingIterator.Current, stringBuilder); + } } @@ -463,10 +510,16 @@ public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFe /// The that contains the entire textual notation public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append("."); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureChainingIterator.MoveNext(); + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + + while (ownedRelationshipOfFeatureChainingIterator.MoveNext()) + { + stringBuilder.Append("."); + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -479,7 +532,9 @@ public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature /// The that contains the entire textual notation public static void BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildMetadataValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -491,7 +546,9 @@ public static void BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFea /// The that contains the entire textual notation public static void BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + FeatureTypingTextualNotationBuilder.BuildReferenceTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); } @@ -503,7 +560,9 @@ public static void BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeatur /// The that contains the entire textual notation public static void BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildPrimaryArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -515,7 +574,9 @@ public static void BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeat /// The that contains the entire textual notation public static void BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildNonFeatureChainPrimaryArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -527,7 +588,9 @@ public static void BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core /// The that contains the entire textual notation public static void BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildBodyArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -539,7 +602,9 @@ public static void BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature /// The that contains the entire textual notation public static void BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildFunctionReferenceArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -589,14 +654,16 @@ public static void BuildArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature /// The that contains the entire textual notation public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + while (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } } @@ -608,14 +675,16 @@ public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Feature /// The that contains the entire textual notation public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildNamedArgumentMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + while (ownedRelationshipOfFeatureMembershipIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + FeatureMembershipTextualNotationBuilder.BuildNamedArgumentMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } } @@ -627,9 +696,13 @@ public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFe /// The that contains the entire textual notation public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + RedefinitionTextualNotationBuilder.BuildParameterRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); stringBuilder.Append("="); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -641,9 +714,11 @@ public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeatur /// The that contains the entire textual notation public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("feature "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); BuildFeatureSpecializationPart(poco, stringBuilder); BuildValuePart(poco, stringBuilder); TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); @@ -658,6 +733,7 @@ public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.I /// The that contains the entire textual notation public static void BuildFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); BuildValuePart(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs index 0ebdf2b0..e2f24cdb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs index 788230c7..2770f844 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class FeatureValueTextualNotationBuilder /// The that contains the entire textual notation public static void BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfTriggerInvocationExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfTriggerInvocationExpressionIterator.MoveNext(); + TriggerInvocationExpressionTextualNotationBuilder.BuildTriggerExpression(ownedRelatedElementOfTriggerInvocationExpressionIterator.Current, stringBuilder); } @@ -65,7 +68,9 @@ public static void BuildArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues. /// The that contains the entire textual notation public static void BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfFeatureReferenceExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFeatureReferenceExpressionIterator.MoveNext(); + FeatureReferenceExpressionTextualNotationBuilder.BuildOwnedExpressionReference(ownedRelatedElementOfFeatureReferenceExpressionIterator.Current, stringBuilder); } @@ -77,7 +82,9 @@ public static void BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.Feat /// The that contains the entire textual notation public static void BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfExpressionIterator.MoveNext(); + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); } @@ -89,7 +96,9 @@ public static void BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues /// The that contains the entire textual notation public static void BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfExpressionIterator.MoveNext(); + ExpressionTextualNotationBuilder.BuildNonFeatureChainPrimaryExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); } @@ -101,7 +110,9 @@ public static void BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.Feat /// The that contains the entire textual notation public static void BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfFeatureReferenceExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFeatureReferenceExpressionIterator.MoveNext(); + FeatureReferenceExpressionTextualNotationBuilder.BuildSatisfactionReferenceExpression(ownedRelatedElementOfFeatureReferenceExpressionIterator.Current, stringBuilder); } @@ -173,9 +184,11 @@ public static void BuildFunctionReferenceArgumentValue(SysML2.NET.Core.POCO.Kern /// The that contains the entire textual notation public static void BuildFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfExpressionIterator.MoveNext(); + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs index 6771417c..8e03f5f9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs index 2dace9da..63a69b0b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,13 +42,17 @@ public static partial class FlowEndTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFlowEnd(SysML2.NET.Core.POCO.Kernel.Interactions.IFlowEnd poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfReferenceSubsettingIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ReferenceSubsettingTextualNotationBuilder.BuildFlowEndSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); stringBuilder.Append(' '); } - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildFlowFeatureMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs index fd460f29..40d81222 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,14 +42,15 @@ public static partial class FlowTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFlow(SysML2.NET.Core.POCO.Kernel.Interactions.IFlow poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("flow "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs index ce5d1e7e..90b3bcda 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs index 8e56eaa4..0d6476e5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,12 +42,17 @@ public static partial class ForLoopActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildForLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IForLoopActionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); stringBuilder.Append("for "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildForVariableDeclarationMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("in "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs index c8732103..0c8f6cd0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs index 0106cd4d..412fb84b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,11 @@ public static partial class FramedConcernMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFramedConcernMember(SysML2.NET.Core.POCO.Systems.Requirements.IFramedConcernMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfConcernUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("frame "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfConcernUsageIterator.MoveNext(); + ConcernUsageTextualNotationBuilder.BuildFramedConcernUsage(ownedRelatedElementOfConcernUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs index 89e9d649..7533b9c9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs index 5f10dccf..1ef429e6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,14 +42,18 @@ public static partial class IfActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildIfNode(SysML2.NET.Core.POCO.Systems.Actions.IIfActionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); stringBuilder.Append("if "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildExpressionParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (BuildGroupConditionForIfNode(poco)) { stringBuilder.Append("else "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs index df1e7e6d..f43e0d6c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -54,6 +55,7 @@ public static void BuildImport(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco { stringBuilder.Append(poco.Visibility.ToString().ToLower()); stringBuilder.Append("import "); + if (poco.IsImportAll) { stringBuilder.Append("all"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs index 0297af1a..f6b8fbb7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,6 +42,7 @@ public static partial class IncludeUseCaseUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildIncludeUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IIncludeUseCaseUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("include "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs index 823e4d7e..85eb76b7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,10 +42,14 @@ public static partial class IndexExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildIndexExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IIndexExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append("#"); stringBuilder.Append("("); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append(")"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs index 131c6eac..55e47728 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs index d855c825..b1efd5bd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs index a8edd8a2..ef3162e6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -63,9 +64,12 @@ public static void BuildInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.II /// The that contains the entire textual notation public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("to "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); } @@ -77,17 +81,20 @@ public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfa /// The that contains the entire textual notation public static void BuildNaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("("); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + while (ownedRelationshipOfEndFeatureMembershipIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(")"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs index 60267aeb..e3443939 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs index acff88ca..9d70ff06 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,14 +42,15 @@ public static partial class InvariantTextualNotationBuilder /// The that contains the entire textual notation public static void BuildInvariant(SysML2.NET.Core.POCO.Kernel.Functions.IInvariant poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("inv "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs index 78d28bd1..6ee935b4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,12 +42,18 @@ public static partial class InvocationExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfInvocationExpressionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append("-> "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfInvocationExpressionIterator.MoveNext(); + BuildInvocationTypeMember(ownedRelationshipOfInvocationExpressionIterator.Current, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } @@ -58,9 +65,13 @@ public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel. /// The that contains the entire textual notation public static void BuildInvocationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildInstantiatedTypeMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); FeatureTextualNotationBuilder.BuildArgumentList(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs index e35af46e..20e3209d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs index a7b599ca..9e9772f7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs index 4f76eac2..e17813d2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs index 2931b48b..57d5e80c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,16 +42,17 @@ public static partial class LibraryPackageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildLibraryPackage(SysML2.NET.Core.POCO.Kernel.Packages.ILibraryPackage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("standard"); stringBuilder.Append(' '); stringBuilder.Append("library "); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } PackageTextualNotationBuilder.BuildPackageDeclaration(poco, stringBuilder); PackageTextualNotationBuilder.BuildPackageBody(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs index eb9cb34d..215bf2bf 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs index 7965c644..21ab5ec6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs index 78830938..e877fdf1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs index 06b4bf1e..12d657bd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs index a1eec88a..4e173178 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs index c26c9a7e..76ef4447 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs index 30617fe2..35812294 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -42,6 +43,7 @@ public static partial class MembershipImportTextualNotationBuilder public static void BuildMembershipImport(SysML2.NET.Core.POCO.Root.Namespaces.IMembershipImport poco, StringBuilder stringBuilder) { throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + if (poco.IsRecursive) { stringBuilder.Append(":: "); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs index 16910204..3af0d262 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,6 +42,7 @@ public static partial class MembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMemberPrefix(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { + if (poco.Visibility != SysML2.NET.Core.Root.Namespaces.VisibilityKind.Public) { stringBuilder.Append(poco.Visibility.ToString().ToLower()); @@ -60,6 +62,7 @@ public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMember { BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("alias "); + if (!string.IsNullOrWhiteSpace(poco.MemberShortName)) { stringBuilder.Append("<"); @@ -68,6 +71,7 @@ public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMember stringBuilder.Append(' '); } + if (!string.IsNullOrWhiteSpace(poco.MemberName)) { stringBuilder.Append(poco.MemberName); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs index ec77b98f..d499a57c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs index d0a12732..54c203f6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs index 6b3dc338..84030eab 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class MetadataAccessExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildElementReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); } @@ -53,7 +56,9 @@ public static void BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expression /// The that contains the entire textual notation public static void BuildMetadataAccessExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildElementReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); stringBuilder.Append("."); stringBuilder.Append("metadata "); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs index a1158a0f..191d4268 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,6 +42,7 @@ public static partial class MetadataDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMetadataDefinition(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataDefinition poco, StringBuilder stringBuilder) { + if (poco.IsAbstract) { stringBuilder.Append("abstract"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs index 38c50000..07423665 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class MetadataFeatureTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); } @@ -53,8 +56,18 @@ public static void BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metada /// The that contains the entire textual notation public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (BuildGroupConditionForMetadataFeatureDeclaration(poco)) + { + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + stringBuilder.Append(' '); + } + + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); } @@ -66,26 +79,29 @@ public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.M /// The that contains the entire textual notation public static void BuildMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfAnnotationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); BuildMetadataFeatureDeclaration(poco, stringBuilder); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append("about "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + while (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs index 14fbe831..8355b7c8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class MetadataUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); } @@ -53,8 +56,18 @@ public static void BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadat /// The that contains the entire textual notation public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + if (BuildGroupConditionForMetadataUsageDeclaration(poco)) + { + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + stringBuilder.Append(' '); + stringBuilder.Append(' '); + } + + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); } @@ -66,21 +79,23 @@ public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Me /// The that contains the entire textual notation public static void BuildMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfAnnotationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); BuildMetadataUsageDeclaration(poco, stringBuilder); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append("about "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + while (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs index a4800701..56442a1b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -53,15 +54,18 @@ public static void BuildOwnedMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multi /// The that contains the entire textual notation public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("["); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append(".. "); stringBuilder.Append(' '); } - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append("]"); } @@ -74,15 +78,18 @@ public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplic /// The that contains the entire textual notation public static void BuildMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("["); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append(".. "); stringBuilder.Append(' '); } - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append("]"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs index c0f0e236..a387ceec 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs index b0364f64..f31c167b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs index 6bff3b6a..e325221f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs index 177d277a..b06e9455 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -88,12 +89,13 @@ public static void BuildNamespaceBodyElement(SysML2.NET.Core.POCO.Root.Namespace /// The that contains the entire textual notation public static void BuildNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } BuildNamespaceDeclaration(poco, stringBuilder); BuildNamespaceBody(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs index 37b0a831..0b5aba45 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs index 48344b16..465b6fb9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,11 @@ public static partial class ObjectiveMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildObjectiveMember(SysML2.NET.Core.POCO.Systems.Cases.IObjectiveMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfRequirementUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("objective "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfRequirementUsageIterator.MoveNext(); + RequirementUsageTextualNotationBuilder.BuildObjectiveRequirementUsage(ownedRelatedElementOfRequirementUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs index f8fecfe6..a595d817 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,11 +42,13 @@ public static partial class OccurrenceDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - if (poco.IsIndividual && poco.OwnedRelationship.Count != 0) + + if (poco.IsIndividual && ownedRelationshipOfOwningMembershipIterator.MoveNext()) { stringBuilder.Append("individual"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + OwningMembershipTextualNotationBuilder.BuildEmptyMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } @@ -61,12 +64,14 @@ public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems. /// The that contains the entire textual notation public static void BuildIndividualDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append("individual"); DefinitionTextualNotationBuilder.BuildDefinitionExtensionKeyword(poco, stringBuilder); stringBuilder.Append("def "); DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildEmptyMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs index 0d33beb0..771d83d7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -42,12 +43,14 @@ public static partial class OccurrenceUsageTextualNotationBuilder public static void BuildOccurrenceUsagePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + if (poco.IsIndividual) { stringBuilder.Append("individual"); stringBuilder.Append(' '); } + if (poco.PortionKind.HasValue) { stringBuilder.Append(poco.PortionKind.ToString().ToLower()); @@ -83,6 +86,7 @@ public static void BuildIndividualUsage(SysML2.NET.Core.POCO.Systems.Occurrences public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, stringBuilder); + if (poco.IsIndividual) { stringBuilder.Append("individual"); @@ -105,12 +109,14 @@ public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IO public static void BuildControlNodePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, StringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildRefPrefix(poco, stringBuilder); + if (poco.IsIndividual) { stringBuilder.Append("individual"); stringBuilder.Append(' '); } + if (poco.PortionKind.HasValue) { stringBuilder.Append(poco.PortionKind.ToString().ToLower()); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs index a43d6cee..a8c95f03 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,13 +42,19 @@ public static partial class OperatorExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append(poco.Operator); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append("?"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append("else "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } @@ -59,10 +66,15 @@ public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expres /// The that contains the entire textual notation public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append(poco.Operator); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } @@ -74,10 +86,15 @@ public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO /// The that contains the entire textual notation public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append(poco.Operator); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } @@ -89,9 +106,13 @@ public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Exp /// The that contains the entire textual notation public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append(poco.Operator); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } @@ -103,15 +124,20 @@ public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expr /// The that contains the entire textual notation public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipIterator = poco.OwnedRelationship.GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } @@ -123,10 +149,15 @@ public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Exp /// The that contains the entire textual notation public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipIterator = poco.OwnedRelationship.GetEnumerator(); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildMetadataArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); } @@ -138,8 +169,10 @@ public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel /// The that contains the entire textual notation public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append(poco.Operator); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildTypeReferenceMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); } @@ -151,9 +184,13 @@ public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions /// The that contains the entire textual notation public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append(poco.Operator); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("]"); } @@ -166,9 +203,12 @@ public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expression /// The that contains the entire textual notation public static void BuildSequenceOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildOwnedExpressionMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append(poco.Operator); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs index 057b3c9f..fe2a72fd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class OwningMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfAnnotatingElementIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfAnnotatingElementIterator.MoveNext(); + AnnotatingElementTextualNotationBuilder.BuildAnnotatingElement(ownedRelatedElementOfAnnotatingElementIterator.Current, stringBuilder); } @@ -53,6 +56,8 @@ public static void BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IO /// The that contains the entire textual notation public static void BuildPackageMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementIterator = poco.OwnedRelatedElement.GetEnumerator(); + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); @@ -67,8 +72,10 @@ public static void BuildPackageMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwni /// The that contains the entire textual notation public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementIterator = poco.OwnedRelatedElement.GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementIterator.MoveNext(); + ElementTextualNotationBuilder.BuildDefinitionElement(ownedRelatedElementIterator.Current, stringBuilder); } @@ -80,7 +87,9 @@ public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IO /// The that contains the entire textual notation public static void BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildOwnedCrossFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -92,7 +101,9 @@ public static void BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namesp /// The that contains the entire textual notation public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfMultiplicityRangeIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfMultiplicityRangeIterator.MoveNext(); + MultiplicityRangeTextualNotationBuilder.BuildMultiplicityRange(ownedRelatedElementOfMultiplicityRangeIterator.Current, stringBuilder); } @@ -104,7 +115,7 @@ public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.I /// The that contains the entire textual notation public static void BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); } @@ -116,7 +127,9 @@ public static void BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.N /// The that contains the entire textual notation public static void BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfMultiplicityIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfMultiplicityIterator.MoveNext(); + MultiplicityTextualNotationBuilder.BuildEmptyMultiplicity(ownedRelatedElementOfMultiplicityIterator.Current, stringBuilder); } @@ -128,7 +141,9 @@ public static void BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namesp /// The that contains the entire textual notation public static void BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfConjugatedPortDefinitionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfConjugatedPortDefinitionIterator.MoveNext(); + ConjugatedPortDefinitionTextualNotationBuilder.BuildConjugatedPortDefinition(ownedRelatedElementOfConjugatedPortDefinitionIterator.Current, stringBuilder); } @@ -140,7 +155,9 @@ public static void BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root /// The that contains the entire textual notation public static void BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildOwnedCrossMultiplicity(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } @@ -152,7 +169,9 @@ public static void BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.N /// The that contains the entire textual notation public static void BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildOwnedFeatureChain(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } @@ -164,7 +183,9 @@ public static void BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namesp /// The that contains the entire textual notation public static void BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfSuccessionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfSuccessionIterator.MoveNext(); + SuccessionTextualNotationBuilder.BuildTransitionSuccession(ownedRelatedElementOfSuccessionIterator.Current, stringBuilder); } @@ -176,8 +197,10 @@ public static void BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Nam /// The that contains the entire textual notation public static void BuildPrefixMetadataMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfMetadataUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("#"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfMetadataUsageIterator.MoveNext(); + MetadataUsageTextualNotationBuilder.BuildPrefixMetadataUsage(ownedRelatedElementOfMetadataUsageIterator.Current, stringBuilder); } @@ -200,8 +223,10 @@ public static void BuildNamespaceMember(SysML2.NET.Core.POCO.Root.Namespaces.IOw /// The that contains the entire textual notation public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementIterator = poco.OwnedRelatedElement.GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementIterator.MoveNext(); + ElementTextualNotationBuilder.BuildMemberElement(ownedRelatedElementIterator.Current, stringBuilder); } @@ -213,8 +238,10 @@ public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IO /// The that contains the entire textual notation public static void BuildNamespaceFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } @@ -237,9 +264,11 @@ public static void BuildFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwni /// The that contains the entire textual notation public static void BuildTypeFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("member "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs index 408b7a1a..5a2a2f16 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -76,9 +77,16 @@ public static void BuildPackageBodyElement(SysML2.NET.Core.POCO.Kernel.Packages. /// The that contains the entire textual notation public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfPackageIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfElementFilterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfPackageIterator.MoveNext(); + BuildFilterPackageImport(ownedRelationshipOfPackageIterator.Current, stringBuilder); + while (ownedRelationshipOfElementFilterMembershipIterator.MoveNext()) + { + ElementFilterMembershipTextualNotationBuilder.BuildFilterPackageMember(ownedRelationshipOfElementFilterMembershipIterator.Current, stringBuilder); + + } stringBuilder.Append(' '); } @@ -91,12 +99,13 @@ public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPack /// The that contains the entire textual notation public static void BuildPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } BuildPackageDeclaration(poco, stringBuilder); BuildPackageBody(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs index c2cf33c4..410a1816 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class ParameterMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfEventOccurrenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfEventOccurrenceUsageIterator.MoveNext(); + EventOccurrenceUsageTextualNotationBuilder.BuildMessageEvent(ownedRelatedElementOfEventOccurrenceUsageIterator.Current, stringBuilder); } @@ -53,7 +56,9 @@ public static void BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors /// The that contains the entire textual notation public static void BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildPayloadParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -77,7 +82,9 @@ public static void BuildArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IPa /// The that contains the entire textual notation public static void BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildArgumentExpression(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } @@ -89,7 +96,9 @@ public static void BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Beh /// The that contains the entire textual notation public static void BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildNodeParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -101,7 +110,9 @@ public static void BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behavior /// The that contains the entire textual notation public static void BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildEmptyUsage(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -113,7 +124,9 @@ public static void BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behavio /// The that contains the entire textual notation public static void BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildAssignmentTargetParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -125,7 +138,9 @@ public static void BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behav /// The that contains the entire textual notation public static void BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfExpressionIterator.MoveNext(); + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); } @@ -137,7 +152,9 @@ public static void BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Be /// The that contains the entire textual notation public static void BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + ActionUsageTextualNotationBuilder.BuildActionBodyParameter(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); } @@ -149,7 +166,9 @@ public static void BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Be /// The that contains the entire textual notation public static void BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfIfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfIfActionUsageIterator.MoveNext(); + IfActionUsageTextualNotationBuilder.BuildIfNode(ownedRelatedElementOfIfActionUsageIterator.Current, stringBuilder); } @@ -161,7 +180,9 @@ public static void BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behavi /// The that contains the entire textual notation public static void BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildMetadataArgument(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs index 67f9a91e..be495e17 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs index 7a07d73c..f6869f2e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs index 35f89455..f237689f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs index 5364c23e..f3b0b9a7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,6 +42,7 @@ public static partial class PerformActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPerformActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); @@ -70,6 +72,14 @@ public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.System { BuildPerformActionUsageDeclaration(poco, stringBuilder); + if (BuildGroupConditionForTransitionPerformActionUsage(poco)) + { + stringBuilder.Append("{"); + TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); + stringBuilder.Append("}"); + stringBuilder.Append(' '); + } + } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs index 3994a9db..ec8ddda9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs index e5358fe6..c554a6ff 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,11 +42,13 @@ public static partial class PortDefinitionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IPortDefinition poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); DefinitionTextualNotationBuilder.BuildDefinitionPrefix(poco, stringBuilder); stringBuilder.Append("port "); stringBuilder.Append("def "); DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildConjugatedPortDefinitionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); // Assignment Element : conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition = this } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs index 6aee48d8..14545ef3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -54,12 +55,16 @@ public static void BuildDefaultInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.I /// The that contains the entire textual notation public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + OwningMembershipTextualNotationBuilder.BuildOwnedCrossMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } + if (!string.IsNullOrWhiteSpace(poco.DeclaredName)) { stringBuilder.Append(poco.DeclaredName); @@ -67,7 +72,8 @@ public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsa stringBuilder.Append(' '); } - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs index 438b4df7..ff40e40e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs index 32ebf78c..f151f59d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs index c01e3ec4..75e6b414 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -77,6 +78,13 @@ public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features public static void BuildRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { + if (BuildGroupConditionForRedefinition(poco)) + { + stringBuilder.Append("specialization "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("redefinition "); SpecializationTextualNotationBuilder.BuildSpecificType(poco, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs index a9365bea..03dac04f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs index 0f8cd2fd..3fde433d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -67,7 +68,9 @@ public static void BuildDefaultReferenceUsage(SysML2.NET.Core.POCO.Systems.Defin /// The that contains the entire textual notation public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); FeatureTextualNotationBuilder.BuildFeatureSpecialization(poco, stringBuilder); UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); @@ -81,9 +84,11 @@ public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.Definition /// The that contains the entire textual notation public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } @@ -98,12 +103,16 @@ public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsag /// The that contains the entire textual notation public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + OwningMembershipTextualNotationBuilder.BuildOwnedCrossMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } + if (!string.IsNullOrWhiteSpace(poco.DeclaredName)) { stringBuilder.Append(poco.DeclaredName); @@ -111,7 +120,8 @@ public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndU stringBuilder.Append(' '); } - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); } @@ -123,7 +133,9 @@ public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// The that contains the entire textual notation public static void BuildFlowFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + RedefinitionTextualNotationBuilder.BuildFlowFeatureRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); } @@ -146,7 +158,9 @@ public static void BuildPayloadParameter(SysML2.NET.Core.POCO.Systems.Definition /// The that contains the entire textual notation public static void BuildNodeParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildFeatureBinding(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -169,9 +183,11 @@ public static void BuildEmptyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsa /// The that contains the entire textual notation public static void BuildAssignmentTargetParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfFeatureValueIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + FeatureValueTextualNotationBuilder.BuildAssignmentTargetBinding(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); stringBuilder.Append("."); stringBuilder.Append(' '); } @@ -224,7 +240,9 @@ public static void BuildSubjectUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// The that contains the entire textual notation public static void BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureValueTextualNotationBuilder.BuildSatisfactionFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); } @@ -236,9 +254,11 @@ public static void BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.Defin /// The that contains the entire textual notation public static void BuildMetadataBodyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("ref "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco, stringBuilder); FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs index 515cedd6..922ae253 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs index acbf42cc..50209fc8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs index 223a99cc..5835570f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs index b9ace0d9..96bbfb04 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,11 @@ public static partial class RequirementConstraintMembershipTextualNotationBuilde /// The that contains the entire textual notation public static void BuildRequirementConstraintMember(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfConstraintUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); BuildRequirementKind(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfConstraintUsageIterator.MoveNext(); + ConstraintUsageTextualNotationBuilder.BuildRequirementConstraintUsage(ownedRelatedElementOfConstraintUsageIterator.Current, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs index 671fb56c..df6dc74d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs index 1bfb9bea..6afde8fd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs index 24d2edce..acf3e3c8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,10 +42,12 @@ public static partial class RequirementVerificationMembershipTextualNotationBuil /// The that contains the entire textual notation public static void BuildRequirementVerificationMember(SysML2.NET.Core.POCO.Systems.VerificationCases.IRequirementVerificationMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfRequirementUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("verify "); // Assignment Element : kind = 'requirement' - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfRequirementUsageIterator.MoveNext(); + RequirementUsageTextualNotationBuilder.BuildRequirementVerificationUsage(ownedRelatedElementOfRequirementUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs index bd741750..82442930 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,8 +42,10 @@ public static partial class ResultExpressionMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildResultExpressionMember(SysML2.NET.Core.POCO.Kernel.Functions.IResultExpressionMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfExpressionIterator.MoveNext(); + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs index fc6051a9..6cf95b1d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,11 @@ public static partial class ReturnParameterMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("return "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfUsageIterator.MoveNext(); + UsageTextualNotationBuilder.BuildUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); } @@ -55,9 +58,11 @@ public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functi /// The that contains the entire textual notation public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("return "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } @@ -69,7 +74,9 @@ public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Function /// The that contains the entire textual notation public static void BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildEmptyFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -81,7 +88,9 @@ public static void BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions. /// The that contains the entire textual notation public static void BuildConstructorResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfFeatureIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildConstructorResult(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs index b7f95900..0d6e3994 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,6 +42,8 @@ public static partial class SatisfyRequirementUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSatisfyRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.ISatisfyRequirementUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfSubjectMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); stringBuilder.Append("assert "); stringBuilder.Append("not"); @@ -50,10 +53,11 @@ public static void BuildSatisfyRequirementUsage(SysML2.NET.Core.POCO.Systems.Req throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfSubjectMembershipIterator.MoveNext()) { stringBuilder.Append("by "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + SubjectMembershipTextualNotationBuilder.BuildSatisfactionSubjectMember(ownedRelationshipOfSubjectMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs index 1195b653..e0d1f413 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,12 @@ public static partial class SelectExpressionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSelectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ISelectExpression poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append(".? "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildBodyArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs index c4829fc6..075a2ce4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,6 +42,7 @@ public static partial class SendActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSendNode(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); ActionUsageTextualNotationBuilder.BuildActionUsageDeclaration(poco, stringBuilder); stringBuilder.Append("send "); @@ -57,9 +59,11 @@ public static void BuildSendNode(SysML2.NET.Core.POCO.Systems.Actions.ISendActio /// The that contains the entire textual notation public static void BuildSendNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); stringBuilder.Append("send "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); BuildSenderReceiverPart(poco, stringBuilder); } @@ -98,6 +102,14 @@ public static void BuildTransitionSendActionUsage(SysML2.NET.Core.POCO.Systems.A { BuildSendNodeDeclaration(poco, stringBuilder); + if (BuildGroupConditionForTransitionSendActionUsage(poco)) + { + stringBuilder.Append("{"); + TypeTextualNotationBuilder.BuildActionBodyItem(poco, stringBuilder); + stringBuilder.Append("}"); + stringBuilder.Append(' '); + } + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs index 971380f3..05282fd1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -76,6 +77,13 @@ public static void BuildGeneralType(SysML2.NET.Core.POCO.Core.Types.ISpecializat public static void BuildSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, StringBuilder stringBuilder) { + if (BuildGroupConditionForSpecialization(poco)) + { + stringBuilder.Append("specialization "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("subtype "); BuildSpecificType(poco, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs index 56414522..f6a5d022 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,8 +42,10 @@ public static partial class StakeholderMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildStakeholderMember(SysML2.NET.Core.POCO.Systems.Requirements.IStakeholderMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfPartUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfPartUsageIterator.MoveNext(); + PartUsageTextualNotationBuilder.BuildStakeholderUsage(ownedRelatedElementOfPartUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs index e499d380..ed74d6cf 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs index f715fe7f..9b3cf0a1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,11 @@ public static partial class StateSubactionMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append(poco.Kind.ToString().ToLower()); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); } @@ -55,9 +58,11 @@ public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IS /// The that contains the entire textual notation public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append(poco.Kind.ToString().ToLower()); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); } @@ -69,9 +74,11 @@ public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStat /// The that contains the entire textual notation public static void BuildExitActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append(poco.Kind.ToString().ToLower()); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs index 0db5fdab..3515d42c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs index 08d12ffd..e0552084 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,14 +42,15 @@ public static partial class StepTextualNotationBuilder /// The that contains the entire textual notation public static void BuildStep(SysML2.NET.Core.POCO.Kernel.Behaviors.IStep poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("step "); FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs index 20cb543c..cf7cd214 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs index 5b3cacf9..01021c75 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -54,6 +55,13 @@ public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classif public static void BuildSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, StringBuilder stringBuilder) { + if (BuildGroupConditionForSubclassification(poco)) + { + stringBuilder.Append("specialization "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("subclassifier "); throw new System.NotSupportedException("Assigment of non-string value not yet supported"); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs index 3ad8096a..03a9b85a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,8 +42,10 @@ public static partial class SubjectMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildSubjectUsage(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } @@ -54,7 +57,9 @@ public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements. /// The that contains the entire textual notation public static void BuildSatisfactionSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); + ownedRelatedElementOfReferenceUsageIterator.MoveNext(); + ReferenceUsageTextualNotationBuilder.BuildSatisfactionParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs index 0eab1d88..65f53846 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -53,6 +54,13 @@ public static void BuildOwnedSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubs public static void BuildSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, StringBuilder stringBuilder) { + if (BuildGroupConditionForSubsetting(poco)) + { + stringBuilder.Append("specialization "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("subset "); SpecializationTextualNotationBuilder.BuildSpecificType(poco, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs index 20e813c3..f5d4bc4a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,7 +42,9 @@ public static partial class SuccessionAsUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildSourceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); } @@ -53,9 +56,12 @@ public static void BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connection /// The that contains the entire textual notation public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildSourceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("then "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); } @@ -67,12 +73,22 @@ public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connection /// The that contains the entire textual notation public static void BuildSuccessionAsUsage(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); UsageTextualNotationBuilder.BuildUsagePrefix(poco, stringBuilder); + if (BuildGroupConditionForSuccessionAsUsage(poco)) + { + stringBuilder.Append("succession "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("first "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("then "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs index 4765066e..77c0e3d4 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,14 +42,15 @@ public static partial class SuccessionFlowTextualNotationBuilder /// The that contains the entire textual notation public static void BuildSuccessionFlow(SysML2.NET.Core.POCO.Kernel.Interactions.ISuccessionFlow poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("succession "); stringBuilder.Append("flow "); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs index 5cf15568..d54f23d9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs index da9276a0..ee566bb7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,8 +42,11 @@ public static partial class SuccessionTextualNotationBuilder /// The that contains the entire textual notation public static void BuildTransitionSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildEmptyEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); } @@ -65,14 +69,15 @@ public static void BuildSuccessionDeclaration(SysML2.NET.Core.POCO.Kernel.Connec /// The that contains the entire textual notation public static void BuildSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("succession "); BuildSuccessionDeclaration(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs index 3592a3ac..e9f63b7c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,12 +42,14 @@ public static partial class TerminateActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildTerminateNode(SysML2.NET.Core.POCO.Systems.Actions.ITerminateActionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, stringBuilder); ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); stringBuilder.Append("terminate "); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs index 3123697d..e2fc7c20 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -42,6 +43,13 @@ public static partial class TextualRepresentationTextualNotationBuilder public static void BuildTextualRepresentation(SysML2.NET.Core.POCO.Root.Annotations.ITextualRepresentation poco, StringBuilder stringBuilder) { + if (BuildGroupConditionForTextualRepresentation(poco)) + { + stringBuilder.Append("rep "); + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append(' '); + } + stringBuilder.Append("language "); stringBuilder.Append(poco.Language); stringBuilder.Append(poco.Body); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs index f9b3b079..9ac50fa3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,11 @@ public static partial class TransitionFeatureMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildTriggerActionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfAcceptActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("accept "); // Assignment Element : kind = 'trigger' - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfAcceptActionUsageIterator.MoveNext(); + AcceptActionUsageTextualNotationBuilder.BuildTriggerAction(ownedRelatedElementOfAcceptActionUsageIterator.Current, stringBuilder); } @@ -55,9 +58,11 @@ public static void BuildTriggerActionMember(SysML2.NET.Core.POCO.Systems.States. /// The that contains the entire textual notation public static void BuildGuardExpressionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("if "); // Assignment Element : kind = 'guard' - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfExpressionIterator.MoveNext(); + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); } @@ -69,9 +74,11 @@ public static void BuildGuardExpressionMember(SysML2.NET.Core.POCO.Systems.State /// The that contains the entire textual notation public static void BuildEffectBehaviorMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("do "); // Assignment Element : kind = 'effect' - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfActionUsageIterator.MoveNext(); + ActionUsageTextualNotationBuilder.BuildEffectBehaviorUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs index 80890ab0..1114b93b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,13 @@ public static partial class TransitionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext(); + TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("then "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); } @@ -55,8 +60,10 @@ public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.Sta /// The that contains the entire textual notation public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("else "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); } @@ -68,12 +75,25 @@ public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.Sta /// The that contains the entire textual notation public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (BuildGroupConditionForGuardedSuccession(poco)) + { + stringBuilder.Append("succession "); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append(' '); + } stringBuilder.Append("first "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext(); + TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append("then "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } @@ -86,10 +106,15 @@ public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.IT /// The that contains the entire textual notation public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append("then "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -102,31 +127,48 @@ public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.State /// The that contains the entire textual notation public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("transition "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + if (BuildGroupConditionForTransitionUsage(poco)) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + UsageTextualNotationBuilder.BuildUsageDeclaration(poco, stringBuilder); + stringBuilder.Append("first "); stringBuilder.Append(' '); } - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfMembershipIterator.MoveNext(); + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + TransitionFeatureMembershipTextualNotationBuilder.BuildTriggerActionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext()) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + stringBuilder.Append(' '); + } + + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + TransitionFeatureMembershipTextualNotationBuilder.BuildEffectBehaviorMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } stringBuilder.Append("then "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs index 6d17b9a3..91d8ba09 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs index 7689a67b..d05381b2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -55,6 +56,13 @@ public static void BuildTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFe { stringBuilder.Append("featuring "); + if (BuildGroupConditionForTypeFeaturing(poco)) + { + ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); + stringBuilder.Append("of "); + stringBuilder.Append(' '); + } + throw new System.NotSupportedException("Assigment of non-string value not yet supported"); stringBuilder.Append("by "); throw new System.NotSupportedException("Assigment of non-string value not yet supported"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs index 9e681d7b..421ad425 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -129,10 +130,12 @@ public static void BuildCalculationBody(SysML2.NET.Core.POCO.Core.Types.IType po /// The that contains the entire textual notation public static void BuildCalculationBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfResultExpressionMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); BuildCalculationBodyItem(poco, stringBuilder); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfResultExpressionMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } @@ -213,18 +216,20 @@ public static void BuildMetadataBody(SysML2.NET.Core.POCO.Core.Types.IType poco, /// The that contains the entire textual notation public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + if (poco.IsAbstract) { stringBuilder.Append("abstract"); stringBuilder.Append(' '); } - if (poco.OwnedRelationship.Count != 0) + + while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } @@ -236,6 +241,8 @@ public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, S /// The that contains the entire textual notation public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + if (poco.IsSufficient) { stringBuilder.Append("all"); @@ -243,13 +250,16 @@ public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType po } ElementTextualNotationBuilder.BuildIdentification(poco, stringBuilder); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } - throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } stringBuilder.Append(' '); BuildTypeRelationshipPart(poco, stringBuilder); @@ -263,15 +273,17 @@ public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType po /// The that contains the entire textual notation public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfSpecializationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfSpecializationIterator.MoveNext(); + SpecializationTextualNotationBuilder.BuildOwnedSpecialization(ownedRelationshipOfSpecializationIterator.Current, stringBuilder); + + while (ownedRelationshipOfSpecializationIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + SpecializationTextualNotationBuilder.BuildOwnedSpecialization(ownedRelationshipOfSpecializationIterator.Current, stringBuilder); + } } @@ -283,8 +295,10 @@ public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType /// The that contains the entire textual notation public static void BuildConjugationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfConjugationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelationshipOfConjugationIterator.MoveNext(); + ConjugationTextualNotationBuilder.BuildOwnedConjugation(ownedRelationshipOfConjugationIterator.Current, stringBuilder); } @@ -307,16 +321,18 @@ public static void BuildTypeRelationshipPart(SysML2.NET.Core.POCO.Core.Types.ITy /// The that contains the entire textual notation public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfDisjoiningIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("disjoint "); stringBuilder.Append("from "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfDisjoiningIterator.MoveNext(); + DisjoiningTextualNotationBuilder.BuildOwnedDisjoining(ownedRelationshipOfDisjoiningIterator.Current, stringBuilder); + + while (ownedRelationshipOfDisjoiningIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + DisjoiningTextualNotationBuilder.BuildOwnedDisjoining(ownedRelationshipOfDisjoiningIterator.Current, stringBuilder); + } } @@ -328,15 +344,17 @@ public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poc /// The that contains the entire textual notation public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfUnioningIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("unions "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfUnioningIterator.MoveNext(); + UnioningTextualNotationBuilder.BuildUnioning(ownedRelationshipOfUnioningIterator.Current, stringBuilder); + + while (ownedRelationshipOfUnioningIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + UnioningTextualNotationBuilder.BuildUnioning(ownedRelationshipOfUnioningIterator.Current, stringBuilder); + } } @@ -348,15 +366,17 @@ public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, /// The that contains the entire textual notation public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfIntersectingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("intersects "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfIntersectingIterator.MoveNext(); + IntersectingTextualNotationBuilder.BuildIntersecting(ownedRelationshipOfIntersectingIterator.Current, stringBuilder); + + while (ownedRelationshipOfIntersectingIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + IntersectingTextualNotationBuilder.BuildIntersecting(ownedRelationshipOfIntersectingIterator.Current, stringBuilder); + } } @@ -368,15 +388,17 @@ public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType p /// The that contains the entire textual notation public static void BuildDifferencingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfDifferencingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("differences "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfDifferencingIterator.MoveNext(); + DifferencingTextualNotationBuilder.BuildDifferencing(ownedRelationshipOfDifferencingIterator.Current, stringBuilder); + + while (ownedRelationshipOfDifferencingIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - stringBuilder.Append(' '); - } + DifferencingTextualNotationBuilder.BuildDifferencing(ownedRelationshipOfDifferencingIterator.Current, stringBuilder); + } } @@ -421,10 +443,17 @@ public static void BuildFunctionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, /// The that contains the entire textual notation public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - if (poco.OwnedRelationship.Count != 0) + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfResultExpressionMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfReturnParameterMembershipIterator.MoveNext()) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + if (ownedRelationshipOfResultExpressionMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs index 184ffe9e..808c514a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs index c72a6019..238a8528 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -52,12 +53,14 @@ public static void BuildUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// The that contains the entire textual notation public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { + if (poco.Direction.HasValue) { stringBuilder.Append(poco.Direction.ToString().ToLower()); stringBuilder.Append(' '); } + if (poco.IsDerived) { stringBuilder.Append("derived"); @@ -65,6 +68,7 @@ public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsag } throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + if (poco.IsConstant) { stringBuilder.Append("constant"); @@ -83,6 +87,7 @@ public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsag public static void BuildBasicUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { BuildRefPrefix(poco, stringBuilder); + if (poco.isReference) { stringBuilder.Append("ref"); @@ -100,10 +105,12 @@ public static void BuildBasicUsagePrefix(SysML2.NET.Core.POCO.Systems.Definition /// The that contains the entire textual notation public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("end"); - if (poco.OwnedRelationship.Count != 0) + + if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + OwningMembershipTextualNotationBuilder.BuildOwnedCrossFeatureMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); stringBuilder.Append(' '); } @@ -118,7 +125,9 @@ public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAn /// The that contains the entire textual notation public static void BuildUsageExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfOwningMembershipIterator.MoveNext(); + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs index 200bbf75..2bff9828 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs index edb9dbb8..459abd46 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs index 47d4575c..e4e42d21 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -55,8 +56,10 @@ public static void BuildVariantUsageMember(SysML2.NET.Core.POCO.Systems.Definiti /// The that contains the entire textual notation public static void BuildEnumerationUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfEnumerationUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfEnumerationUsageIterator.MoveNext(); + EnumerationUsageTextualNotationBuilder.BuildEnumeratedValue(ownedRelatedElementOfEnumerationUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs index 5b56142f..18c99b5c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs index 00116d92..699b3e55 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs index 8dcc0e5f..acad0ebd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs index 912be900..6f679e46 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,9 +42,11 @@ public static partial class ViewRenderingMembershipTextualNotationBuilder /// The that contains the entire textual notation public static void BuildViewRenderingMember(SysML2.NET.Core.POCO.Systems.Views.IViewRenderingMembership poco, StringBuilder stringBuilder) { + using var ownedRelatedElementOfRenderingUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("render "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ownedRelatedElementOfRenderingUsageIterator.MoveNext(); + RenderingUsageTextualNotationBuilder.BuildViewRenderingUsage(ownedRelatedElementOfRenderingUsageIterator.Current, stringBuilder); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs index 1269af97..d5f27452 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs index 8f9952aa..ed73cc1f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs index fb78fe85..58d03e70 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs index a76da1f8..da48d0a7 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs index cccd2e57..aa1baa19 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs @@ -24,6 +24,7 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,14 +42,17 @@ public static partial class WhileLoopActionUsageTextualNotationBuilder /// The that contains the entire textual notation public static void BuildWhileLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IWhileLoopActionUsage poco, StringBuilder stringBuilder) { + using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); - if (poco.OwnedRelationship.Count != 0) + ownedRelationshipOfParameterMembershipIterator.MoveNext(); + ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { stringBuilder.Append("until "); - throw new System.NotSupportedException("Assigment of enumerable not supported yet"); + ParameterMembershipTextualNotationBuilder.BuildExpressionParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); stringBuilder.Append(";"); stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..986169e2 --- /dev/null +++ b/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Connections; + + /// + /// Hand-coded part of the + /// + public static partial class BindingConnectorAsUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the BindingConnectorAsUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForBindingConnectorAsUsage(IBindingConnectorAsUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs new file mode 100644 index 00000000..dd44157a --- /dev/null +++ b/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Annotations; + + /// + /// Hand-coded part of the + /// + public static partial class CommentTextualNotationBuilder + { + /// + /// Builds the conditional part for the Comment rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForComment(IComment poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs new file mode 100644 index 00000000..73a258ad --- /dev/null +++ b/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Types; + + /// + /// Hand-coded part of the + /// + public static partial class ConjugationTextualNotationBuilder + { + /// + /// Builds the conditional part for the Conjugation rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForConjugation(IConjugation poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs new file mode 100644 index 00000000..d9010de3 --- /dev/null +++ b/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Dependencies; + + /// + /// Hand-coded part of the + /// + public static partial class DependencyTextualNotationBuilder + { + /// + /// Builds the conditional part for the DependencyDeclaration rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForDependencyDeclaration(IDependency poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs new file mode 100644 index 00000000..c70de6d5 --- /dev/null +++ b/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Types; + + /// + /// Hand-coded part of the + /// + public static partial class DisjoiningTextualNotationBuilder + { + /// + /// Builds the conditional part for the Disjoining rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForDisjoining(IDisjoining poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs new file mode 100644 index 00000000..35c3612b --- /dev/null +++ b/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Features; + + /// + /// Hand-coded part of the + /// + public static partial class FeatureInvertingTextualNotationBuilder + { + /// + /// Builds the conditional part for the FeatureInverting rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForFeatureInverting(IFeatureInverting poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/IfActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..40a398f5 --- /dev/null +++ b/SysML2.NET/TextualNotation/IfActionUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of the + /// + public static partial class IfActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the IfNode rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForIfNode(IIfActionUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/InvocationExpressionTextualNotationBuilder.cs new file mode 100644 index 00000000..8cd8fe57 --- /dev/null +++ b/SysML2.NET/TextualNotation/InvocationExpressionTextualNotationBuilder.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Kernel.Expressions; + + /// + /// Hand-coded part of the + /// + public static partial class InvocationExpressionTextualNotationBuilder + { + /// + /// Build the non-existing InvocationTypeMember rule + /// + /// The + /// The + private static void BuildInvocationTypeMember(InvocationExpression invocationExpression, StringBuilder stringBuilder) + { + } + } +} diff --git a/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs new file mode 100644 index 00000000..1554aab6 --- /dev/null +++ b/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Kernel.Metadata; + + /// + /// Hand-coded part of the + /// + public static partial class MetadataFeatureTextualNotationBuilder + { + /// + /// Builds the conditional part for the MetadataFeatureDeclaration rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForMetadataFeatureDeclaration(IMetadataFeature poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..7fd6d5a7 --- /dev/null +++ b/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Metadata; + + /// + /// Hand-coded part of the + /// + public static partial class MetadataUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the MetadataUsageDeclaration rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForMetadataUsageDeclaration(IMetadataUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/PackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/PackageTextualNotationBuilder.cs new file mode 100644 index 00000000..0ea35d1e --- /dev/null +++ b/SysML2.NET/TextualNotation/PackageTextualNotationBuilder.cs @@ -0,0 +1,41 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using System.Text; + + using SysML2.NET.Core.POCO.Kernel.Packages; + + /// + /// Hand-coded part of the + /// + public static partial class PackageTextualNotationBuilder + { + /// + /// Build the non-existing Filter Package import rule + /// + /// The package + /// The + private static void BuildFilterPackageImport(Package package, StringBuilder stringBuilder) + { + } + } +} diff --git a/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..313f0785 --- /dev/null +++ b/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of + /// + public static partial class PerformActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the TransitionPerformActionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionPerformActionUsage(IPerformActionUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs new file mode 100644 index 00000000..9033fc53 --- /dev/null +++ b/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Features; + + /// + /// Hand-coded part of the + /// + public static partial class RedefinitionTextualNotationBuilder + { + /// + /// Builds the conditional part for the Redefinition rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForRedefinition(IRedefinition poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..67383328 --- /dev/null +++ b/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Actions; + + /// + /// Hand-coded part of the + /// + public static partial class SendActionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the TransitionSendActionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionSendActionUsage(ISendActionUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs new file mode 100644 index 00000000..774439f3 --- /dev/null +++ b/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Types; + + /// + /// Hand-coded part of the + /// + public static partial class SpecializationTextualNotationBuilder + { + /// + /// Builds the conditional part for the Specialization rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForSpecialization(ISpecialization poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs new file mode 100644 index 00000000..98647c2c --- /dev/null +++ b/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Classifiers; + + /// + /// Hand-coded part of the + /// + public static partial class SubclassificationTextualNotationBuilder + { + /// + /// Builds the conditional part for the Subclassification rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForSubclassification(ISubclassification poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs new file mode 100644 index 00000000..ddde874f --- /dev/null +++ b/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Features; + + /// + /// Hand-coded part of the + /// + public static partial class SubsettingTextualNotationBuilder + { + /// + /// Builds the conditional part for the Subsetting rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForSubsetting(ISubsetting poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..664035d7 --- /dev/null +++ b/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.Connections; + + /// + /// Hand-coded part of the + /// + public static partial class SuccessionAsUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the SuccessionAsUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForSuccessionAsUsage(ISuccessionAsUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs new file mode 100644 index 00000000..0ebcf161 --- /dev/null +++ b/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Root.Annotations; + + /// + /// Hand-coded part of the + /// + public static partial class TextualRepresentationTextualNotationBuilder + { + /// + /// Builds the conditional part for the TextualRepresentation rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTextualRepresentation(ITextualRepresentation poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs new file mode 100644 index 00000000..284bced0 --- /dev/null +++ b/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs @@ -0,0 +1,50 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Systems.States; + + /// + /// Hand-coded part of the + /// + public static partial class TransitionUsageTextualNotationBuilder + { + /// + /// Builds the conditional part for the GuardedSuccession rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForGuardedSuccession(ITransitionUsage poco) + { + return false; + } + + /// + /// Builds the conditional part for the TransitionUsage rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTransitionUsage(ITransitionUsage poco) + { + return false; + } + } +} diff --git a/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs new file mode 100644 index 00000000..8d8914da --- /dev/null +++ b/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs @@ -0,0 +1,40 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using SysML2.NET.Core.POCO.Core.Features; + + /// + /// Hand-coded part of the + /// + public static partial class TypeFeaturingTextualNotationBuilder + { + /// + /// Builds the conditional part for the TypeFeaturing rule + /// + /// The + /// The assertion of the condition + private static bool BuildGroupConditionForTypeFeaturing(ITypeFeaturing poco) + { + return false; + } + } +} From 0cd63712e2852599d4f829b79bfbf9118740581d Mon Sep 17 00:00:00 2001 From: atheate Date: Wed, 4 Mar 2026 13:37:32 +0100 Subject: [PATCH 09/15] [WIP] Implementation of hand-coded conditional checks --- ...AcceptActionUsageTextualNotationBuilder.cs | 2 +- .../ActionUsageTextualNotationBuilder.cs | 4 +- ...gnmentActionUsageTextualNotationBuilder.cs | 5 +- ...gConnectorAsUsageTextualNotationBuilder.cs | 2 +- .../CommentTextualNotationBuilder.cs | 2 +- .../CommonTextualNotationBuilder.cs | 54 +++++++++++++++++++ .../ConjugationTextualNotationBuilder.cs | 2 +- .../DependencyTextualNotationBuilder.cs | 2 +- .../DisjoiningTextualNotationBuilder.cs | 2 +- .../FeatureInvertingTextualNotationBuilder.cs | 4 +- .../IfActionUsageTextualNotationBuilder.cs | 5 +- .../MetadataFeatureTextualNotationBuilder.cs | 2 +- .../MetadataUsageTextualNotationBuilder.cs | 2 +- ...erformActionUsageTextualNotationBuilder.cs | 2 +- .../RedefinitionTextualNotationBuilder.cs | 2 +- .../SendActionUsageTextualNotationBuilder.cs | 2 +- .../SpecializationTextualNotationBuilder.cs | 2 +- ...SubclassificationTextualNotationBuilder.cs | 2 +- .../SubsettingTextualNotationBuilder.cs | 2 +- ...SuccessionAsUsageTextualNotationBuilder.cs | 2 +- ...ualRepresentationTextualNotationBuilder.cs | 2 +- .../TransitionUsageTextualNotationBuilder.cs | 4 +- .../TypeFeaturingTextualNotationBuilder.cs | 2 +- 23 files changed, 86 insertions(+), 24 deletions(-) create mode 100644 SysML2.NET/TextualNotation/CommonTextualNotationBuilder.cs diff --git a/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs index c48d60bd..4a228022 100644 --- a/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AcceptActionUsageTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class AcceptActionUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForTransitionAcceptActionUsage(IAcceptActionUsage poco) { - return false; + return poco.OwnedRelationship.Count != 0; } } } diff --git a/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs index a35780dd..2345afd7 100644 --- a/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/ActionUsageTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class ActionUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForActionBodyParameter(IActionUsage poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); } /// @@ -44,7 +44,7 @@ private static bool BuildGroupConditionForActionBodyParameter(IActionUsage poco) /// The assertion of the condition private static bool BuildGroupConditionForAssignmentNodeDeclaration(IActionUsage poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); } } } diff --git a/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs index cd8d98ae..a6aa6abc 100644 --- a/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AssignmentActionUsageTextualNotationBuilder.cs @@ -20,6 +20,9 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; + + using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Systems.Actions; /// @@ -34,7 +37,7 @@ public static partial class AssignmentActionUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForTransitionAssignmentActionUsage(IAssignmentActionUsage poco) { - return false; + return poco.OwnedRelationship.OfType().Any(); } } } diff --git a/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs index 986169e2..448b9cf4 100644 --- a/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class BindingConnectorAsUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForBindingConnectorAsUsage(IBindingConnectorAsUsage poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); } } } diff --git a/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs index dd44157a..02fa70d2 100644 --- a/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/CommentTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class CommentTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForComment(IComment poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco) || poco.ownedAnnotation.Count != 0; } } } diff --git a/SysML2.NET/TextualNotation/CommonTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/CommonTextualNotationBuilder.cs new file mode 100644 index 00000000..08b21374 --- /dev/null +++ b/SysML2.NET/TextualNotation/CommonTextualNotationBuilder.cs @@ -0,0 +1,54 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// 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.TextualNotation +{ + using System.Linq; + + using SysML2.NET.Core.POCO.Core.Features; + using SysML2.NET.Core.POCO.Root.Elements; + using SysML2.NET.Core.POCO.Systems.DefinitionAndUsage; + + /// + /// Textual Notation Builder that provides common features, usable by others builder + /// + public static class CommonTextualNotationBuilder + { + /// + /// Asserts that an defines properties used by the Identification rule + /// + /// The + /// True if the or is defined + public static bool DoesDefinesIdentificationProperties(IElement poco) + { + return !string.IsNullOrWhiteSpace(poco.DeclaredName) || !string.IsNullOrWhiteSpace(poco.DeclaredShortName); + } + + /// + /// Asserts that an defines properties used by the UsageDeclaration rule + /// + /// The + /// True if respects the or have not empty + public static bool DoesDefinesUsageDeclaration(IElement poco) + { + return DoesDefinesIdentificationProperties(poco) || poco.OwnedRelationship.OfType().Any(); + } + } +} diff --git a/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs index 73a258ad..cb62745f 100644 --- a/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/ConjugationTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class ConjugationTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForConjugation(IConjugation poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs index d9010de3..1c400c22 100644 --- a/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/DependencyTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class DependencyTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForDependencyDeclaration(IDependency poco) { - return false; + return poco.Client.Count != 0 && poco.Supplier.Count != 0; } } } diff --git a/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs index c70de6d5..6d39056b 100644 --- a/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/DisjoiningTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class DisjoiningTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForDisjoining(IDisjoining poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs index 35c3612b..d4d7a919 100644 --- a/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/FeatureInvertingTextualNotationBuilder.cs @@ -20,6 +20,8 @@ namespace SysML2.NET.TextualNotation { + using System.Buffers; + using SysML2.NET.Core.POCO.Core.Features; /// @@ -34,7 +36,7 @@ public static partial class FeatureInvertingTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForFeatureInverting(IFeatureInverting poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/IfActionUsageTextualNotationBuilder.cs index 40a398f5..4639c28c 100644 --- a/SysML2.NET/TextualNotation/IfActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/IfActionUsageTextualNotationBuilder.cs @@ -20,6 +20,9 @@ namespace SysML2.NET.TextualNotation { + using System.Linq; + + using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Systems.Actions; /// @@ -34,7 +37,7 @@ public static partial class IfActionUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForIfNode(IIfActionUsage poco) { - return false; + return poco.OwnedRelationship.OfType().Count() != 0; } } } diff --git a/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs index 1554aab6..e4f7f8f6 100644 --- a/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/MetadataFeatureTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class MetadataFeatureTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForMetadataFeatureDeclaration(IMetadataFeature poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs index 7fd6d5a7..dea71f2f 100644 --- a/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/MetadataUsageTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class MetadataUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForMetadataUsageDeclaration(IMetadataUsage poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs index 313f0785..eb43b430 100644 --- a/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/PerformActionUsageTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class PerformActionUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForTransitionPerformActionUsage(IPerformActionUsage poco) { - return false; + return poco.OwnedRelationship.Count != 0; } } } diff --git a/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs index 9033fc53..6386e12f 100644 --- a/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/RedefinitionTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class RedefinitionTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForRedefinition(IRedefinition poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs index 67383328..3650ac5b 100644 --- a/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/SendActionUsageTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class SendActionUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForTransitionSendActionUsage(ISendActionUsage poco) { - return false; + return poco.OwnedRelationship.Count != 0; } } } diff --git a/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs index 774439f3..2b9367b2 100644 --- a/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/SpecializationTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class SpecializationTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForSpecialization(ISpecialization poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs index 98647c2c..ece86941 100644 --- a/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/SubclassificationTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class SubclassificationTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForSubclassification(ISubclassification poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs index ddde874f..bda14aa0 100644 --- a/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/SubsettingTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class SubsettingTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForSubsetting(ISubsetting poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs index 664035d7..6881b77d 100644 --- a/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/SuccessionAsUsageTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class SuccessionAsUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForSuccessionAsUsage(ISuccessionAsUsage poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); } } } diff --git a/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs index 0ebcf161..ce7ea3e0 100644 --- a/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/TextualRepresentationTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class TextualRepresentationTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForTextualRepresentation(ITextualRepresentation poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } diff --git a/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs index 284bced0..f455d8b5 100644 --- a/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/TransitionUsageTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class TransitionUsageTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForGuardedSuccession(ITransitionUsage poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); } /// @@ -44,7 +44,7 @@ private static bool BuildGroupConditionForGuardedSuccession(ITransitionUsage poc /// The assertion of the condition private static bool BuildGroupConditionForTransitionUsage(ITransitionUsage poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesUsageDeclaration(poco); } } } diff --git a/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs index 8d8914da..570b7fbb 100644 --- a/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/TypeFeaturingTextualNotationBuilder.cs @@ -34,7 +34,7 @@ public static partial class TypeFeaturingTextualNotationBuilder /// The assertion of the condition private static bool BuildGroupConditionForTypeFeaturing(ITypeFeaturing poco) { - return false; + return CommonTextualNotationBuilder.DoesDefinesIdentificationProperties(poco); } } } From d24753817ccf75f1ff728a1ba53db59e086c25a3 Mon Sep 17 00:00:00 2001 From: atheate Date: Thu, 5 Mar 2026 15:18:12 +0100 Subject: [PATCH 10/15] [WIP] Enhance generaion but missing logic (FeatureMembership issue) --- .../HandleBarHelpers/RulesHelper.cs | 168 +++++++++----- ...AcceptActionUsageTextualNotationBuilder.cs | 13 +- .../ActionUsageTextualNotationBuilder.cs | 18 +- .../ActorMembershipTextualNotationBuilder.cs | 6 +- .../AnnotationTextualNotationBuilder.cs | 23 +- ...gConnectorAsUsageTextualNotationBuilder.cs | 12 +- .../BindingConnectorTextualNotationBuilder.cs | 6 +- ...BooleanExpressionTextualNotationBuilder.cs | 6 +- .../ClassifierTextualNotationBuilder.cs | 30 ++- ...CollectExpressionTextualNotationBuilder.cs | 12 +- .../CommentTextualNotationBuilder.cs | 12 +- ...tedPortDefinitionTextualNotationBuilder.cs | 6 +- .../ConnectionUsageTextualNotationBuilder.cs | 30 ++- .../ConnectorTextualNotationBuilder.cs | 36 ++- ...tructorExpressionTextualNotationBuilder.cs | 12 +- .../DefinitionTextualNotationBuilder.cs | 6 +- .../DependencyTextualNotationBuilder.cs | 6 +- ...tFilterMembershipTextualNotationBuilder.cs | 12 +- ...FeatureMembershipTextualNotationBuilder.cs | 30 ++- ...ntOccurrenceUsageTextualNotationBuilder.cs | 6 +- .../ExpressionTextualNotationBuilder.cs | 12 +- ...reChainExpressionTextualNotationBuilder.cs | 12 +- .../FeatureChainingTextualNotationBuilder.cs | 2 +- ...FeatureMembershipTextualNotationBuilder.cs | 166 ++++++++++++-- ...ferenceExpressionTextualNotationBuilder.cs | 36 ++- .../FeatureTextualNotationBuilder.cs | 214 +++++++++++++++--- .../FeatureTypingTextualNotationBuilder.cs | 2 +- .../FeatureValueTextualNotationBuilder.cs | 93 +++++++- .../FlowEndTextualNotationBuilder.cs | 12 +- .../FlowTextualNotationBuilder.cs | 6 +- .../FlowUsageTextualNotationBuilder.cs | 2 +- ...orLoopActionUsageTextualNotationBuilder.cs | 18 +- ...ConcernMembershipTextualNotationBuilder.cs | 6 +- .../IfActionUsageTextualNotationBuilder.cs | 12 +- .../IndexExpressionTextualNotationBuilder.cs | 12 +- .../InterfaceUsageTextualNotationBuilder.cs | 30 ++- .../InvariantTextualNotationBuilder.cs | 6 +- ...ocationExpressionTextualNotationBuilder.cs | 30 ++- .../LibraryPackageTextualNotationBuilder.cs | 6 +- .../LiteralBooleanTextualNotationBuilder.cs | 2 +- .../MembershipImportTextualNotationBuilder.cs | 2 +- .../MembershipTextualNotationBuilder.cs | 11 +- ...aAccessExpressionTextualNotationBuilder.cs | 12 +- .../MetadataFeatureTextualNotationBuilder.cs | 30 ++- .../MetadataUsageTextualNotationBuilder.cs | 24 +- ...MultiplicityRangeTextualNotationBuilder.cs | 24 +- .../NamespaceTextualNotationBuilder.cs | 6 +- ...jectiveMembershipTextualNotationBuilder.cs | 6 +- ...urrenceDefinitionTextualNotationBuilder.cs | 12 +- .../OccurrenceUsageTextualNotationBuilder.cs | 6 +- ...peratorExpressionTextualNotationBuilder.cs | 126 +++++++++-- .../OwningMembershipTextualNotationBuilder.cs | 78 +++++-- .../PackageTextualNotationBuilder.cs | 18 +- ...rameterMembershipTextualNotationBuilder.cs | 96 ++++++-- .../PortDefinitionTextualNotationBuilder.cs | 8 +- .../PortUsageTextualNotationBuilder.cs | 12 +- .../RedefinitionTextualNotationBuilder.cs | 4 +- .../ReferenceUsageTextualNotationBuilder.cs | 54 ++++- ...straintMembershipTextualNotationBuilder.cs | 6 +- ...icationMembershipTextualNotationBuilder.cs | 8 +- ...ressionMembershipTextualNotationBuilder.cs | 6 +- ...rameterMembershipTextualNotationBuilder.cs | 24 +- ...yRequirementUsageTextualNotationBuilder.cs | 6 +- .../SelectExpressionTextualNotationBuilder.cs | 12 +- .../SendActionUsageTextualNotationBuilder.cs | 6 +- ...eholderMembershipTextualNotationBuilder.cs | 6 +- ...bactionMembershipTextualNotationBuilder.cs | 18 +- .../StepTextualNotationBuilder.cs | 6 +- ...SubclassificationTextualNotationBuilder.cs | 6 +- ...SubjectMembershipTextualNotationBuilder.cs | 12 +- ...SuccessionAsUsageTextualNotationBuilder.cs | 30 ++- .../SuccessionFlowTextualNotationBuilder.cs | 6 +- .../SuccessionTextualNotationBuilder.cs | 18 +- ...minateActionUsageTextualNotationBuilder.cs | 6 +- ...FeatureMembershipTextualNotationBuilder.cs | 24 +- .../TransitionUsageTextualNotationBuilder.cs | 90 ++++++-- .../TypeFeaturingTextualNotationBuilder.cs | 6 +- .../TypeTextualNotationBuilder.cs | 92 ++++++-- .../UsageTextualNotationBuilder.cs | 12 +- ...VariantMembershipTextualNotationBuilder.cs | 12 +- ...nderingMembershipTextualNotationBuilder.cs | 6 +- ...leLoopActionUsageTextualNotationBuilder.cs | 12 +- 82 files changed, 1698 insertions(+), 390 deletions(-) diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index 55b4ae0b..226423f1 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -27,7 +27,6 @@ namespace SysML2.NET.CodeGenerator.HandleBarHelpers using HandlebarsDotNet; using SysML2.NET.CodeGenerator.Extensions; - using SysML2.NET.CodeGenerator.Grammar; using SysML2.NET.CodeGenerator.Grammar.Model; using uml4net.Classification; @@ -70,7 +69,9 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) if (namedElement is IClass umlClass) { - ProcessAlternatives(writer, umlClass, textualRule.Alternatives, allRules, definedIterators: null); + var ruleGenerationContext = new RuleGenerationContext(); + ruleGenerationContext.AllRules.AddRange(allRules); + ProcessAlternatives(writer, umlClass, textualRule.Alternatives, ruleGenerationContext); } }); } @@ -81,21 +82,18 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) /// The used to write into output content /// The related /// The collection of alternatives to process - /// A collection of all existing rules - /// Collection of that keep tracks of defined iterator - /// An optional that is calling this function - private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, - IReadOnlyCollection rules, List definedIterators, RuleElement callerElement = null) + /// The current + private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection alternatives, RuleGenerationContext ruleGenerationContext) { - definedIterators ??= []; + ruleGenerationContext.DefinedIterators ??= []; if (alternatives.Count == 1) { var alternative = alternatives.ElementAt(0); var elements = alternative.Elements; - DeclareAllRequiredIterators(writer, umlClass, rules, alternative, definedIterators); + DeclareAllRequiredIterators(writer, umlClass, alternative, ruleGenerationContext); - if (callerElement is { IsOptional: true, IsCollection: false }) + if (ruleGenerationContext.CallerRule is { IsOptional: true, IsCollection: false }) { var targetPropertiesName = elements.OfType().Select(x => x.Property).Distinct().ToList(); var allProperties = umlClass.QueryAllProperties(); @@ -114,7 +112,7 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas if (property.QueryIsEnumerable()) { var assigment = elements.OfType().First(x => x.Property == targetPropertyName); - var iterator = definedIterators.FirstOrDefault(x => x.ApplicableRuleElements.Contains(assigment)); + var iterator = ruleGenerationContext.DefinedIterators.FirstOrDefault(x => x.ApplicableRuleElements.Contains(assigment)); ifStatementContent.Add(iterator == null ? $"BuildGroupConditionFor{assigment.TextualNotationRule.RuleName}(poco)" : property.QueryIfStatementContentForNonEmpty(iterator.IteratorVariableName)); } else @@ -129,27 +127,32 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas foreach (var textualRuleElement in elements) { - ProcessRuleElement(writer, umlClass, rules, textualRuleElement, definedIterators); + var previousCaller = ruleGenerationContext.CallerRule; + ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; } } else - { + { writer.WriteSafeString($"{Environment.NewLine}if(BuildGroupConditionFor{alternative.TextualNotationRule.RuleName}(poco))"); writer.WriteSafeString($"{Environment.NewLine}{{{Environment.NewLine}"); foreach (var textualRuleElement in elements) { - ProcessRuleElement(writer, umlClass, rules, textualRuleElement, definedIterators); + ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext); } } - + + writer.WriteSafeString($"stringBuilder.Append(' ');{Environment.NewLine}"); writer.WriteSafeString($"}}{Environment.NewLine}"); } else { foreach (var textualRuleElement in elements) { - ProcessRuleElement(writer, umlClass, rules, textualRuleElement, definedIterators); + var previousCaller = ruleGenerationContext.CallerRule; + ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; } } } @@ -164,25 +167,24 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas /// /// The used to write into output content /// The related - /// A collection of all existing rules /// The to process - /// Collection of that keep tracks of defined iterator - private static void DeclareAllRequiredIterators(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, Alternatives alternatives, List definedIterators) + /// + private static void DeclareAllRequiredIterators(EncodedTextWriter writer, IClass umlClass, Alternatives alternatives, RuleGenerationContext ruleGenerationContext) { foreach (var ruleElement in alternatives.Elements) { switch (ruleElement) { case AssignmentElement { Value: NonTerminalElement } assignmentElement: - DeclareIteratorIfRequired(writer, umlClass, rules, assignmentElement, definedIterators); + DeclareIteratorIfRequired(writer, umlClass, assignmentElement, ruleGenerationContext); break; case AssignmentElement { Value: GroupElement } assignmentElement: - DeclareIteratorIfRequired(writer, umlClass, rules, assignmentElement, definedIterators); + DeclareIteratorIfRequired(writer, umlClass, assignmentElement, ruleGenerationContext); break; case GroupElement groupElement: foreach (var groupElementAlternative in groupElement.Alternatives) { - DeclareAllRequiredIterators(writer, umlClass, rules, groupElementAlternative, definedIterators); + DeclareAllRequiredIterators(writer, umlClass, groupElementAlternative, ruleGenerationContext); } break; @@ -195,53 +197,47 @@ private static void DeclareAllRequiredIterators(EncodedTextWriter writer, IClass /// /// The used to write into output content /// The related - /// A collection of all existing rules /// The to process - /// Collection of that keep tracks of defined iterator + /// /// If the type of the is not supported - private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, RuleElement textualRuleElement, List definedIterators) + private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass, RuleElement textualRuleElement, RuleGenerationContext ruleGenerationContext) { switch (textualRuleElement) { case TerminalElement terminalElement: var valueToAdd = terminalElement.Value; - if (valueToAdd!="<" && valueToAdd!=">") + if (valueToAdd.Length > 1) { - if (valueToAdd == "=") - { - valueToAdd = $" {valueToAdd} "; - } - else - { - valueToAdd += ' '; - } + valueToAdd += ' '; } writer.WriteSafeString($"stringBuilder.Append(\"{valueToAdd}\");"); break; case NonTerminalElement nonTerminalElement: - ProcessNonTerminalElement(writer, umlClass, rules, definedIterators, nonTerminalElement, "poco"); + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, "poco", umlClass, ruleGenerationContext); break; case GroupElement groupElement: + ruleGenerationContext.CallerRule = groupElement; + if (groupElement.IsCollection) { var assignmentRule = groupElement.Alternatives.SelectMany(x => x.Elements).FirstOrDefault(x => x is AssignmentElement { Value: NonTerminalElement }); if (assignmentRule is AssignmentElement assignmentElement) { - var iteratorToUse = definedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + var iteratorToUse = ruleGenerationContext.DefinedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); writer.WriteSafeString($"{Environment.NewLine}while({iteratorToUse.IteratorVariableName}.MoveNext()){Environment.NewLine}"); } writer.WriteSafeString($"{{{Environment.NewLine}"); - ProcessAlternatives(writer, umlClass, groupElement.Alternatives, rules, definedIterators, groupElement); + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, ruleGenerationContext); writer.WriteSafeString($"{Environment.NewLine}}}"); } else { - ProcessAlternatives(writer, umlClass, groupElement.Alternatives, rules,definedIterators, groupElement); + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, ruleGenerationContext); } if (!groupElement.IsOptional) @@ -260,14 +256,14 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass { if (assignmentElement.Value is NonTerminalElement nonTerminalElement) { - var iteratorToUse = definedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + var iteratorToUse = ruleGenerationContext.DefinedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); if (assignmentElement.Container is not GroupElement { IsCollection: true } && assignmentElement.Container is not GroupElement { IsOptional: true }) { writer.WriteSafeString($"{iteratorToUse.IteratorVariableName}.MoveNext();{Environment.NewLine}"); } - ProcessNonTerminalElement(writer, umlClass, rules, definedIterators, nonTerminalElement, $"{iteratorToUse.IteratorVariableName}.Current"); + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, $"{iteratorToUse.IteratorVariableName}.Current", umlClass, ruleGenerationContext); } else { @@ -289,7 +285,7 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass { writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()});"); } - else if(targetProperty.QueryIsBool()) + else if (targetProperty.QueryIsBool()) { if (assignmentElement.Value is TerminalElement terminalElement) { @@ -297,13 +293,27 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass } else { - writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of bool with rule element value different than TerminalElement not supported\");"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.ToString().ToLower());"); } } else if (targetProperty.QueryIsEnum()) { writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()}.ToString().ToLower());"); } + else if(targetProperty.QueryIsReferenceProperty()) + { + if (assignmentElement.Value is NonTerminalElement nonTerminalElement) + { + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + ProcessNonTerminalElement(writer, targetProperty.Type as IClass, nonTerminalElement, $"poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}", umlClass, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; + } + else + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of reference element not supported yet for this case\");"); + } + } else { writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of non-string value not yet supported\");"); @@ -318,10 +328,11 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass break; case NonParsingAssignmentElement nonParsingAssignmentElement: - writer.WriteSafeString($"// Assignment Element : {nonParsingAssignmentElement.PropertyName} {nonParsingAssignmentElement.Operator} {nonParsingAssignmentElement.Value}"); + writer.WriteSafeString($"// NonParsing Assignment Element : {nonParsingAssignmentElement.PropertyName} {nonParsingAssignmentElement.Operator} {nonParsingAssignmentElement.Value} => Does not have to be process"); break; case ValueLiteralElement valueLiteralElement: - writer.WriteSafeString($"// Value Literal Element : {valueLiteralElement.Value}"); + writer.WriteSafeString(valueLiteralElement.Value == "[QualifiedName]" ? "stringBuilder.Append(poco.qualifiedName);" : "throw new System.NotSupportedException(\"Value Literal different than QualifiedName not supported\");"); + break; default: throw new ArgumentException("Unknown element type"); @@ -335,13 +346,13 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass /// /// The used to write into output content /// The related - /// A collection of all existing rules /// The to process - /// Collection of that keep tracks of defined iterator /// The name of the variable that should be used to call the non-terminal method - private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, List definedIterators, NonTerminalElement nonTerminalElement, string variableName) + /// Gets the that initially calls this function + /// + private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass umlClass, NonTerminalElement nonTerminalElement, string variableName, IClass callerClass, RuleGenerationContext ruleGenerationContext) { - var referencedRule = rules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); + var referencedRule = ruleGenerationContext.AllRules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); string typeTarget; @@ -353,31 +364,50 @@ private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass u { typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; } + + var isForProperty = variableName.Contains('.'); + + if (isForProperty) + { + writer.WriteSafeString($"{Environment.NewLine}if ({variableName} != null){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + } - if (typeTarget != umlClass.Name) + if (typeTarget != callerClass.Name) { var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); if (targetType != null) { - if (targetType is IClass targetClass && (umlClass.QueryAllGeneralClassifiers().Contains(targetClass) || variableName != "poco")) + if (targetType is IClass targetClass && (umlClass.QueryAllGeneralClassifiers().Contains(targetClass) || !variableName.Contains("poco"))) { writer.WriteSafeString($"{targetType.Name}TextualNotationBuilder.Build{nonTerminalElement.Name}({variableName}, stringBuilder);"); } else { - ProcessAlternatives(writer, umlClass, referencedRule!.Alternatives, rules, definedIterators); + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + ProcessAlternatives(writer, umlClass, referencedRule?.Alternatives, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; } } else { - ProcessAlternatives(writer, umlClass, referencedRule!.Alternatives, rules, definedIterators); + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + ProcessAlternatives(writer, umlClass, referencedRule?.Alternatives, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; } } else { writer.WriteSafeString($"Build{ nonTerminalElement.Name}({variableName}, stringBuilder);"); } + + if (isForProperty) + { + writer.WriteSafeString($"{Environment.NewLine}}}"); + } } /// @@ -385,10 +415,9 @@ private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass u /// /// The used to write into output content /// The related - /// A collection of all existing rules /// The to process - /// Collection of that keep tracks of defined iterator - private static void DeclareIteratorIfRequired(EncodedTextWriter writer, IClass umlClass, IReadOnlyCollection rules, AssignmentElement assignmentElement, List definedIterators) + /// + private static void DeclareIteratorIfRequired(EncodedTextWriter writer, IClass umlClass, AssignmentElement assignmentElement, RuleGenerationContext ruleGenerationContext) { var allProperties = umlClass.QueryAllProperties(); var targetProperty = allProperties.SingleOrDefault(x => string.Equals(x.Name, assignmentElement.Property, StringComparison.OrdinalIgnoreCase)); @@ -404,7 +433,7 @@ private static void DeclareIteratorIfRequired(EncodedTextWriter writer, IClass u foreach (var assignment in groupedAssignment) { - DeclareIteratorIfRequired(writer, umlClass, rules, assignment, definedIterators); + DeclareIteratorIfRequired(writer, umlClass, assignment, ruleGenerationContext); } } @@ -413,9 +442,9 @@ private static void DeclareIteratorIfRequired(EncodedTextWriter writer, IClass u return; } - var referencedRule = rules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); + var referencedRule = ruleGenerationContext.AllRules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); - if (definedIterators.SingleOrDefault(x => x.IsIteratorValidForProperty(targetProperty, referencedRule) || x.ApplicableRuleElements.Contains(assignmentElement)) is { } alreadyDefinedIterator) + if (ruleGenerationContext.DefinedIterators.SingleOrDefault(x => x.IsIteratorValidForProperty(targetProperty, referencedRule) || x.ApplicableRuleElements.Contains(assignmentElement)) is { } alreadyDefinedIterator) { alreadyDefinedIterator.ApplicableRuleElements.Add(assignmentElement); return; @@ -454,7 +483,7 @@ private static void DeclareIteratorIfRequired(EncodedTextWriter writer, IClass u } writer.WriteSafeString(Environment.NewLine); - definedIterators.Add(iteratorToUse); + ruleGenerationContext.DefinedIterators.Add(iteratorToUse); } /// @@ -522,5 +551,26 @@ public bool IsIteratorValidForProperty(IProperty property, TextualNotationRule t return string.Equals(this.ConstrainedType?.Name, typeTarget, StringComparison.InvariantCultureIgnoreCase); } } + + /// + /// Provides context over the rule generation history + /// + private class RuleGenerationContext + { + /// + /// Gets or sets the collection of + /// + public List DefinedIterators { get; set; } + + /// + /// Gets or sets the that called other rule + /// + public RuleElement CallerRule { get; set; } + + /// + /// Gets the collection of all available + /// + public List AllRules { get; } = []; + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs index 35b56867..e7ddec66 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs @@ -28,7 +28,6 @@ namespace SysML2.NET.TextualNotation using System.Text; using SysML2.NET.Core.POCO.Root.Elements; - using SysML2.NET.Core.POCO.Systems.Actions; /// /// The provides Textual Notation Builder for the element @@ -73,12 +72,20 @@ public static void BuildAcceptParameterPart(SysML2.NET.Core.POCO.Systems.Actions { using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildPayloadParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPayloadParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { stringBuilder.Append("via "); - ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs index 9f1f9a01..5e5dbbca 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs @@ -103,12 +103,24 @@ public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.A stringBuilder.Append("assign "); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildAssignmentTargetMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildAssignmentTargetMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(":= "); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs index 9472be9f..df86fc37 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs @@ -45,7 +45,11 @@ public static void BuildActorMember(SysML2.NET.Core.POCO.Systems.Requirements.IA using var ownedRelatedElementOfPartUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfPartUsageIterator.MoveNext(); - PartUsageTextualNotationBuilder.BuildActorUsage(ownedRelatedElementOfPartUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfPartUsageIterator.Current != null) + { + PartUsageTextualNotationBuilder.BuildActorUsage(ownedRelatedElementOfPartUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs index 90508df7..da8b1eb9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IA { using var ownedRelatedElementOfAnnotatingElementIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfAnnotatingElementIterator.MoveNext(); - AnnotatingElementTextualNotationBuilder.BuildAnnotatingElement(ownedRelatedElementOfAnnotatingElementIterator.Current, stringBuilder); + + if (ownedRelatedElementOfAnnotatingElementIterator.Current != null) + { + AnnotatingElementTextualNotationBuilder.BuildAnnotatingElement(ownedRelatedElementOfAnnotatingElementIterator.Current, stringBuilder); + } } @@ -57,8 +61,19 @@ public static void BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IA public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) { stringBuilder.Append("#"); - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); - // Assignment Element : ownedRelatedElement += annotatingElement + + if (poco.annotatingElement != null) + { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } + + } + // NonParsing Assignment Element : ownedRelatedElement += annotatingElement => Does not have to be process } @@ -70,7 +85,7 @@ public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annot /// The that contains the entire textual notation public static void BuildAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs index 86768557..495c3fbc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -54,10 +54,18 @@ public static void BuildBindingConnectorAsUsage(SysML2.NET.Core.POCO.Systems.Con stringBuilder.Append("bind "); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("="); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs index b72eaa90..c67e96b1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs @@ -59,7 +59,11 @@ public static void BuildBindingConnector(SysML2.NET.Core.POCO.Kernel.Connectors. while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs index ab61cf40..8f8ae380 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs @@ -48,7 +48,11 @@ public static void BuildBooleanExpression(SysML2.NET.Core.POCO.Kernel.Functions. while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs index d5b3cf56..9f2f6768 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs @@ -45,12 +45,20 @@ public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifi using var ownedRelationshipOfSubclassificationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfSubclassificationIterator.MoveNext(); - SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + + if (ownedRelationshipOfSubclassificationIterator.Current != null) + { + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } while (ownedRelationshipOfSubclassificationIterator.MoveNext()) { stringBuilder.Append(","); - SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + + if (ownedRelationshipOfSubclassificationIterator.Current != null) + { + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } } @@ -76,7 +84,11 @@ public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifi if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -96,12 +108,20 @@ public static void BuildSuperclassingPart(SysML2.NET.Core.POCO.Core.Classifiers. using var ownedRelationshipOfSubclassificationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfSubclassificationIterator.MoveNext(); - SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + + if (ownedRelationshipOfSubclassificationIterator.Current != null) + { + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } while (ownedRelationshipOfSubclassificationIterator.MoveNext()) { stringBuilder.Append(","); - SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + + if (ownedRelationshipOfSubclassificationIterator.Current != null) + { + SubclassificationTextualNotationBuilder.BuildOwnedSubclassification(ownedRelationshipOfSubclassificationIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs index f15cb1ba..0279240e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs @@ -44,10 +44,18 @@ public static void BuildCollectExpression(SysML2.NET.Core.POCO.Kernel.Expression { using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("."); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildBodyArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildBodyArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs index 3296b9e0..82475154 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs @@ -52,12 +52,20 @@ public static void BuildComment(SysML2.NET.Core.POCO.Root.Annotations.IComment p if (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append("about "); - AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } while (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append(","); - AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } } stringBuilder.Append(' '); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs index e2de57b1..8118e68e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildConjugatedPortDefinition(SysML2.NET.Core.POCO.Systems.Po { using var ownedRelationshipOfPortConjugationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfPortConjugationIterator.MoveNext(); - PortConjugationTextualNotationBuilder.BuildPortConjugation(ownedRelationshipOfPortConjugationIterator.Current, stringBuilder); + + if (ownedRelationshipOfPortConjugationIterator.Current != null) + { + PortConjugationTextualNotationBuilder.BuildPortConjugation(ownedRelationshipOfPortConjugationIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs index 5a60fe85..52e3b062 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs @@ -55,10 +55,18 @@ public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connect { using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("to "); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } } @@ -73,15 +81,27 @@ public static void BuildNaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connectio using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("("); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(","); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } while (ownedRelationshipOfEndFeatureMembershipIterator.MoveNext()) { stringBuilder.Append(","); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } } stringBuilder.Append(")"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs index a72e8e63..89483056 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs @@ -56,10 +56,18 @@ public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.C using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("to "); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } } @@ -75,15 +83,27 @@ public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Con FeatureTextualNotationBuilder.BuildFeatureDeclaration(poco, stringBuilder); stringBuilder.Append("("); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(","); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } while (ownedRelationshipOfEndFeatureMembershipIterator.MoveNext()) { stringBuilder.Append(","); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } } stringBuilder.Append(")"); @@ -104,7 +124,11 @@ public static void BuildConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IConnec while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs index 8dd9b4e4..aa87c35b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs @@ -46,9 +46,17 @@ public static void BuildConstructorExpression(SysML2.NET.Core.POCO.Kernel.Expres using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("new "); ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildInstantiatedTypeMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildInstantiatedTypeMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildConstructorResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildConstructorResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs index 67bf804c..0aeccd87 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildDefinitionExtensionKeyword(SysML2.NET.Core.POCO.Systems. { using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs index 38ba6810..d0e42fb3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs @@ -46,7 +46,11 @@ public static void BuildDependency(SysML2.NET.Core.POCO.Root.Dependencies.IDepen while (ownedRelationshipOfAnnotationIterator.MoveNext()) { - AnnotationTextualNotationBuilder.BuildPrefixMetadataAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildPrefixMetadataAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } } stringBuilder.Append("dependency "); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs index ee7f0088..6147bf64 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs @@ -46,7 +46,11 @@ public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("filter "); ownedRelatedElementOfExpressionIterator.MoveNext(); - ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } stringBuilder.Append(";"); } @@ -62,7 +66,11 @@ public static void BuildFilterPackageMember(SysML2.NET.Core.POCO.Kernel.Packages using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("["); ownedRelatedElementOfExpressionIterator.MoveNext(); - ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } stringBuilder.Append("]"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs index be3e18f0..4683a227 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndF { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildSourceEnd(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildSourceEnd(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -58,7 +62,11 @@ public static void BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IE { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildConnectorEnd(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildConnectorEnd(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -72,7 +80,11 @@ public static void BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IE { using var ownedRelatedElementOfPortUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfPortUsageIterator.MoveNext(); - PortUsageTextualNotationBuilder.BuildInterfaceEnd(ownedRelatedElementOfPortUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfPortUsageIterator.Current != null) + { + PortUsageTextualNotationBuilder.BuildInterfaceEnd(ownedRelatedElementOfPortUsageIterator.Current, stringBuilder); + } } @@ -86,7 +98,11 @@ public static void BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFea { using var ownedRelatedElementOfFlowEndIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfFlowEndIterator.MoveNext(); - FlowEndTextualNotationBuilder.BuildFlowEnd(ownedRelatedElementOfFlowEndIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFlowEndIterator.Current != null) + { + FlowEndTextualNotationBuilder.BuildFlowEnd(ownedRelatedElementOfFlowEndIterator.Current, stringBuilder); + } } @@ -100,7 +116,11 @@ public static void BuildEmptyEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFe { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildEmptyFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildEmptyFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs index af4af9bc..03d79240 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IE { using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); - ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs index e162d784..a18f1c00 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs @@ -102,7 +102,11 @@ public static void BuildFunctionReference(SysML2.NET.Core.POCO.Kernel.Functions. { using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureTypingIterator.MoveNext(); - FeatureTypingTextualNotationBuilder.BuildReferenceTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildReferenceTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } } @@ -145,7 +149,11 @@ public static void BuildExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpres while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs index c4e2d667..316ae3e6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs @@ -45,10 +45,18 @@ public static void BuildFeatureChainExpression(SysML2.NET.Core.POCO.Kernel.Expre using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildNonFeatureChainPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNonFeatureChainPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("."); ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs index 4ab2815e..51c2af35 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs @@ -42,7 +42,7 @@ public static partial class FeatureChainingTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedFeatureChaining(SysML2.NET.Core.POCO.Core.Features.IFeatureChaining poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs index 26010af1..3a780242 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -45,7 +45,11 @@ public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfUsageIterator.MoveNext(); - UsageTextualNotationBuilder.BuildNonOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildNonOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } } @@ -60,7 +64,11 @@ public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IF using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfUsageIterator.MoveNext(); - UsageTextualNotationBuilder.BuildOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } } @@ -75,7 +83,11 @@ public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFe using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfUsageIterator.MoveNext(); - UsageTextualNotationBuilder.BuildStructureUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildStructureUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } } @@ -90,7 +102,11 @@ public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFea using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfUsageIterator.MoveNext(); - UsageTextualNotationBuilder.BuildBehaviorUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildBehaviorUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } } @@ -105,7 +121,11 @@ public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.I using var ownedRelatedElementOfSuccessionAsUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("then "); ownedRelatedElementOfSuccessionAsUsageIterator.MoveNext(); - SuccessionAsUsageTextualNotationBuilder.BuildSourceSuccession(ownedRelatedElementOfSuccessionAsUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfSuccessionAsUsageIterator.Current != null) + { + SuccessionAsUsageTextualNotationBuilder.BuildSourceSuccession(ownedRelatedElementOfSuccessionAsUsageIterator.Current, stringBuilder); + } } @@ -120,7 +140,11 @@ public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.C using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfUsageIterator.MoveNext(); - UsageTextualNotationBuilder.BuildInterfaceNonOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildInterfaceNonOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } } @@ -135,7 +159,11 @@ public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfUsageIterator.MoveNext(); - UsageTextualNotationBuilder.BuildInterfaceOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildInterfaceOccurrenceUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } } @@ -149,7 +177,11 @@ public static void BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types { using var ownedRelatedElementOfPayloadFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfPayloadFeatureIterator.MoveNext(); - PayloadFeatureTextualNotationBuilder.BuildFlowPayloadFeature(ownedRelatedElementOfPayloadFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfPayloadFeatureIterator.Current != null) + { + PayloadFeatureTextualNotationBuilder.BuildFlowPayloadFeature(ownedRelatedElementOfPayloadFeatureIterator.Current, stringBuilder); + } } @@ -163,7 +195,11 @@ public static void BuildFlowFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatu { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildFlowFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildFlowFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -204,7 +240,11 @@ public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatur using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfActionUsageIterator.MoveNext(); - ActionUsageTextualNotationBuilder.BuildActionNode(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildActionNode(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } } @@ -219,7 +259,11 @@ public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.T using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfUsageIterator.MoveNext(); - UsageTextualNotationBuilder.BuildActionTargetSuccession(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildActionTargetSuccession(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } } @@ -234,7 +278,11 @@ public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types. using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfTransitionUsageIterator.MoveNext(); - TransitionUsageTextualNotationBuilder.BuildGuardedSuccession(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfTransitionUsageIterator.Current != null) + { + TransitionUsageTextualNotationBuilder.BuildGuardedSuccession(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); + } } @@ -248,7 +296,11 @@ public static void BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.T { using var ownedRelatedElementOfUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfUsageIterator.MoveNext(); - UsageTextualNotationBuilder.BuildUsageDeclaration(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildUsageDeclaration(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } } @@ -280,7 +332,11 @@ public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IF using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfTransitionUsageIterator.MoveNext(); - TransitionUsageTextualNotationBuilder.BuildTransitionUsage(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfTransitionUsageIterator.Current != null) + { + TransitionUsageTextualNotationBuilder.BuildTransitionUsage(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); + } } @@ -295,7 +351,11 @@ public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Ty using var ownedRelatedElementOfTransitionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfTransitionUsageIterator.MoveNext(); - TransitionUsageTextualNotationBuilder.BuildTargetTransitionUsage(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfTransitionUsageIterator.Current != null) + { + TransitionUsageTextualNotationBuilder.BuildTargetTransitionUsage(ownedRelatedElementOfTransitionUsageIterator.Current, stringBuilder); + } } @@ -307,7 +367,23 @@ public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Ty /// The that contains the entire textual notation public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberFeature != null) + { + using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + stringBuilder.Append("ref "); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + ownedRelationshipOfRedefinitionIterator.MoveNext(); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } + BuildFeatureSpecializationPart(poco, stringBuilder); + BuildValuePart(poco, stringBuilder); + TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); + + } } @@ -322,7 +398,11 @@ public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeat using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } @@ -336,7 +416,11 @@ public static void BuildOwnedExpressionReferenceMember(SysML2.NET.Core.POCO.Core { using var ownedRelationshipOfFeatureReferenceExpressionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureReferenceExpressionIterator.MoveNext(); - FeatureReferenceExpressionTextualNotationBuilder.BuildOwnedExpressionReference(ownedRelationshipOfFeatureReferenceExpressionIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureReferenceExpressionIterator.Current != null) + { + FeatureReferenceExpressionTextualNotationBuilder.BuildOwnedExpressionReference(ownedRelationshipOfFeatureReferenceExpressionIterator.Current, stringBuilder); + } } @@ -360,7 +444,11 @@ public static void BuildOwnedExpressionMember(SysML2.NET.Core.POCO.Core.Types.IF /// The that contains the entire textual notation public static void BuildSequenceExpressionListMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberFeature != null) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } } @@ -372,7 +460,18 @@ public static void BuildSequenceExpressionListMember(SysML2.NET.Core.POCO.Core.T /// The that contains the entire textual notation public static void BuildFunctionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberFeature != null) + { + using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureTypingIterator.MoveNext(); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildReferenceTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } + + } } @@ -384,7 +483,11 @@ public static void BuildFunctionReferenceMember(SysML2.NET.Core.POCO.Core.Types. /// The that contains the entire textual notation public static void BuildNamedArgumentMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberFeature != null) + { + FeatureTextualNotationBuilder.BuildNamedArgument(poco.ownedMemberFeature, stringBuilder); + } } @@ -396,7 +499,14 @@ public static void BuildNamedArgumentMember(SysML2.NET.Core.POCO.Core.Types.IFea /// The that contains the entire textual notation public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberFeature != null) + { + stringBuilder.Append("{"); + TypeTextualNotationBuilder.BuildFunctionBodyPart(poco, stringBuilder); + stringBuilder.Append("}"); + + } } @@ -410,7 +520,11 @@ public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFe { using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildPayloadFeature(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildPayloadFeature(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } @@ -422,7 +536,11 @@ public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFe /// The that contains the entire textual notation public static void BuildMetadataBodyFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberFeature != null) + { + FeatureTextualNotationBuilder.BuildMetadataBodyFeature(poco.ownedMemberFeature, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs index bd53ca79..f11f4fd5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Ker { using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } } @@ -58,7 +62,11 @@ public static void BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Exp { using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildOwnedExpressionMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildOwnedExpressionMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } } @@ -72,7 +80,11 @@ public static void BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel. { using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildFunctionReferenceMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildFunctionReferenceMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } } @@ -87,9 +99,17 @@ public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.E using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildFeatureReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } @@ -103,7 +123,11 @@ public static void BuildBodyExpression(SysML2.NET.Core.POCO.Kernel.Expressions.I { using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildExpressionBodyMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildExpressionBodyMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs index 51edd639..cd8c73c5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature po { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -84,7 +88,11 @@ public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco while (ownedRelationshipOfFeatureTypingIterator.MoveNext()) { stringBuilder.Append(","); - FeatureTypingTextualNotationBuilder.BuildFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } } @@ -101,7 +109,11 @@ public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfFeatureTypingIterator.MoveNext(); - FeatureTypingTextualNotationBuilder.BuildFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } } @@ -119,7 +131,11 @@ public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature while (ownedRelationshipOfSubsettingIterator.MoveNext()) { stringBuilder.Append(","); - SubsettingTextualNotationBuilder.BuildOwnedSubsetting(ownedRelationshipOfSubsettingIterator.Current, stringBuilder); + + if (ownedRelationshipOfSubsettingIterator.Current != null) + { + SubsettingTextualNotationBuilder.BuildOwnedSubsetting(ownedRelationshipOfSubsettingIterator.Current, stringBuilder); + } } @@ -136,7 +152,11 @@ public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco using var ownedRelationshipOfSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfSubsettingIterator.MoveNext(); - SubsettingTextualNotationBuilder.BuildOwnedSubsetting(ownedRelationshipOfSubsettingIterator.Current, stringBuilder); + + if (ownedRelationshipOfSubsettingIterator.Current != null) + { + SubsettingTextualNotationBuilder.BuildOwnedSubsetting(ownedRelationshipOfSubsettingIterator.Current, stringBuilder); + } } @@ -151,7 +171,11 @@ public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature p using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); - ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } } @@ -166,7 +190,11 @@ public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco using var ownedRelationshipOfCrossSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfCrossSubsettingIterator.MoveNext(); - CrossSubsettingTextualNotationBuilder.BuildOwnedCrossSubsetting(ownedRelationshipOfCrossSubsettingIterator.Current, stringBuilder); + + if (ownedRelationshipOfCrossSubsettingIterator.Current != null) + { + CrossSubsettingTextualNotationBuilder.BuildOwnedCrossSubsetting(ownedRelationshipOfCrossSubsettingIterator.Current, stringBuilder); + } } @@ -184,7 +212,11 @@ public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeatur while (ownedRelationshipOfRedefinitionIterator.MoveNext()) { stringBuilder.Append(","); - RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } } @@ -201,7 +233,11 @@ public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature po using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfRedefinitionIterator.MoveNext(); - RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } } @@ -215,12 +251,20 @@ public static void BuildOwnedFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFe { using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureChainingIterator.MoveNext(); - FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } while (ownedRelationshipOfFeatureChainingIterator.MoveNext()) { stringBuilder.Append("."); - FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } } stringBuilder.Append(' '); @@ -248,7 +292,11 @@ public static void BuildOwnedCrossMultiplicity(SysML2.NET.Core.POCO.Core.Feature { using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } @@ -286,13 +334,21 @@ public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IF while (ownedRelationshipOfFeatureChainingIterator.MoveNext()) { - FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } stringBuilder.Append("."); } stringBuilder.Append(' '); ownedRelationshipOfFeatureChainingIterator.MoveNext(); - FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } stringBuilder.Append("."); } @@ -307,7 +363,11 @@ public static void BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFea { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildTriggerFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildTriggerFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -321,7 +381,11 @@ public static void BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poc { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -335,7 +399,11 @@ public static void BuildArgumentExpression(SysML2.NET.Core.POCO.Core.Features.IF { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildArgumentExpressionValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildArgumentExpressionValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -362,7 +430,7 @@ public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFea if (poco.IsConstant) { stringBuilder.Append("const"); - // Assignment Element : isVariable = true + // NonParsing Assignment Element : isVariable = true => Does not have to be process stringBuilder.Append(' '); } @@ -474,7 +542,11 @@ public static void BuildInvertingPart(SysML2.NET.Core.POCO.Core.Features.IFeatur stringBuilder.Append("inverse "); stringBuilder.Append("of "); ownedRelationshipOfFeatureInvertingIterator.MoveNext(); - FeatureInvertingTextualNotationBuilder.BuildOwnedFeatureInverting(ownedRelationshipOfFeatureInvertingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureInvertingIterator.Current != null) + { + FeatureInvertingTextualNotationBuilder.BuildOwnedFeatureInverting(ownedRelationshipOfFeatureInvertingIterator.Current, stringBuilder); + } } @@ -491,12 +563,20 @@ public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFe stringBuilder.Append("featured "); stringBuilder.Append("by "); ownedRelationshipOfTypeFeaturingIterator.MoveNext(); - TypeFeaturingTextualNotationBuilder.BuildOwnedTypeFeaturing(ownedRelationshipOfTypeFeaturingIterator.Current, stringBuilder); + + if (ownedRelationshipOfTypeFeaturingIterator.Current != null) + { + TypeFeaturingTextualNotationBuilder.BuildOwnedTypeFeaturing(ownedRelationshipOfTypeFeaturingIterator.Current, stringBuilder); + } while (ownedTypeFeaturingIterator.MoveNext()) { stringBuilder.Append(","); - TypeFeaturingTextualNotationBuilder.BuildOwnedTypeFeaturing(ownedTypeFeaturingIterator.Current, stringBuilder); + + if (ownedTypeFeaturingIterator.Current != null) + { + TypeFeaturingTextualNotationBuilder.BuildOwnedTypeFeaturing(ownedTypeFeaturingIterator.Current, stringBuilder); + } } @@ -512,12 +592,20 @@ public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature { using var ownedRelationshipOfFeatureChainingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureChainingIterator.MoveNext(); - FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } while (ownedRelationshipOfFeatureChainingIterator.MoveNext()) { stringBuilder.Append("."); - FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureChainingIterator.Current != null) + { + FeatureChainingTextualNotationBuilder.BuildOwnedFeatureChaining(ownedRelationshipOfFeatureChainingIterator.Current, stringBuilder); + } } stringBuilder.Append(' '); @@ -534,7 +622,11 @@ public static void BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFea { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildMetadataValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildMetadataValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -548,7 +640,11 @@ public static void BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeatur { using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureTypingIterator.MoveNext(); - FeatureTypingTextualNotationBuilder.BuildReferenceTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildReferenceTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } } @@ -562,7 +658,11 @@ public static void BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeat { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildPrimaryArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildPrimaryArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -576,7 +676,11 @@ public static void BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildNonFeatureChainPrimaryArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildNonFeatureChainPrimaryArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -590,7 +694,11 @@ public static void BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildBodyArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildBodyArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -604,7 +712,11 @@ public static void BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Feat { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildFunctionReferenceArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildFunctionReferenceArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -616,7 +728,7 @@ public static void BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Feat /// The that contains the entire textual notation public static void BuildFeatureReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { - // Value Literal Element : [QualifiedName] + stringBuilder.Append(poco.qualifiedName); } @@ -656,12 +768,20 @@ public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Feature { using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } while (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { stringBuilder.Append(","); - ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } } @@ -677,12 +797,20 @@ public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFe { using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildNamedArgumentMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildNamedArgumentMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } while (ownedRelationshipOfFeatureMembershipIterator.MoveNext()) { stringBuilder.Append(","); - FeatureMembershipTextualNotationBuilder.BuildNamedArgumentMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildNamedArgumentMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } } @@ -699,10 +827,18 @@ public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeatur using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfRedefinitionIterator.MoveNext(); - RedefinitionTextualNotationBuilder.BuildParameterRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildParameterRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } stringBuilder.Append("="); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildArgumentValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -718,7 +854,11 @@ public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.I stringBuilder.Append("feature "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfRedefinitionIterator.MoveNext(); - RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } BuildFeatureSpecializationPart(poco, stringBuilder); BuildValuePart(poco, stringBuilder); TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs index e2f24cdb..68b13b51 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs @@ -53,7 +53,7 @@ public static void BuildOwnedFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IF /// The that contains the entire textual notation public static void BuildReferenceTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs index 2770f844..7c3bc4ee 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureV { using var ownedRelatedElementOfTriggerInvocationExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfTriggerInvocationExpressionIterator.MoveNext(); - TriggerInvocationExpressionTextualNotationBuilder.BuildTriggerExpression(ownedRelatedElementOfTriggerInvocationExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfTriggerInvocationExpressionIterator.Current != null) + { + TriggerInvocationExpressionTextualNotationBuilder.BuildTriggerExpression(ownedRelatedElementOfTriggerInvocationExpressionIterator.Current, stringBuilder); + } } @@ -56,7 +60,11 @@ public static void BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureV /// The that contains the entire textual notation public static void BuildArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.value != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(poco.value, stringBuilder); + } } @@ -70,7 +78,11 @@ public static void BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.Feat { using var ownedRelatedElementOfFeatureReferenceExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfFeatureReferenceExpressionIterator.MoveNext(); - FeatureReferenceExpressionTextualNotationBuilder.BuildOwnedExpressionReference(ownedRelatedElementOfFeatureReferenceExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureReferenceExpressionIterator.Current != null) + { + FeatureReferenceExpressionTextualNotationBuilder.BuildOwnedExpressionReference(ownedRelatedElementOfFeatureReferenceExpressionIterator.Current, stringBuilder); + } } @@ -84,7 +96,11 @@ public static void BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues { using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfExpressionIterator.MoveNext(); - ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } } @@ -98,7 +114,11 @@ public static void BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.Feat { using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfExpressionIterator.MoveNext(); - ExpressionTextualNotationBuilder.BuildNonFeatureChainPrimaryExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildNonFeatureChainPrimaryExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } } @@ -112,7 +132,11 @@ public static void BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.Fea { using var ownedRelatedElementOfFeatureReferenceExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfFeatureReferenceExpressionIterator.MoveNext(); - FeatureReferenceExpressionTextualNotationBuilder.BuildSatisfactionReferenceExpression(ownedRelatedElementOfFeatureReferenceExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureReferenceExpressionIterator.Current != null) + { + FeatureReferenceExpressionTextualNotationBuilder.BuildSatisfactionReferenceExpression(ownedRelatedElementOfFeatureReferenceExpressionIterator.Current, stringBuilder); + } } @@ -124,7 +148,18 @@ public static void BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.Fea /// The that contains the entire textual notation public static void BuildMetadataValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.value != null) + { + using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfMembershipIterator.MoveNext(); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildElementReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } + + } } @@ -136,7 +171,11 @@ public static void BuildMetadataValue(SysML2.NET.Core.POCO.Kernel.FeatureValues. /// The that contains the entire textual notation public static void BuildPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.value != null) + { + ExpressionTextualNotationBuilder.BuildPrimaryExpression(poco.value, stringBuilder); + } } @@ -148,7 +187,11 @@ public static void BuildPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.Feature /// The that contains the entire textual notation public static void BuildNonFeatureChainPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.value != null) + { + ExpressionTextualNotationBuilder.BuildNonFeatureChainPrimaryExpression(poco.value, stringBuilder); + } } @@ -160,7 +203,18 @@ public static void BuildNonFeatureChainPrimaryArgumentValue(SysML2.NET.Core.POCO /// The that contains the entire textual notation public static void BuildBodyArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.value != null) + { + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildExpressionBodyMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } + + } } @@ -172,7 +226,18 @@ public static void BuildBodyArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureVal /// The that contains the entire textual notation public static void BuildFunctionReferenceArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.value != null) + { + using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + ownedRelationshipOfFeatureMembershipIterator.MoveNext(); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildFunctionReferenceMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } + + } } @@ -188,7 +253,11 @@ public static void BuildFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.I throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); ownedRelatedElementOfExpressionIterator.MoveNext(); - ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs index 63a69b0b..5b7562fe 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs @@ -47,12 +47,20 @@ public static void BuildFlowEnd(SysML2.NET.Core.POCO.Kernel.Interactions.IFlowEn if (ownedRelationshipOfReferenceSubsettingIterator.MoveNext()) { - ReferenceSubsettingTextualNotationBuilder.BuildFlowEndSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildFlowEndSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildFlowFeatureMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildFlowFeatureMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs index 40d81222..2d5dd3fa 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs @@ -48,7 +48,11 @@ public static void BuildFlow(SysML2.NET.Core.POCO.Kernel.Interactions.IFlow poco while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs index 90b3bcda..914068cb 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs @@ -46,7 +46,7 @@ public static void BuildMessage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage po stringBuilder.Append("message "); BuildMessageDeclaration(poco, stringBuilder); TypeTextualNotationBuilder.BuildDefinitionBody(poco, stringBuilder); - // Assignment Element : isAbstract = true + // NonParsing Assignment Element : isAbstract = true => Does not have to be process } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs index 0d6476e5..60fded55 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs @@ -47,12 +47,24 @@ public static void BuildForLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IForLoo ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); stringBuilder.Append("for "); ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildForVariableDeclarationMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildForVariableDeclarationMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("in "); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs index 412fb84b..97edba8e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs @@ -46,7 +46,11 @@ public static void BuildFramedConcernMember(SysML2.NET.Core.POCO.Systems.Require MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("frame "); ownedRelatedElementOfConcernUsageIterator.MoveNext(); - ConcernUsageTextualNotationBuilder.BuildFramedConcernUsage(ownedRelatedElementOfConcernUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfConcernUsageIterator.Current != null) + { + ConcernUsageTextualNotationBuilder.BuildFramedConcernUsage(ownedRelatedElementOfConcernUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs index 1ef429e6..08b23b29 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs @@ -46,9 +46,17 @@ public static void BuildIfNode(SysML2.NET.Core.POCO.Systems.Actions.IIfActionUsa ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, stringBuilder); stringBuilder.Append("if "); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildExpressionParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildExpressionParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } if (BuildGroupConditionForIfNode(poco)) { diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs index 85eb76b7..3a765c76 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs @@ -45,11 +45,19 @@ public static void BuildIndexExpression(SysML2.NET.Core.POCO.Kernel.Expressions. using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("#"); stringBuilder.Append("("); ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(")"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs index ef3162e6..68942d76 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs @@ -66,10 +66,18 @@ public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfa { using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("to "); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } } @@ -84,15 +92,27 @@ public static void BuildNaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interface using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("("); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(","); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } while (ownedRelationshipOfEndFeatureMembershipIterator.MoveNext()) { stringBuilder.Append(","); - EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildInterfaceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } } stringBuilder.Append(")"); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs index 9d70ff06..c96cd1f2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs @@ -48,7 +48,11 @@ public static void BuildInvariant(SysML2.NET.Core.POCO.Kernel.Functions.IInvaria while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs index 6ee935b4..23af400c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs @@ -46,14 +46,26 @@ public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel. using var ownedRelationshipOfInvocationExpressionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("-> "); ownedRelationshipOfInvocationExpressionIterator.MoveNext(); - BuildInvocationTypeMember(ownedRelationshipOfInvocationExpressionIterator.Current, stringBuilder); + + if (ownedRelationshipOfInvocationExpressionIterator.Current != null) + { + BuildInvocationTypeMember(ownedRelationshipOfInvocationExpressionIterator.Current, stringBuilder); + } throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } @@ -68,10 +80,18 @@ public static void BuildInvocationExpression(SysML2.NET.Core.POCO.Kernel.Express using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildInstantiatedTypeMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildInstantiatedTypeMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } FeatureTextualNotationBuilder.BuildArgumentList(poco, stringBuilder); ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs index 57d5e80c..da98b0fe 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs @@ -50,7 +50,11 @@ public static void BuildLibraryPackage(SysML2.NET.Core.POCO.Kernel.Packages.ILib while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } PackageTextualNotationBuilder.BuildPackageDeclaration(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs index 215bf2bf..3179d442 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs @@ -42,7 +42,7 @@ public static partial class LiteralBooleanTextualNotationBuilder /// The that contains the entire textual notation public static void BuildLiteralBoolean(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralBoolean poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of bool with rule element value different than TerminalElement not supported"); + stringBuilder.Append(poco.Value.ToString().ToLower()); } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs index 35812294..302d2da6 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs @@ -42,7 +42,7 @@ public static partial class MembershipImportTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMembershipImport(SysML2.NET.Core.POCO.Root.Namespaces.IMembershipImport poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); if (poco.IsRecursive) { diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs index 3af0d262..4cf249cf 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs @@ -79,7 +79,7 @@ public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMember } stringBuilder.Append("for "); - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } @@ -103,7 +103,12 @@ public static void BuildFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces. /// The that contains the entire textual notation public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.MemberElement != null) + { + stringBuilder.Append(poco.qualifiedName); + + } } @@ -115,7 +120,7 @@ public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespa /// The that contains the entire textual notation public static void BuildElementReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs index 84030eab..2a6fbfec 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expression { using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildElementReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildElementReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } } @@ -58,7 +62,11 @@ public static void BuildMetadataAccessExpression(SysML2.NET.Core.POCO.Kernel.Exp { using var ownedRelationshipOfMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildElementReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildElementReferenceMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("."); stringBuilder.Append("metadata "); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs index 07423665..e96c9a6d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metada { using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureTypingIterator.MoveNext(); - FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } } @@ -67,7 +71,11 @@ public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.M } ownedRelationshipOfFeatureTypingIterator.MoveNext(); - FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } } @@ -84,7 +92,11 @@ public static void BuildMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMe while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } throw new System.NotSupportedException("Multiple alternatives not implemented yet"); @@ -94,12 +106,20 @@ public static void BuildMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMe if (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append("about "); - AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } while (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append(","); - AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } } stringBuilder.Append(' '); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs index 8355b7c8..168ac253 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadat { using var ownedRelationshipOfFeatureTypingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureTypingIterator.MoveNext(); - FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } } @@ -67,7 +71,11 @@ public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Me } ownedRelationshipOfFeatureTypingIterator.MoveNext(); - FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureTypingIterator.Current != null) + { + FeatureTypingTextualNotationBuilder.BuildOwnedFeatureTyping(ownedRelationshipOfFeatureTypingIterator.Current, stringBuilder); + } } @@ -88,12 +96,20 @@ public static void BuildMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMet if (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append("about "); - AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } while (ownedRelationshipOfAnnotationIterator.MoveNext()) { stringBuilder.Append(","); - AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + + if (ownedRelationshipOfAnnotationIterator.Current != null) + { + AnnotationTextualNotationBuilder.BuildAnnotation(ownedRelationshipOfAnnotationIterator.Current, stringBuilder); + } } stringBuilder.Append(' '); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs index 56442a1b..dffe2bee 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs @@ -59,13 +59,21 @@ public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplic if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(".. "); stringBuilder.Append(' '); } ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("]"); } @@ -83,13 +91,21 @@ public static void BuildMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplici if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(".. "); stringBuilder.Append(' '); } ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildMultiplicityExpressionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("]"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs index b06e9455..07d4b473 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs @@ -93,7 +93,11 @@ public static void BuildNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespac while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } BuildNamespaceDeclaration(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs index 465b6fb9..7a624821 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs @@ -46,7 +46,11 @@ public static void BuildObjectiveMember(SysML2.NET.Core.POCO.Systems.Cases.IObje MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("objective "); ownedRelatedElementOfRequirementUsageIterator.MoveNext(); - RequirementUsageTextualNotationBuilder.BuildObjectiveRequirementUsage(ownedRelatedElementOfRequirementUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfRequirementUsageIterator.Current != null) + { + RequirementUsageTextualNotationBuilder.BuildObjectiveRequirementUsage(ownedRelatedElementOfRequirementUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs index a595d817..72c33c79 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs @@ -48,7 +48,11 @@ public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems. if (poco.IsIndividual && ownedRelationshipOfOwningMembershipIterator.MoveNext()) { stringBuilder.Append("individual"); - OwningMembershipTextualNotationBuilder.BuildEmptyMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildEmptyMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -71,7 +75,11 @@ public static void BuildIndividualDefinition(SysML2.NET.Core.POCO.Systems.Occurr stringBuilder.Append("def "); DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildEmptyMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildEmptyMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs index 771d83d7..56dbad97 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs @@ -54,7 +54,7 @@ public static void BuildOccurrenceUsagePrefix(SysML2.NET.Core.POCO.Systems.Occur if (poco.PortionKind.HasValue) { stringBuilder.Append(poco.PortionKind.ToString().ToLower()); - // Assignment Element : isPortion = true + // NonParsing Assignment Element : isPortion = true => Does not have to be process stringBuilder.Append(' '); } @@ -96,7 +96,7 @@ public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IO stringBuilder.Append(poco.PortionKind.ToString().ToLower()); UsageTextualNotationBuilder.BuildUsageExtensionKeyword(poco, stringBuilder); UsageTextualNotationBuilder.BuildUsage(poco, stringBuilder); - // Assignment Element : isPortion = true + // NonParsing Assignment Element : isPortion = true => Does not have to be process } @@ -120,7 +120,7 @@ public static void BuildControlNodePrefix(SysML2.NET.Core.POCO.Systems.Occurrenc if (poco.PortionKind.HasValue) { stringBuilder.Append(poco.PortionKind.ToString().ToLower()); - // Assignment Element : isPortion = true + // NonParsing Assignment Element : isPortion = true => Does not have to be process stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs index a8c95f03..d8fab4ba 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs @@ -46,15 +46,31 @@ public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expres using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append(poco.Operator); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("?"); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("else "); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } @@ -69,12 +85,24 @@ public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(poco.Operator); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentExpressionMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } @@ -89,12 +117,24 @@ public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Exp using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(poco.Operator); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } @@ -110,9 +150,17 @@ public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expr using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append(poco.Operator); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } @@ -130,14 +178,22 @@ public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Exp if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { - ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } @@ -153,11 +209,19 @@ public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel using var ownedRelationshipIterator = poco.OwnedRelationship.GetEnumerator(); using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildMetadataArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildMetadataArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); ownedRelationshipOfReturnParameterMembershipIterator.MoveNext(); - ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfReturnParameterMembershipIterator.Current != null) + { + ReturnParameterMembershipTextualNotationBuilder.BuildEmptyResultMember(ownedRelationshipOfReturnParameterMembershipIterator.Current, stringBuilder); + } } @@ -172,7 +236,11 @@ public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append(poco.Operator); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildTypeReferenceMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildTypeReferenceMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } } @@ -187,10 +255,18 @@ public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expression using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(poco.Operator); ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("]"); } @@ -205,10 +281,18 @@ public static void BuildSequenceOperatorExpression(SysML2.NET.Core.POCO.Kernel.E { using var ownedRelationshipOfFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildOwnedExpressionMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildOwnedExpressionMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(poco.Operator); ownedRelationshipOfFeatureMembershipIterator.MoveNext(); - FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureMembershipIterator.Current != null) + { + FeatureMembershipTextualNotationBuilder.BuildSequenceExpressionListMember(ownedRelationshipOfFeatureMembershipIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs index fe2a72fd..5226443c 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IO { using var ownedRelatedElementOfAnnotatingElementIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfAnnotatingElementIterator.MoveNext(); - AnnotatingElementTextualNotationBuilder.BuildAnnotatingElement(ownedRelatedElementOfAnnotatingElementIterator.Current, stringBuilder); + + if (ownedRelatedElementOfAnnotatingElementIterator.Current != null) + { + AnnotatingElementTextualNotationBuilder.BuildAnnotatingElement(ownedRelatedElementOfAnnotatingElementIterator.Current, stringBuilder); + } } @@ -75,7 +79,11 @@ public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IO using var ownedRelatedElementIterator = poco.OwnedRelatedElement.GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementIterator.MoveNext(); - ElementTextualNotationBuilder.BuildDefinitionElement(ownedRelatedElementIterator.Current, stringBuilder); + + if (ownedRelatedElementIterator.Current != null) + { + ElementTextualNotationBuilder.BuildDefinitionElement(ownedRelatedElementIterator.Current, stringBuilder); + } } @@ -89,7 +97,11 @@ public static void BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namesp { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildOwnedCrossFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildOwnedCrossFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -103,7 +115,11 @@ public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.I { using var ownedRelatedElementOfMultiplicityRangeIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfMultiplicityRangeIterator.MoveNext(); - MultiplicityRangeTextualNotationBuilder.BuildMultiplicityRange(ownedRelatedElementOfMultiplicityRangeIterator.Current, stringBuilder); + + if (ownedRelatedElementOfMultiplicityRangeIterator.Current != null) + { + MultiplicityRangeTextualNotationBuilder.BuildMultiplicityRange(ownedRelatedElementOfMultiplicityRangeIterator.Current, stringBuilder); + } } @@ -129,7 +145,11 @@ public static void BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namesp { using var ownedRelatedElementOfMultiplicityIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfMultiplicityIterator.MoveNext(); - MultiplicityTextualNotationBuilder.BuildEmptyMultiplicity(ownedRelatedElementOfMultiplicityIterator.Current, stringBuilder); + + if (ownedRelatedElementOfMultiplicityIterator.Current != null) + { + MultiplicityTextualNotationBuilder.BuildEmptyMultiplicity(ownedRelatedElementOfMultiplicityIterator.Current, stringBuilder); + } } @@ -143,7 +163,11 @@ public static void BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root { using var ownedRelatedElementOfConjugatedPortDefinitionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfConjugatedPortDefinitionIterator.MoveNext(); - ConjugatedPortDefinitionTextualNotationBuilder.BuildConjugatedPortDefinition(ownedRelatedElementOfConjugatedPortDefinitionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfConjugatedPortDefinitionIterator.Current != null) + { + ConjugatedPortDefinitionTextualNotationBuilder.BuildConjugatedPortDefinition(ownedRelatedElementOfConjugatedPortDefinitionIterator.Current, stringBuilder); + } } @@ -157,7 +181,11 @@ public static void BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.N { using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildOwnedCrossMultiplicity(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildOwnedCrossMultiplicity(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } @@ -171,7 +199,11 @@ public static void BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namesp { using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildOwnedFeatureChain(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildOwnedFeatureChain(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } @@ -185,7 +217,11 @@ public static void BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Nam { using var ownedRelatedElementOfSuccessionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfSuccessionIterator.MoveNext(); - SuccessionTextualNotationBuilder.BuildTransitionSuccession(ownedRelatedElementOfSuccessionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfSuccessionIterator.Current != null) + { + SuccessionTextualNotationBuilder.BuildTransitionSuccession(ownedRelatedElementOfSuccessionIterator.Current, stringBuilder); + } } @@ -200,7 +236,11 @@ public static void BuildPrefixMetadataMember(SysML2.NET.Core.POCO.Root.Namespace using var ownedRelatedElementOfMetadataUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("#"); ownedRelatedElementOfMetadataUsageIterator.MoveNext(); - MetadataUsageTextualNotationBuilder.BuildPrefixMetadataUsage(ownedRelatedElementOfMetadataUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfMetadataUsageIterator.Current != null) + { + MetadataUsageTextualNotationBuilder.BuildPrefixMetadataUsage(ownedRelatedElementOfMetadataUsageIterator.Current, stringBuilder); + } } @@ -226,7 +266,11 @@ public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IO using var ownedRelatedElementIterator = poco.OwnedRelatedElement.GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementIterator.MoveNext(); - ElementTextualNotationBuilder.BuildMemberElement(ownedRelatedElementIterator.Current, stringBuilder); + + if (ownedRelatedElementIterator.Current != null) + { + ElementTextualNotationBuilder.BuildMemberElement(ownedRelatedElementIterator.Current, stringBuilder); + } } @@ -241,7 +285,11 @@ public static void BuildNamespaceFeatureMember(SysML2.NET.Core.POCO.Root.Namespa using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } @@ -268,7 +316,11 @@ public static void BuildTypeFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.I MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("member "); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs index 5a2a2f16..9f198a53 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs @@ -80,11 +80,19 @@ public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPack using var ownedRelationshipOfPackageIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfElementFilterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfPackageIterator.MoveNext(); - BuildFilterPackageImport(ownedRelationshipOfPackageIterator.Current, stringBuilder); + + if (ownedRelationshipOfPackageIterator.Current != null) + { + BuildFilterPackageImport(ownedRelationshipOfPackageIterator.Current, stringBuilder); + } while (ownedRelationshipOfElementFilterMembershipIterator.MoveNext()) { - ElementFilterMembershipTextualNotationBuilder.BuildFilterPackageMember(ownedRelationshipOfElementFilterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfElementFilterMembershipIterator.Current != null) + { + ElementFilterMembershipTextualNotationBuilder.BuildFilterPackageMember(ownedRelationshipOfElementFilterMembershipIterator.Current, stringBuilder); + } } stringBuilder.Append(' '); @@ -103,7 +111,11 @@ public static void BuildPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage po while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } BuildPackageDeclaration(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs index 410a1816..069f9a2f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors { using var ownedRelatedElementOfEventOccurrenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfEventOccurrenceUsageIterator.MoveNext(); - EventOccurrenceUsageTextualNotationBuilder.BuildMessageEvent(ownedRelatedElementOfEventOccurrenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfEventOccurrenceUsageIterator.Current != null) + { + EventOccurrenceUsageTextualNotationBuilder.BuildMessageEvent(ownedRelatedElementOfEventOccurrenceUsageIterator.Current, stringBuilder); + } } @@ -58,7 +62,11 @@ public static void BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behav { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildPayloadParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildPayloadParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -70,7 +78,11 @@ public static void BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behav /// The that contains the entire textual notation public static void BuildArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildArgument(poco.ownedMemberParameter, stringBuilder); + } } @@ -84,7 +96,11 @@ public static void BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Beh { using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildArgumentExpression(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildArgumentExpression(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } @@ -98,7 +114,11 @@ public static void BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behavior { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildNodeParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildNodeParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -112,7 +132,11 @@ public static void BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behavio { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildEmptyUsage(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildEmptyUsage(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -126,7 +150,11 @@ public static void BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behav { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildAssignmentTargetParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildAssignmentTargetParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -140,7 +168,11 @@ public static void BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Be { using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfExpressionIterator.MoveNext(); - ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } } @@ -154,7 +186,11 @@ public static void BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Be { using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfActionUsageIterator.MoveNext(); - ActionUsageTextualNotationBuilder.BuildActionBodyParameter(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildActionBodyParameter(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } } @@ -168,7 +204,11 @@ public static void BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behavi { using var ownedRelatedElementOfIfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfIfActionUsageIterator.MoveNext(); - IfActionUsageTextualNotationBuilder.BuildIfNode(ownedRelatedElementOfIfActionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfIfActionUsageIterator.Current != null) + { + IfActionUsageTextualNotationBuilder.BuildIfNode(ownedRelatedElementOfIfActionUsageIterator.Current, stringBuilder); + } } @@ -182,7 +222,11 @@ public static void BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behav { using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildMetadataArgument(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildMetadataArgument(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } @@ -194,7 +238,11 @@ public static void BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behav /// The that contains the entire textual notation public static void BuildTypeReferenceMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberFeature != null) + { + FeatureTextualNotationBuilder.BuildTypeReference(poco.ownedMemberFeature, stringBuilder); + } } @@ -206,7 +254,11 @@ public static void BuildTypeReferenceMember(SysML2.NET.Core.POCO.Kernel.Behavior /// The that contains the entire textual notation public static void BuildPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildPrimaryArgument(poco.ownedMemberParameter, stringBuilder); + } } @@ -218,7 +270,11 @@ public static void BuildPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behavi /// The that contains the entire textual notation public static void BuildNonFeatureChainPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildPrimaryArgument(poco.ownedMemberParameter, stringBuilder); + } } @@ -230,7 +286,11 @@ public static void BuildNonFeatureChainPrimaryArgumentMember(SysML2.NET.Core.POC /// The that contains the entire textual notation public static void BuildBodyArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildBodyArgument(poco.ownedMemberParameter, stringBuilder); + } } @@ -242,7 +302,11 @@ public static void BuildBodyArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors /// The that contains the entire textual notation public static void BuildFunctionReferenceArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedMemberParameter != null) + { + FeatureTextualNotationBuilder.BuildFunctionReferenceArgument(poco.ownedMemberParameter, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs index c554a6ff..f99f3579 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs @@ -48,8 +48,12 @@ public static void BuildPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IPortD stringBuilder.Append("def "); DefinitionTextualNotationBuilder.BuildDefinition(poco, stringBuilder); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildConjugatedPortDefinitionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); - // Assignment Element : conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition = this + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildConjugatedPortDefinitionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } + // NonParsing Assignment Element : conjugatedPortDefinition.ownedPortConjugator.originalPortDefinition = this => Does not have to be process } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs index 14545ef3..540b1d23 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs @@ -60,7 +60,11 @@ public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsa if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildOwnedCrossMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedCrossMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -73,7 +77,11 @@ public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsa } ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); - ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs index 75e6b414..faee9cdd 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs @@ -53,7 +53,7 @@ public static void BuildOwnedRedefinition(SysML2.NET.Core.POCO.Core.Features.IRe /// The that contains the entire textual notation public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); } @@ -65,7 +65,7 @@ public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Featur /// The that contains the entire textual notation public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs index 3fde433d..1e7a4cb1 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs @@ -70,7 +70,11 @@ public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.Definition { using var ownedRelationshipOfReferenceSubsettingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); - ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } FeatureTextualNotationBuilder.BuildFeatureSpecialization(poco, stringBuilder); UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); @@ -88,7 +92,11 @@ public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsag if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -108,7 +116,11 @@ public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndU if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildOwnedCrossMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedCrossMultiplicityMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -121,7 +133,11 @@ public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndU } ownedRelationshipOfReferenceSubsettingIterator.MoveNext(); - ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + + if (ownedRelationshipOfReferenceSubsettingIterator.Current != null) + { + ReferenceSubsettingTextualNotationBuilder.BuildOwnedReferenceSubsetting(ownedRelationshipOfReferenceSubsettingIterator.Current, stringBuilder); + } } @@ -135,7 +151,11 @@ public static void BuildFlowFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUs { using var ownedRelationshipOfRedefinitionIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfRedefinitionIterator.MoveNext(); - RedefinitionTextualNotationBuilder.BuildFlowFeatureRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildFlowFeatureRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } } @@ -160,7 +180,11 @@ public static void BuildNodeParameter(SysML2.NET.Core.POCO.Systems.DefinitionAnd { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildFeatureBinding(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildFeatureBinding(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -187,7 +211,11 @@ public static void BuildAssignmentTargetParameter(SysML2.NET.Core.POCO.Systems.D if (ownedRelationshipOfFeatureValueIterator.MoveNext()) { - FeatureValueTextualNotationBuilder.BuildAssignmentTargetBinding(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildAssignmentTargetBinding(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } stringBuilder.Append("."); stringBuilder.Append(' '); } @@ -242,7 +270,11 @@ public static void BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.Defin { using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfFeatureValueIterator.MoveNext(); - FeatureValueTextualNotationBuilder.BuildSatisfactionFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildSatisfactionFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } } @@ -258,7 +290,11 @@ public static void BuildMetadataBodyUsage(SysML2.NET.Core.POCO.Systems.Definitio stringBuilder.Append("ref "); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfRedefinitionIterator.MoveNext(); - RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + + if (ownedRelationshipOfRedefinitionIterator.Current != null) + { + RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); + } FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco, stringBuilder); FeatureTextualNotationBuilder.BuildValuePart(poco, stringBuilder); TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs index 96bbfb04..6bc28e37 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs @@ -46,7 +46,11 @@ public static void BuildRequirementConstraintMember(SysML2.NET.Core.POCO.Systems MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); BuildRequirementKind(poco, stringBuilder); ownedRelatedElementOfConstraintUsageIterator.MoveNext(); - ConstraintUsageTextualNotationBuilder.BuildRequirementConstraintUsage(ownedRelatedElementOfConstraintUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfConstraintUsageIterator.Current != null) + { + ConstraintUsageTextualNotationBuilder.BuildRequirementConstraintUsage(ownedRelatedElementOfConstraintUsageIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs index acf3e3c8..9fc0e309 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs @@ -45,9 +45,13 @@ public static void BuildRequirementVerificationMember(SysML2.NET.Core.POCO.Syste using var ownedRelatedElementOfRequirementUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("verify "); - // Assignment Element : kind = 'requirement' + // NonParsing Assignment Element : kind = 'requirement' => Does not have to be process ownedRelatedElementOfRequirementUsageIterator.MoveNext(); - RequirementUsageTextualNotationBuilder.BuildRequirementVerificationUsage(ownedRelatedElementOfRequirementUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfRequirementUsageIterator.Current != null) + { + RequirementUsageTextualNotationBuilder.BuildRequirementVerificationUsage(ownedRelatedElementOfRequirementUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs index 82442930..aa2417e8 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs @@ -45,7 +45,11 @@ public static void BuildResultExpressionMember(SysML2.NET.Core.POCO.Kernel.Funct using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfExpressionIterator.MoveNext(); - ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs index 6cf95b1d..1daf515f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs @@ -46,7 +46,11 @@ public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functi MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("return "); ownedRelatedElementOfUsageIterator.MoveNext(); - UsageTextualNotationBuilder.BuildUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfUsageIterator.Current != null) + { + UsageTextualNotationBuilder.BuildUsageElement(ownedRelatedElementOfUsageIterator.Current, stringBuilder); + } } @@ -62,7 +66,11 @@ public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Function MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("return "); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildFeatureElement(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } @@ -76,7 +84,11 @@ public static void BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions. { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildEmptyFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildEmptyFeature(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -90,7 +102,11 @@ public static void BuildConstructorResultMember(SysML2.NET.Core.POCO.Kernel.Func { using var ownedRelatedElementOfFeatureIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfFeatureIterator.MoveNext(); - FeatureTextualNotationBuilder.BuildConstructorResult(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + + if (ownedRelatedElementOfFeatureIterator.Current != null) + { + FeatureTextualNotationBuilder.BuildConstructorResult(ownedRelatedElementOfFeatureIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs index 0d6e3994..20dab291 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs @@ -57,7 +57,11 @@ public static void BuildSatisfyRequirementUsage(SysML2.NET.Core.POCO.Systems.Req if (ownedRelationshipOfSubjectMembershipIterator.MoveNext()) { stringBuilder.Append("by "); - SubjectMembershipTextualNotationBuilder.BuildSatisfactionSubjectMember(ownedRelationshipOfSubjectMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfSubjectMembershipIterator.Current != null) + { + SubjectMembershipTextualNotationBuilder.BuildSatisfactionSubjectMember(ownedRelationshipOfSubjectMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs index e0d1f413..c0276adc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs @@ -44,10 +44,18 @@ public static void BuildSelectExpression(SysML2.NET.Core.POCO.Kernel.Expressions { using var ownedRelationshipOfParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildPrimaryArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(".? "); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildBodyArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildBodyArgumentMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs index 075a2ce4..f319cd25 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs @@ -63,7 +63,11 @@ public static void BuildSendNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions ActionUsageTextualNotationBuilder.BuildActionNodeUsageDeclaration(poco, stringBuilder); stringBuilder.Append("send "); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } BuildSenderReceiverPart(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs index f6a5d022..93c35b22 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs @@ -45,7 +45,11 @@ public static void BuildStakeholderMember(SysML2.NET.Core.POCO.Systems.Requireme using var ownedRelatedElementOfPartUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfPartUsageIterator.MoveNext(); - PartUsageTextualNotationBuilder.BuildStakeholderUsage(ownedRelatedElementOfPartUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfPartUsageIterator.Current != null) + { + PartUsageTextualNotationBuilder.BuildStakeholderUsage(ownedRelatedElementOfPartUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs index 9b3cf0a1..9f7ea384 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs @@ -46,7 +46,11 @@ public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IS MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append(poco.Kind.ToString().ToLower()); ownedRelatedElementOfActionUsageIterator.MoveNext(); - ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } } @@ -62,7 +66,11 @@ public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStat MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append(poco.Kind.ToString().ToLower()); ownedRelatedElementOfActionUsageIterator.MoveNext(); - ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } } @@ -78,7 +86,11 @@ public static void BuildExitActionMember(SysML2.NET.Core.POCO.Systems.States.ISt MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append(poco.Kind.ToString().ToLower()); ownedRelatedElementOfActionUsageIterator.MoveNext(); - ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildStateActionUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs index e0552084..e6aedc8d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs @@ -48,7 +48,11 @@ public static void BuildStep(SysML2.NET.Core.POCO.Kernel.Behaviors.IStep poco, S while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs index 01021c75..5ad75a00 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs @@ -42,7 +42,7 @@ public static partial class SubclassificationTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); } @@ -63,9 +63,9 @@ public static void BuildSubclassification(SysML2.NET.Core.POCO.Core.Classifiers. } stringBuilder.Append("subclassifier "); - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs index 03a9b85a..9be7c4ee 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs @@ -45,7 +45,11 @@ public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements. using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildSubjectUsage(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildSubjectUsage(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } @@ -59,7 +63,11 @@ public static void BuildSatisfactionSubjectMember(SysML2.NET.Core.POCO.Systems.R { using var ownedRelatedElementOfReferenceUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); ownedRelatedElementOfReferenceUsageIterator.MoveNext(); - ReferenceUsageTextualNotationBuilder.BuildSatisfactionParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfReferenceUsageIterator.Current != null) + { + ReferenceUsageTextualNotationBuilder.BuildSatisfactionParameter(ownedRelatedElementOfReferenceUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs index f5d4bc4a..37e7c62b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connection { using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildSourceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildSourceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } } @@ -58,10 +62,18 @@ public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connection { using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildSourceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildSourceEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("then "); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } } @@ -85,10 +97,18 @@ public static void BuildSuccessionAsUsage(SysML2.NET.Core.POCO.Systems.Connectio stringBuilder.Append("first "); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("then "); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs index 77c0e3d4..31051b1d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs @@ -48,7 +48,11 @@ public static void BuildSuccessionFlow(SysML2.NET.Core.POCO.Kernel.Interactions. while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs index ee566bb7..6e4febc5 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs @@ -44,9 +44,17 @@ public static void BuildTransitionSuccession(SysML2.NET.Core.POCO.Kernel.Connect { using var ownedRelationshipOfEndFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildEmptyEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildEmptyEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfEndFeatureMembershipIterator.MoveNext(); - EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfEndFeatureMembershipIterator.Current != null) + { + EndFeatureMembershipTextualNotationBuilder.BuildConnectorEndMember(ownedRelationshipOfEndFeatureMembershipIterator.Current, stringBuilder); + } } @@ -75,7 +83,11 @@ public static void BuildSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISucce while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs index e9f63b7c..a361fe09 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs @@ -49,7 +49,11 @@ public static void BuildTerminateNode(SysML2.NET.Core.POCO.Systems.Actions.ITerm if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { - ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildNodeParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs index 9ac50fa3..554f93de 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs @@ -44,9 +44,13 @@ public static void BuildTriggerActionMember(SysML2.NET.Core.POCO.Systems.States. { using var ownedRelatedElementOfAcceptActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("accept "); - // Assignment Element : kind = 'trigger' + // NonParsing Assignment Element : kind = 'trigger' => Does not have to be process ownedRelatedElementOfAcceptActionUsageIterator.MoveNext(); - AcceptActionUsageTextualNotationBuilder.BuildTriggerAction(ownedRelatedElementOfAcceptActionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfAcceptActionUsageIterator.Current != null) + { + AcceptActionUsageTextualNotationBuilder.BuildTriggerAction(ownedRelatedElementOfAcceptActionUsageIterator.Current, stringBuilder); + } } @@ -60,9 +64,13 @@ public static void BuildGuardExpressionMember(SysML2.NET.Core.POCO.Systems.State { using var ownedRelatedElementOfExpressionIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("if "); - // Assignment Element : kind = 'guard' + // NonParsing Assignment Element : kind = 'guard' => Does not have to be process ownedRelatedElementOfExpressionIterator.MoveNext(); - ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + + if (ownedRelatedElementOfExpressionIterator.Current != null) + { + ExpressionTextualNotationBuilder.BuildOwnedExpression(ownedRelatedElementOfExpressionIterator.Current, stringBuilder); + } } @@ -76,9 +84,13 @@ public static void BuildEffectBehaviorMember(SysML2.NET.Core.POCO.Systems.States { using var ownedRelatedElementOfActionUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); stringBuilder.Append("do "); - // Assignment Element : kind = 'effect' + // NonParsing Assignment Element : kind = 'effect' => Does not have to be process ownedRelatedElementOfActionUsageIterator.MoveNext(); - ActionUsageTextualNotationBuilder.BuildEffectBehaviorUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfActionUsageIterator.Current != null) + { + ActionUsageTextualNotationBuilder.BuildEffectBehaviorUsage(ownedRelatedElementOfActionUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs index 1114b93b..aec0cca0 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs @@ -45,10 +45,18 @@ public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.Sta using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext(); - TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("then "); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } @@ -63,7 +71,11 @@ public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.Sta using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("else "); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } @@ -88,12 +100,24 @@ public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.IT stringBuilder.Append("first "); ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext(); - TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append("then "); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } UsageTextualNotationBuilder.BuildUsageBody(poco, stringBuilder); } @@ -110,11 +134,19 @@ public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.State using var ownedRelationshipOfTransitionFeatureMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append("then "); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } @@ -141,34 +173,62 @@ public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITra } ownedRelationshipOfMembershipIterator.MoveNext(); - MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfMembershipIterator.Current != null) + { + MembershipTextualNotationBuilder.BuildFeatureChainMember(ownedRelationshipOfMembershipIterator.Current, stringBuilder); + } ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); - if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + if (ownedRelationshipOfParameterMembershipIterator.Current != null) { ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); - TransitionFeatureMembershipTextualNotationBuilder.BuildTriggerActionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } + + if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildEmptyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildTriggerActionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } if (ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext()) { - TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildGuardExpressionMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } if (ownedRelationshipOfTransitionFeatureMembershipIterator.MoveNext()) { - TransitionFeatureMembershipTextualNotationBuilder.BuildEffectBehaviorMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfTransitionFeatureMembershipIterator.Current != null) + { + TransitionFeatureMembershipTextualNotationBuilder.BuildEffectBehaviorMember(ownedRelationshipOfTransitionFeatureMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } stringBuilder.Append("then "); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildTransitionSuccessionMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } TypeTextualNotationBuilder.BuildActionBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs index d05381b2..af40eab9 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs @@ -42,7 +42,7 @@ public static partial class TypeFeaturingTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); } @@ -63,9 +63,9 @@ public static void BuildTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFe stringBuilder.Append(' '); } - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); stringBuilder.Append("by "); - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs index 421ad425..defced6a 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -135,7 +135,11 @@ public static void BuildCalculationBodyPart(SysML2.NET.Core.POCO.Core.Types.ITyp if (ownedRelationshipOfResultExpressionMembershipIterator.MoveNext()) { - ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfResultExpressionMembershipIterator.Current != null) + { + ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -227,7 +231,11 @@ public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, S while (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } @@ -253,7 +261,11 @@ public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType po if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedMultiplicity(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -276,12 +288,20 @@ public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType using var ownedRelationshipOfSpecializationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfSpecializationIterator.MoveNext(); - SpecializationTextualNotationBuilder.BuildOwnedSpecialization(ownedRelationshipOfSpecializationIterator.Current, stringBuilder); + + if (ownedRelationshipOfSpecializationIterator.Current != null) + { + SpecializationTextualNotationBuilder.BuildOwnedSpecialization(ownedRelationshipOfSpecializationIterator.Current, stringBuilder); + } while (ownedRelationshipOfSpecializationIterator.MoveNext()) { stringBuilder.Append(","); - SpecializationTextualNotationBuilder.BuildOwnedSpecialization(ownedRelationshipOfSpecializationIterator.Current, stringBuilder); + + if (ownedRelationshipOfSpecializationIterator.Current != null) + { + SpecializationTextualNotationBuilder.BuildOwnedSpecialization(ownedRelationshipOfSpecializationIterator.Current, stringBuilder); + } } @@ -298,7 +318,11 @@ public static void BuildConjugationPart(SysML2.NET.Core.POCO.Core.Types.IType po using var ownedRelationshipOfConjugationIterator = poco.OwnedRelationship.OfType().GetEnumerator(); throw new System.NotSupportedException("Multiple alternatives not implemented yet"); ownedRelationshipOfConjugationIterator.MoveNext(); - ConjugationTextualNotationBuilder.BuildOwnedConjugation(ownedRelationshipOfConjugationIterator.Current, stringBuilder); + + if (ownedRelationshipOfConjugationIterator.Current != null) + { + ConjugationTextualNotationBuilder.BuildOwnedConjugation(ownedRelationshipOfConjugationIterator.Current, stringBuilder); + } } @@ -325,12 +349,20 @@ public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poc stringBuilder.Append("disjoint "); stringBuilder.Append("from "); ownedRelationshipOfDisjoiningIterator.MoveNext(); - DisjoiningTextualNotationBuilder.BuildOwnedDisjoining(ownedRelationshipOfDisjoiningIterator.Current, stringBuilder); + + if (ownedRelationshipOfDisjoiningIterator.Current != null) + { + DisjoiningTextualNotationBuilder.BuildOwnedDisjoining(ownedRelationshipOfDisjoiningIterator.Current, stringBuilder); + } while (ownedRelationshipOfDisjoiningIterator.MoveNext()) { stringBuilder.Append(","); - DisjoiningTextualNotationBuilder.BuildOwnedDisjoining(ownedRelationshipOfDisjoiningIterator.Current, stringBuilder); + + if (ownedRelationshipOfDisjoiningIterator.Current != null) + { + DisjoiningTextualNotationBuilder.BuildOwnedDisjoining(ownedRelationshipOfDisjoiningIterator.Current, stringBuilder); + } } @@ -347,12 +379,20 @@ public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, using var ownedRelationshipOfUnioningIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("unions "); ownedRelationshipOfUnioningIterator.MoveNext(); - UnioningTextualNotationBuilder.BuildUnioning(ownedRelationshipOfUnioningIterator.Current, stringBuilder); + + if (ownedRelationshipOfUnioningIterator.Current != null) + { + UnioningTextualNotationBuilder.BuildUnioning(ownedRelationshipOfUnioningIterator.Current, stringBuilder); + } while (ownedRelationshipOfUnioningIterator.MoveNext()) { stringBuilder.Append(","); - UnioningTextualNotationBuilder.BuildUnioning(ownedRelationshipOfUnioningIterator.Current, stringBuilder); + + if (ownedRelationshipOfUnioningIterator.Current != null) + { + UnioningTextualNotationBuilder.BuildUnioning(ownedRelationshipOfUnioningIterator.Current, stringBuilder); + } } @@ -369,12 +409,20 @@ public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType p using var ownedRelationshipOfIntersectingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("intersects "); ownedRelationshipOfIntersectingIterator.MoveNext(); - IntersectingTextualNotationBuilder.BuildIntersecting(ownedRelationshipOfIntersectingIterator.Current, stringBuilder); + + if (ownedRelationshipOfIntersectingIterator.Current != null) + { + IntersectingTextualNotationBuilder.BuildIntersecting(ownedRelationshipOfIntersectingIterator.Current, stringBuilder); + } while (ownedRelationshipOfIntersectingIterator.MoveNext()) { stringBuilder.Append(","); - IntersectingTextualNotationBuilder.BuildIntersecting(ownedRelationshipOfIntersectingIterator.Current, stringBuilder); + + if (ownedRelationshipOfIntersectingIterator.Current != null) + { + IntersectingTextualNotationBuilder.BuildIntersecting(ownedRelationshipOfIntersectingIterator.Current, stringBuilder); + } } @@ -391,12 +439,20 @@ public static void BuildDifferencingPart(SysML2.NET.Core.POCO.Core.Types.IType p using var ownedRelationshipOfDifferencingIterator = poco.OwnedRelationship.OfType().GetEnumerator(); stringBuilder.Append("differences "); ownedRelationshipOfDifferencingIterator.MoveNext(); - DifferencingTextualNotationBuilder.BuildDifferencing(ownedRelationshipOfDifferencingIterator.Current, stringBuilder); + + if (ownedRelationshipOfDifferencingIterator.Current != null) + { + DifferencingTextualNotationBuilder.BuildDifferencing(ownedRelationshipOfDifferencingIterator.Current, stringBuilder); + } while (ownedRelationshipOfDifferencingIterator.MoveNext()) { stringBuilder.Append(","); - DifferencingTextualNotationBuilder.BuildDifferencing(ownedRelationshipOfDifferencingIterator.Current, stringBuilder); + + if (ownedRelationshipOfDifferencingIterator.Current != null) + { + DifferencingTextualNotationBuilder.BuildDifferencing(ownedRelationshipOfDifferencingIterator.Current, stringBuilder); + } } @@ -453,7 +509,11 @@ public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType p if (ownedRelationshipOfResultExpressionMembershipIterator.MoveNext()) { - ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfResultExpressionMembershipIterator.Current != null) + { + ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -468,7 +528,7 @@ public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType p /// The that contains the entire textual notation public static void BuildInstantiatedTypeReference(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { - // Value Literal Element : [QualifiedName] + stringBuilder.Append(poco.qualifiedName); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs index 238a8528..6609d26f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs @@ -110,7 +110,11 @@ public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAn if (ownedRelationshipOfOwningMembershipIterator.MoveNext()) { - OwningMembershipTextualNotationBuilder.BuildOwnedCrossFeatureMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildOwnedCrossFeatureMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(' '); } @@ -127,7 +131,11 @@ public static void BuildUsageExtensionKeyword(SysML2.NET.Core.POCO.Systems.Defin { using var ownedRelationshipOfOwningMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); ownedRelationshipOfOwningMembershipIterator.MoveNext(); - OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfOwningMembershipIterator.Current != null) + { + OwningMembershipTextualNotationBuilder.BuildPrefixMetadataMember(ownedRelationshipOfOwningMembershipIterator.Current, stringBuilder); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs index e4e42d21..779cd53e 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs @@ -44,7 +44,11 @@ public static void BuildVariantUsageMember(SysML2.NET.Core.POCO.Systems.Definiti { MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("variant "); - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + + if (poco.ownedVariantUsage != null) + { + UsageTextualNotationBuilder.BuildVariantUsageElement(poco.ownedVariantUsage, stringBuilder); + } } @@ -59,7 +63,11 @@ public static void BuildEnumerationUsageMember(SysML2.NET.Core.POCO.Systems.Defi using var ownedRelatedElementOfEnumerationUsageIterator = poco.OwnedRelatedElement.OfType().GetEnumerator(); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); ownedRelatedElementOfEnumerationUsageIterator.MoveNext(); - EnumerationUsageTextualNotationBuilder.BuildEnumeratedValue(ownedRelatedElementOfEnumerationUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfEnumerationUsageIterator.Current != null) + { + EnumerationUsageTextualNotationBuilder.BuildEnumeratedValue(ownedRelatedElementOfEnumerationUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs index 6f679e46..d94ba091 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs @@ -46,7 +46,11 @@ public static void BuildViewRenderingMember(SysML2.NET.Core.POCO.Systems.Views.I MembershipTextualNotationBuilder.BuildMemberPrefix(poco, stringBuilder); stringBuilder.Append("render "); ownedRelatedElementOfRenderingUsageIterator.MoveNext(); - RenderingUsageTextualNotationBuilder.BuildViewRenderingUsage(ownedRelatedElementOfRenderingUsageIterator.Current, stringBuilder); + + if (ownedRelatedElementOfRenderingUsageIterator.Current != null) + { + RenderingUsageTextualNotationBuilder.BuildViewRenderingUsage(ownedRelatedElementOfRenderingUsageIterator.Current, stringBuilder); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs index aa1baa19..89684b3b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs @@ -47,12 +47,20 @@ public static void BuildWhileLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IWhil throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); ownedRelationshipOfParameterMembershipIterator.MoveNext(); - ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildActionBodyParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } if (ownedRelationshipOfParameterMembershipIterator.MoveNext()) { stringBuilder.Append("until "); - ParameterMembershipTextualNotationBuilder.BuildExpressionParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + + if (ownedRelationshipOfParameterMembershipIterator.Current != null) + { + ParameterMembershipTextualNotationBuilder.BuildExpressionParameterMember(ownedRelationshipOfParameterMembershipIterator.Current, stringBuilder); + } stringBuilder.Append(";"); stringBuilder.Append(' '); } From a312e317a5c34336feab8c9ec2f2ab21ba49558d Mon Sep 17 00:00:00 2001 From: atheate Date: Thu, 5 Mar 2026 17:18:54 +0100 Subject: [PATCH 11/15] [WIP] ix FeatureMembershipTextualNotationBuilder --- .../HandleBarHelpers/RulesHelper.cs | 74 +++++++++++++------ ...FeatureMembershipTextualNotationBuilder.cs | 38 +++++++++- 2 files changed, 86 insertions(+), 26 deletions(-) diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index 226423f1..9974460b 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -93,7 +93,7 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas var elements = alternative.Elements; DeclareAllRequiredIterators(writer, umlClass, alternative, ruleGenerationContext); - if (ruleGenerationContext.CallerRule is { IsOptional: true, IsCollection: false }) + if (ruleGenerationContext.CallerContext?.CallerRule is { IsOptional: true, IsCollection: false }) { var targetPropertiesName = elements.OfType().Select(x => x.Property).Distinct().ToList(); var allProperties = umlClass.QueryAllProperties(); @@ -127,9 +127,9 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas foreach (var textualRuleElement in elements) { - var previousCaller = ruleGenerationContext.CallerRule; + var previousCaller = ruleGenerationContext.CallerContext; ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext); - ruleGenerationContext.CallerRule = previousCaller; + ruleGenerationContext.CallerContext = previousCaller; } } else @@ -150,9 +150,9 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas { foreach (var textualRuleElement in elements) { - var previousCaller = ruleGenerationContext.CallerRule; + var previousCaller = ruleGenerationContext.CallerContext; ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext); - ruleGenerationContext.CallerRule = previousCaller; + ruleGenerationContext.CallerContext = previousCaller; } } } @@ -215,11 +215,18 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass writer.WriteSafeString($"stringBuilder.Append(\"{valueToAdd}\");"); break; case NonTerminalElement nonTerminalElement: - ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, "poco", umlClass, ruleGenerationContext); + if (ruleGenerationContext.CallerContext?.CallerRule is NonTerminalElement callerNonTerminalElement && callerNonTerminalElement.Container is AssignmentElement) + { + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, "poco", ruleGenerationContext.CallerContext.CallerClassContext, ruleGenerationContext); + } + else + { + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, "poco", umlClass, ruleGenerationContext); + } break; case GroupElement groupElement: - ruleGenerationContext.CallerRule = groupElement; + ruleGenerationContext.CallerContext = new CallerContext(groupElement); if (groupElement.IsCollection) { @@ -304,10 +311,10 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass { if (assignmentElement.Value is NonTerminalElement nonTerminalElement) { - var previousCaller = ruleGenerationContext.CallerRule; - ruleGenerationContext.CallerRule = nonTerminalElement; + var previousCaller = ruleGenerationContext.CallerContext; + ruleGenerationContext.CallerContext = new CallerContext(nonTerminalElement); ProcessNonTerminalElement(writer, targetProperty.Type as IClass, nonTerminalElement, $"poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}", umlClass, ruleGenerationContext); - ruleGenerationContext.CallerRule = previousCaller; + ruleGenerationContext.CallerContext = previousCaller; } else { @@ -385,18 +392,18 @@ private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass u } else { - var previousCaller = ruleGenerationContext.CallerRule; - ruleGenerationContext.CallerRule = nonTerminalElement; - ProcessAlternatives(writer, umlClass, referencedRule?.Alternatives, ruleGenerationContext); - ruleGenerationContext.CallerRule = previousCaller; + var previousCaller = ruleGenerationContext.CallerContext; + ruleGenerationContext.CallerContext = new CallerContext(nonTerminalElement, targetType as IClass); + ProcessAlternatives(writer, callerClass, referencedRule?.Alternatives, ruleGenerationContext); + ruleGenerationContext.CallerContext = previousCaller; } } else { - var previousCaller = ruleGenerationContext.CallerRule; - ruleGenerationContext.CallerRule = nonTerminalElement; - ProcessAlternatives(writer, umlClass, referencedRule?.Alternatives, ruleGenerationContext); - ruleGenerationContext.CallerRule = previousCaller; + var previousCaller = ruleGenerationContext.CallerContext; + ruleGenerationContext.CallerContext = new CallerContext(nonTerminalElement); + ProcessAlternatives(writer, callerClass, referencedRule?.Alternatives, ruleGenerationContext); + ruleGenerationContext.CallerContext = previousCaller; } } else @@ -552,6 +559,29 @@ public bool IsIteratorValidForProperty(IProperty property, TextualNotationRule t } } + /// + /// Provide context about the caller context + /// + private class CallerContext + { + /// Initializes a new instance of the class. + public CallerContext(RuleElement callerRule, IClass callerClassContext = null) + { + this.CallerRule = callerRule; + this.CallerClassContext = callerClassContext; + } + + /// + /// Gets or sets the that called other rule + /// + public RuleElement CallerRule { get; } + + /// + /// Gets or sets the used during the caller rule + /// + public IClass CallerClassContext { get; } + } + /// /// Provides context over the rule generation history /// @@ -563,14 +593,14 @@ private class RuleGenerationContext public List DefinedIterators { get; set; } /// - /// Gets or sets the that called other rule + /// Gets the collection of all available /// - public RuleElement CallerRule { get; set; } + public List AllRules { get; } = []; /// - /// Gets the collection of all available + /// Gets or sets the /// - public List AllRules { get; } = []; + public CallerContext CallerContext { get; set; } } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs index 3a780242..b4f6549b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -379,9 +379,21 @@ public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types. { RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); } - BuildFeatureSpecializationPart(poco, stringBuilder); - BuildValuePart(poco, stringBuilder); - TypeTextualNotationBuilder.BuildMetadataBody(poco, stringBuilder); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + if (ownedRelationshipOfFeatureValueIterator.MoveNext()) + { + ownedRelationshipOfFeatureValueIterator.MoveNext(); + + if (ownedRelationshipOfFeatureValueIterator.Current != null) + { + FeatureValueTextualNotationBuilder.BuildFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); + } + stringBuilder.Append(' '); + } + + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); } @@ -503,7 +515,25 @@ public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFe if (poco.ownedMemberFeature != null) { stringBuilder.Append("{"); - TypeTextualNotationBuilder.BuildFunctionBodyPart(poco, stringBuilder); + using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + using var ownedRelationshipOfResultExpressionMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); + + while (ownedRelationshipOfReturnParameterMembershipIterator.MoveNext()) + { + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + } + + if (ownedRelationshipOfResultExpressionMembershipIterator.MoveNext()) + { + + if (ownedRelationshipOfResultExpressionMembershipIterator.Current != null) + { + ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); + } + stringBuilder.Append(' '); + } + + stringBuilder.Append("}"); } From a27b1b411c68b41693effc30b65eeadb2db67ae7 Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 6 Mar 2026 09:37:44 +0100 Subject: [PATCH 12/15] [WIP] Correctly implemented reference assignement --- ...tualNotationBuilderGeneratorTestFixture.cs | 2 + .../HandleBarHelpers/RulesHelper.cs | 91 ++++++++----------- ...FeatureMembershipTextualNotationBuilder.cs | 38 +++----- 3 files changed, 54 insertions(+), 77 deletions(-) diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs index 373705c5..6cd7b17e 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs @@ -30,6 +30,8 @@ namespace SysML2.NET.CodeGenerator.Tests.Generators.UmlHandleBarsGenerators using SysML2.NET.CodeGenerator.Grammar; using SysML2.NET.CodeGenerator.Grammar.Model; + using uml4net.CommonStructure; + [TestFixture] public class UmlCoreTextualNotationBuilderGeneratorTestFixture { diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index 9974460b..0ec75555 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -69,7 +69,7 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) if (namedElement is IClass umlClass) { - var ruleGenerationContext = new RuleGenerationContext(); + var ruleGenerationContext = new RuleGenerationContext(namedElement); ruleGenerationContext.AllRules.AddRange(allRules); ProcessAlternatives(writer, umlClass, textualRule.Alternatives, ruleGenerationContext); } @@ -93,7 +93,7 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas var elements = alternative.Elements; DeclareAllRequiredIterators(writer, umlClass, alternative, ruleGenerationContext); - if (ruleGenerationContext.CallerContext?.CallerRule is { IsOptional: true, IsCollection: false }) + if (ruleGenerationContext.CallerRule is { IsOptional: true, IsCollection: false }) { var targetPropertiesName = elements.OfType().Select(x => x.Property).Distinct().ToList(); var allProperties = umlClass.QueryAllProperties(); @@ -127,9 +127,9 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas foreach (var textualRuleElement in elements) { - var previousCaller = ruleGenerationContext.CallerContext; + var previousCaller = ruleGenerationContext.CallerRule; ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext); - ruleGenerationContext.CallerContext = previousCaller; + ruleGenerationContext.CallerRule = previousCaller; } } else @@ -150,9 +150,9 @@ private static void ProcessAlternatives(EncodedTextWriter writer, IClass umlClas { foreach (var textualRuleElement in elements) { - var previousCaller = ruleGenerationContext.CallerContext; + var previousCaller = ruleGenerationContext.CallerRule; ProcessRuleElement(writer, umlClass, textualRuleElement, ruleGenerationContext); - ruleGenerationContext.CallerContext = previousCaller; + ruleGenerationContext.CallerRule = previousCaller; } } } @@ -215,18 +215,20 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass writer.WriteSafeString($"stringBuilder.Append(\"{valueToAdd}\");"); break; case NonTerminalElement nonTerminalElement: - if (ruleGenerationContext.CallerContext?.CallerRule is NonTerminalElement callerNonTerminalElement && callerNonTerminalElement.Container is AssignmentElement) + if (ruleGenerationContext.CallerRule is NonTerminalElement { Container: AssignmentElement assignmentElementContainer }) { - ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, "poco", ruleGenerationContext.CallerContext.CallerClassContext, ruleGenerationContext); + var textualBuilderClass = ruleGenerationContext.NamedElementToGenerate as IClass; + var assignedProperty = textualBuilderClass.QueryAllProperties().SingleOrDefault(x => x.Name == assignmentElementContainer.Property); + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, assignedProperty == null ? "poco" : $"poco.{assignedProperty.QueryPropertyNameBasedOnUmlProperties()}", ruleGenerationContext); } else { - ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, "poco", umlClass, ruleGenerationContext); + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, "poco", ruleGenerationContext); } break; case GroupElement groupElement: - ruleGenerationContext.CallerContext = new CallerContext(groupElement); + ruleGenerationContext.CallerRule = groupElement ; if (groupElement.IsCollection) { @@ -270,7 +272,7 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass writer.WriteSafeString($"{iteratorToUse.IteratorVariableName}.MoveNext();{Environment.NewLine}"); } - ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, $"{iteratorToUse.IteratorVariableName}.Current", umlClass, ruleGenerationContext); + ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, $"{iteratorToUse.IteratorVariableName}.Current", ruleGenerationContext); } else { @@ -311,10 +313,10 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass { if (assignmentElement.Value is NonTerminalElement nonTerminalElement) { - var previousCaller = ruleGenerationContext.CallerContext; - ruleGenerationContext.CallerContext = new CallerContext(nonTerminalElement); - ProcessNonTerminalElement(writer, targetProperty.Type as IClass, nonTerminalElement, $"poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}", umlClass, ruleGenerationContext); - ruleGenerationContext.CallerContext = previousCaller; + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + ProcessNonTerminalElement(writer, targetProperty.Type as IClass, nonTerminalElement, $"poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}", ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; } else { @@ -355,9 +357,8 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass /// The related /// The to process /// The name of the variable that should be used to call the non-terminal method - /// Gets the that initially calls this function /// - private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass umlClass, NonTerminalElement nonTerminalElement, string variableName, IClass callerClass, RuleGenerationContext ruleGenerationContext) + private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass umlClass, NonTerminalElement nonTerminalElement, string variableName, RuleGenerationContext ruleGenerationContext) { var referencedRule = ruleGenerationContext.AllRules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); @@ -380,7 +381,7 @@ private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass u writer.WriteSafeString($"{{{Environment.NewLine}"); } - if (typeTarget != callerClass.Name) + if (typeTarget != ruleGenerationContext.NamedElementToGenerate.Name) { var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); @@ -392,18 +393,18 @@ private static void ProcessNonTerminalElement(EncodedTextWriter writer, IClass u } else { - var previousCaller = ruleGenerationContext.CallerContext; - ruleGenerationContext.CallerContext = new CallerContext(nonTerminalElement, targetType as IClass); - ProcessAlternatives(writer, callerClass, referencedRule?.Alternatives, ruleGenerationContext); - ruleGenerationContext.CallerContext = previousCaller; + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + ProcessAlternatives(writer, umlClass, referencedRule?.Alternatives, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; } } else { - var previousCaller = ruleGenerationContext.CallerContext; - ruleGenerationContext.CallerContext = new CallerContext(nonTerminalElement); - ProcessAlternatives(writer, callerClass, referencedRule?.Alternatives, ruleGenerationContext); - ruleGenerationContext.CallerContext = previousCaller; + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + ProcessAlternatives(writer, umlClass, referencedRule?.Alternatives, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; } } else @@ -559,29 +560,6 @@ public bool IsIteratorValidForProperty(IProperty property, TextualNotationRule t } } - /// - /// Provide context about the caller context - /// - private class CallerContext - { - /// Initializes a new instance of the class. - public CallerContext(RuleElement callerRule, IClass callerClassContext = null) - { - this.CallerRule = callerRule; - this.CallerClassContext = callerClassContext; - } - - /// - /// Gets or sets the that called other rule - /// - public RuleElement CallerRule { get; } - - /// - /// Gets or sets the used during the caller rule - /// - public IClass CallerClassContext { get; } - } - /// /// Provides context over the rule generation history /// @@ -598,9 +576,20 @@ private class RuleGenerationContext public List AllRules { get; } = []; /// - /// Gets or sets the + /// Gets or sets the that called other rule + /// + public RuleElement CallerRule { get; set; } + + /// Initializes a new instance of the class. + public RuleGenerationContext(INamedElement namedElementToGenerate) + { + this.NamedElementToGenerate = namedElementToGenerate; + } + + /// + /// Gets the that is used in the current generation /// - public CallerContext CallerContext { get; set; } + public INamedElement NamedElementToGenerate { get; } } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs index b4f6549b..6a6dab0b 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -379,21 +379,21 @@ public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types. { RedefinitionTextualNotationBuilder.BuildOwnedRedefinition(ownedRelationshipOfRedefinitionIterator.Current, stringBuilder); } - throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - using var ownedRelationshipOfFeatureValueIterator = poco.OwnedRelationship.OfType().GetEnumerator(); - if (ownedRelationshipOfFeatureValueIterator.MoveNext()) + if (poco.ownedMemberFeature != null) { - ownedRelationshipOfFeatureValueIterator.MoveNext(); + FeatureTextualNotationBuilder.BuildFeatureSpecializationPart(poco.ownedMemberFeature, stringBuilder); + } - if (ownedRelationshipOfFeatureValueIterator.Current != null) - { - FeatureValueTextualNotationBuilder.BuildFeatureValue(ownedRelationshipOfFeatureValueIterator.Current, stringBuilder); - } - stringBuilder.Append(' '); + if (poco.ownedMemberFeature != null) + { + FeatureTextualNotationBuilder.BuildValuePart(poco.ownedMemberFeature, stringBuilder); } - throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + if (poco.ownedMemberFeature != null) + { + TypeTextualNotationBuilder.BuildMetadataBody(poco.ownedMemberFeature, stringBuilder); + } } @@ -515,25 +515,11 @@ public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFe if (poco.ownedMemberFeature != null) { stringBuilder.Append("{"); - using var ownedRelationshipOfReturnParameterMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); - using var ownedRelationshipOfResultExpressionMembershipIterator = poco.OwnedRelationship.OfType().GetEnumerator(); - while (ownedRelationshipOfReturnParameterMembershipIterator.MoveNext()) + if (poco.ownedMemberFeature != null) { - throw new System.NotSupportedException("Multiple alternatives not implemented yet"); + TypeTextualNotationBuilder.BuildFunctionBodyPart(poco.ownedMemberFeature, stringBuilder); } - - if (ownedRelationshipOfResultExpressionMembershipIterator.MoveNext()) - { - - if (ownedRelationshipOfResultExpressionMembershipIterator.Current != null) - { - ResultExpressionMembershipTextualNotationBuilder.BuildResultExpressionMember(ownedRelationshipOfResultExpressionMembershipIterator.Current, stringBuilder); - } - stringBuilder.Append(' '); - } - - stringBuilder.Append("}"); } From 6ee629ee71b9a34b13ccdb0bd91066739975ba2a Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 6 Mar 2026 11:05:46 +0100 Subject: [PATCH 13/15] [WIP] Reference property with ValueLiteral supported --- ...tualNotationBuilderGeneratorTestFixture.cs | 2 -- .../Grammar/Model/ValueLiteralElement.cs | 8 +++++- .../HandleBarHelpers/RulesHelper.cs | 28 +++++++++++++++---- .../AnnotationTextualNotationBuilder.cs | 7 ++++- .../FeatureChainingTextualNotationBuilder.cs | 7 ++++- .../FeatureTextualNotationBuilder.cs | 1 + .../FeatureTypingTextualNotationBuilder.cs | 7 ++++- .../MembershipImportTextualNotationBuilder.cs | 7 ++++- .../MembershipTextualNotationBuilder.cs | 15 ++++++++-- .../RedefinitionTextualNotationBuilder.cs | 14 ++++++++-- ...SubclassificationTextualNotationBuilder.cs | 21 ++++++++++++-- .../TypeFeaturingTextualNotationBuilder.cs | 21 ++++++++++++-- .../TypeTextualNotationBuilder.cs | 1 + 13 files changed, 117 insertions(+), 22 deletions(-) diff --git a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs index 6cd7b17e..373705c5 100644 --- a/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs +++ b/SysML2.NET.CodeGenerator.Tests/Generators/UmlHandleBarsGenerators/UmlCoreTextualNotationBuilderGeneratorTestFixture.cs @@ -30,8 +30,6 @@ namespace SysML2.NET.CodeGenerator.Tests.Generators.UmlHandleBarsGenerators using SysML2.NET.CodeGenerator.Grammar; using SysML2.NET.CodeGenerator.Grammar.Model; - using uml4net.CommonStructure; - [TestFixture] public class UmlCoreTextualNotationBuilderGeneratorTestFixture { diff --git a/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs b/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs index e85b673a..1bf51879 100644 --- a/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs +++ b/SysML2.NET.CodeGenerator/Grammar/Model/ValueLiteralElement.cs @@ -28,6 +28,12 @@ public class ValueLiteralElement: RuleElement /// /// Gets or sets the literal value /// - public string Value { get; set; } + public string Value { get; init; } + + /// + /// Asserts that this value literal is to + /// + /// + public bool QueryIsQualifiedName() => this.Value == "[QualifiedName]"; } } diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index 0ec75555..a0d48bc0 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -290,9 +290,11 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass } else { + var targetPropertyName = targetProperty.QueryPropertyNameBasedOnUmlProperties(); + if (targetProperty.QueryIsString()) { - writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()});"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName});"); } else if (targetProperty.QueryIsBool()) { @@ -302,12 +304,12 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass } else { - writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.ToString().ToLower());"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.ToString().ToLower());"); } } else if (targetProperty.QueryIsEnum()) { - writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()}.ToString().ToLower());"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.ToString().ToLower());"); } else if(targetProperty.QueryIsReferenceProperty()) { @@ -315,9 +317,17 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass { var previousCaller = ruleGenerationContext.CallerRule; ruleGenerationContext.CallerRule = nonTerminalElement; - ProcessNonTerminalElement(writer, targetProperty.Type as IClass, nonTerminalElement, $"poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}", ruleGenerationContext); + ProcessNonTerminalElement(writer, targetProperty.Type as IClass, nonTerminalElement, $"poco.{targetPropertyName}", ruleGenerationContext); ruleGenerationContext.CallerRule = previousCaller; } + else if (assignmentElement.Value is ValueLiteralElement valueLiteralElement && valueLiteralElement.QueryIsQualifiedName()) + { + writer.WriteSafeString($"{Environment.NewLine}if (poco.{targetPropertyName} != null){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.qualifiedName);{Environment.NewLine}"); + writer.WriteSafeString("stringBuilder.Append(' ');"); + writer.WriteSafeString($"{Environment.NewLine}}}"); + } else { writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of reference element not supported yet for this case\");"); @@ -340,7 +350,15 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass writer.WriteSafeString($"// NonParsing Assignment Element : {nonParsingAssignmentElement.PropertyName} {nonParsingAssignmentElement.Operator} {nonParsingAssignmentElement.Value} => Does not have to be process"); break; case ValueLiteralElement valueLiteralElement: - writer.WriteSafeString(valueLiteralElement.Value == "[QualifiedName]" ? "stringBuilder.Append(poco.qualifiedName);" : "throw new System.NotSupportedException(\"Value Literal different than QualifiedName not supported\");"); + if (valueLiteralElement.QueryIsQualifiedName()) + { + writer.WriteSafeString($"stringBuilder.Append(poco.qualifiedName);{Environment.NewLine}"); + writer.WriteSafeString("stringBuilder.Append(' ');"); + } + else + { + writer.WriteSafeString("throw new System.NotSupportedException(\"Value Literal different than QualifiedName not supported\");"); + } break; default: diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs index da8b1eb9..7f894330 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs @@ -85,7 +85,12 @@ public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annot /// The that contains the entire textual notation public static void BuildAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.AnnotatedElement != null) + { + stringBuilder.Append(poco.AnnotatedElement.qualifiedName); + stringBuilder.Append(' '); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs index 51c2af35..795d9f87 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs @@ -42,7 +42,12 @@ public static partial class FeatureChainingTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedFeatureChaining(SysML2.NET.Core.POCO.Core.Features.IFeatureChaining poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.ChainingFeature != null) + { + stringBuilder.Append(poco.ChainingFeature.qualifiedName); + stringBuilder.Append(' '); + } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs index cd8c73c5..74b34c46 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs @@ -729,6 +729,7 @@ public static void BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Feat public static void BuildFeatureReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, StringBuilder stringBuilder) { stringBuilder.Append(poco.qualifiedName); + stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs index 68b13b51..6c4f74df 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs @@ -53,7 +53,12 @@ public static void BuildOwnedFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IF /// The that contains the entire textual notation public static void BuildReferenceTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.Type != null) + { + stringBuilder.Append(poco.Type.qualifiedName); + stringBuilder.Append(' '); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs index 302d2da6..253583cf 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs @@ -42,7 +42,12 @@ public static partial class MembershipImportTextualNotationBuilder /// The that contains the entire textual notation public static void BuildMembershipImport(SysML2.NET.Core.POCO.Root.Namespaces.IMembershipImport poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.ImportedMembership != null) + { + stringBuilder.Append(poco.ImportedMembership.qualifiedName); + stringBuilder.Append(' '); + } if (poco.IsRecursive) { diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs index 4cf249cf..3d03d171 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs @@ -79,7 +79,12 @@ public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMember } stringBuilder.Append("for "); - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.MemberElement != null) + { + stringBuilder.Append(poco.MemberElement.qualifiedName); + stringBuilder.Append(' '); + } RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } @@ -107,6 +112,7 @@ public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespa if (poco.MemberElement != null) { stringBuilder.Append(poco.qualifiedName); + stringBuilder.Append(' '); } @@ -120,7 +126,12 @@ public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespa /// The that contains the entire textual notation public static void BuildElementReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.MemberElement != null) + { + stringBuilder.Append(poco.MemberElement.qualifiedName); + stringBuilder.Append(' '); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs index faee9cdd..4cb5deb2 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs @@ -53,7 +53,12 @@ public static void BuildOwnedRedefinition(SysML2.NET.Core.POCO.Core.Features.IRe /// The that contains the entire textual notation public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.RedefinedFeature != null) + { + stringBuilder.Append(poco.RedefinedFeature.qualifiedName); + stringBuilder.Append(' '); + } } @@ -65,7 +70,12 @@ public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Featur /// The that contains the entire textual notation public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.RedefinedFeature != null) + { + stringBuilder.Append(poco.RedefinedFeature.qualifiedName); + stringBuilder.Append(' '); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs index 5ad75a00..0f1d4956 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs @@ -42,7 +42,12 @@ public static partial class SubclassificationTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.Superclassifier != null) + { + stringBuilder.Append(poco.Superclassifier.qualifiedName); + stringBuilder.Append(' '); + } } @@ -63,9 +68,19 @@ public static void BuildSubclassification(SysML2.NET.Core.POCO.Core.Classifiers. } stringBuilder.Append("subclassifier "); - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.Subclassifier != null) + { + stringBuilder.Append(poco.Subclassifier.qualifiedName); + stringBuilder.Append(' '); + } throw new System.NotSupportedException("Multiple alternatives not implemented yet"); - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.Superclassifier != null) + { + stringBuilder.Append(poco.Superclassifier.qualifiedName); + stringBuilder.Append(' '); + } RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs index af40eab9..19d95abc 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs @@ -42,7 +42,12 @@ public static partial class TypeFeaturingTextualNotationBuilder /// The that contains the entire textual notation public static void BuildOwnedTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.FeaturingType != null) + { + stringBuilder.Append(poco.FeaturingType.qualifiedName); + stringBuilder.Append(' '); + } } @@ -63,9 +68,19 @@ public static void BuildTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFe stringBuilder.Append(' '); } - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.FeatureOfType != null) + { + stringBuilder.Append(poco.FeatureOfType.qualifiedName); + stringBuilder.Append(' '); + } stringBuilder.Append("by "); - throw new System.NotSupportedException("Assigment of reference element not supported yet for this case"); + + if (poco.FeaturingType != null) + { + stringBuilder.Append(poco.FeaturingType.qualifiedName); + stringBuilder.Append(' '); + } RelationshipTextualNotationBuilder.BuildRelationshipBody(poco, stringBuilder); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs index defced6a..74c5151f 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -529,6 +529,7 @@ public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType p public static void BuildInstantiatedTypeReference(SysML2.NET.Core.POCO.Core.Types.IType poco, StringBuilder stringBuilder) { stringBuilder.Append(poco.qualifiedName); + stringBuilder.Append(' '); } From bdada01587aaaee0a95c1835be902bc5445793c1 Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 6 Mar 2026 11:16:44 +0100 Subject: [PATCH 14/15] [WIP] Supports last assignement case --- .../HandleBarHelpers/RulesHelper.cs | 38 ++++++++++--------- .../LiteralIntegerTextualNotationBuilder.cs | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index a0d48bc0..2fdf0d5d 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -313,29 +313,31 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass } else if(targetProperty.QueryIsReferenceProperty()) { - if (assignmentElement.Value is NonTerminalElement nonTerminalElement) + switch (assignmentElement.Value) { - var previousCaller = ruleGenerationContext.CallerRule; - ruleGenerationContext.CallerRule = nonTerminalElement; - ProcessNonTerminalElement(writer, targetProperty.Type as IClass, nonTerminalElement, $"poco.{targetPropertyName}", ruleGenerationContext); - ruleGenerationContext.CallerRule = previousCaller; - } - else if (assignmentElement.Value is ValueLiteralElement valueLiteralElement && valueLiteralElement.QueryIsQualifiedName()) - { - writer.WriteSafeString($"{Environment.NewLine}if (poco.{targetPropertyName} != null){Environment.NewLine}"); - writer.WriteSafeString($"{{{Environment.NewLine}"); - writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.qualifiedName);{Environment.NewLine}"); - writer.WriteSafeString("stringBuilder.Append(' ');"); - writer.WriteSafeString($"{Environment.NewLine}}}"); - } - else - { - writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of reference element not supported yet for this case\");"); + case NonTerminalElement nonTerminalElement: + { + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = nonTerminalElement; + ProcessNonTerminalElement(writer, targetProperty.Type as IClass, nonTerminalElement, $"poco.{targetPropertyName}", ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; + break; + } + case ValueLiteralElement valueLiteralElement when valueLiteralElement.QueryIsQualifiedName(): + writer.WriteSafeString($"{Environment.NewLine}if (poco.{targetPropertyName} != null){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.qualifiedName);{Environment.NewLine}"); + writer.WriteSafeString("stringBuilder.Append(' ');"); + writer.WriteSafeString($"{Environment.NewLine}}}"); + break; + default: + writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of reference element not supported yet for this case\");"); + break; } } else { - writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of non-string value not yet supported\");"); + writer.WriteSafeString($"stringBuilder.Append(poco.{targetPropertyName}.ToString());"); } } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs index 12d657bd..55e8bf07 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs @@ -42,7 +42,7 @@ public static partial class LiteralIntegerTextualNotationBuilder /// The that contains the entire textual notation public static void BuildLiteralInteger(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInteger poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of non-string value not yet supported"); + stringBuilder.Append(poco.Value.ToString()); } } From 080e891c45852b7af91753a77804ce60915913db Mon Sep 17 00:00:00 2001 From: atheate Date: Fri, 6 Mar 2026 12:39:01 +0100 Subject: [PATCH 15/15] [WIP] Supports everything except Multiple Alternatives --- .../HandleBarHelpers/RulesHelper.cs | 130 +++++++++++------- .../DependencyTextualNotationBuilder.cs | 32 ++++- .../IfActionUsageTextualNotationBuilder.cs | 2 +- .../OwningMembershipTextualNotationBuilder.cs | 2 +- 4 files changed, 114 insertions(+), 52 deletions(-) diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index 2fdf0d5d..ae95def5 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -175,10 +175,7 @@ private static void DeclareAllRequiredIterators(EncodedTextWriter writer, IClass { switch (ruleElement) { - case AssignmentElement { Value: NonTerminalElement } assignmentElement: - DeclareIteratorIfRequired(writer, umlClass, assignmentElement, ruleGenerationContext); - break; - case AssignmentElement { Value: GroupElement } assignmentElement: + case AssignmentElement assignmentElement: DeclareIteratorIfRequired(writer, umlClass, assignmentElement, ruleGenerationContext); break; case GroupElement groupElement: @@ -232,7 +229,7 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass if (groupElement.IsCollection) { - var assignmentRule = groupElement.Alternatives.SelectMany(x => x.Elements).FirstOrDefault(x => x is AssignmentElement { Value: NonTerminalElement }); + var assignmentRule = groupElement.Alternatives.SelectMany(x => x.Elements).FirstOrDefault(x => x is AssignmentElement { Value: NonTerminalElement } || x is AssignmentElement {Value: ValueLiteralElement}); if (assignmentRule is AssignmentElement assignmentElement) { @@ -274,6 +271,27 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass ProcessNonTerminalElement(writer, umlClass, nonTerminalElement, $"{iteratorToUse.IteratorVariableName}.Current", ruleGenerationContext); } + else if(assignmentElement.Value is GroupElement groupElement) + { + var previousCaller = ruleGenerationContext.CallerRule; + ruleGenerationContext.CallerRule = assignmentElement; + ProcessAlternatives(writer, umlClass, groupElement.Alternatives, ruleGenerationContext); + ruleGenerationContext.CallerRule = previousCaller; + } + else if(assignmentElement.Value is ValueLiteralElement valueLiteralElement && valueLiteralElement.QueryIsQualifiedName()) + { + var iteratorToUse = ruleGenerationContext.DefinedIterators.Single(x => x.ApplicableRuleElements.Contains(assignmentElement)); + + if (assignmentElement.Container is not GroupElement { IsCollection: true } && assignmentElement.Container is not GroupElement { IsOptional: true }) + { + writer.WriteSafeString($"{iteratorToUse.IteratorVariableName}.MoveNext();{Environment.NewLine}"); + } + + writer.WriteSafeString($"{Environment.NewLine}if({iteratorToUse.IteratorVariableName}.Current != null){Environment.NewLine}"); + writer.WriteSafeString($"{{{Environment.NewLine}"); + writer.WriteSafeString($"stringBuilder.Append({iteratorToUse.IteratorVariableName}.Current.qualifiedName);{Environment.NewLine}"); + writer.WriteSafeString("}"); + } else { writer.WriteSafeString("throw new System.NotSupportedException(\"Assigment of enumerable with non NonTerminalElement not supported yet\");"); @@ -286,7 +304,7 @@ private static void ProcessRuleElement(EncodedTextWriter writer, IClass umlClass writer.WriteSafeString($"{Environment.NewLine}if({targetProperty.QueryIfStatementContentForNonEmpty("poco")}){Environment.NewLine}"); writer.WriteSafeString($"{{{Environment.NewLine}"); writer.WriteSafeString($"stringBuilder.Append(poco.{targetProperty.Name.CapitalizeFirstLetter()});{Environment.NewLine}"); - writer.WriteSafeString("}}"); + writer.WriteSafeString("}"); } else { @@ -463,55 +481,75 @@ private static void DeclareIteratorIfRequired(EncodedTextWriter writer, IClass u { DeclareIteratorIfRequired(writer, umlClass, assignment, ruleGenerationContext); } - } - - if (assignmentElement.Value is not NonTerminalElement nonTerminalElement) - { + return; } - var referencedRule = ruleGenerationContext.AllRules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); - - if (ruleGenerationContext.DefinedIterators.SingleOrDefault(x => x.IsIteratorValidForProperty(targetProperty, referencedRule) || x.ApplicableRuleElements.Contains(assignmentElement)) is { } alreadyDefinedIterator) + switch (assignmentElement.Value) { - alreadyDefinedIterator.ApplicableRuleElements.Add(assignmentElement); - return; - } + case NonTerminalElement nonTerminalElement: + var referencedRule = ruleGenerationContext.AllRules.SingleOrDefault(x => x.RuleName == nonTerminalElement.Name); + + if (ruleGenerationContext.DefinedIterators.SingleOrDefault(x => x.IsIteratorValidForProperty(targetProperty, referencedRule) || x.ApplicableRuleElements.Contains(assignmentElement)) is { } alreadyDefinedIterator) + { + alreadyDefinedIterator.ApplicableRuleElements.Add(assignmentElement); + return; + } - var iteratorToUse = new IteratorDefinition - { - DefinedForProperty = targetProperty - }; - - iteratorToUse.ApplicableRuleElements.Add(assignmentElement); + var iteratorToUse = new IteratorDefinition + { + DefinedForProperty = targetProperty + }; + + iteratorToUse.ApplicableRuleElements.Add(assignmentElement); - string typeTarget; - - if (referencedRule == null) - { - typeTarget = umlClass.Name; - } - else - { - typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; - } + string typeTarget; + + if (referencedRule == null) + { + typeTarget = umlClass.Name; + } + else + { + typeTarget = referencedRule.TargetElementName ?? referencedRule.RuleName; + } - if (typeTarget != targetProperty.Type.Name) - { - var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); - iteratorToUse.ConstrainedType = targetType; + if (typeTarget != targetProperty.Type.Name) + { + var targetType = umlClass.Cache.Values.OfType().SingleOrDefault(x => x.Name == typeTarget); + iteratorToUse.ConstrainedType = targetType; - writer.WriteSafeString(targetType != null - ? $"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.OfType<{targetType.QueryFullyQualifiedTypeName(targetInterface: false)}>().GetEnumerator();" - : $"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); - } - else - { - writer.WriteSafeString($"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); + writer.WriteSafeString(targetType != null + ? $"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.OfType<{targetType.QueryFullyQualifiedTypeName(targetInterface: false)}>().GetEnumerator();" + : $"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); + } + else + { + writer.WriteSafeString($"using var {iteratorToUse.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); + } + + writer.WriteSafeString(Environment.NewLine); + ruleGenerationContext.DefinedIterators.Add(iteratorToUse); + break; + case ValueLiteralElement: + if (ruleGenerationContext.DefinedIterators.SingleOrDefault(x => x.IsIteratorValidForProperty(targetProperty, null) || x.ApplicableRuleElements.Contains(assignmentElement)) is { } existingValueLiteralIterator) + { + existingValueLiteralIterator.ApplicableRuleElements.Add(assignmentElement); + return; + } + + var valueLiteralIterator = new IteratorDefinition + { + DefinedForProperty = targetProperty + }; + + valueLiteralIterator.ApplicableRuleElements.Add(assignmentElement); + writer.WriteSafeString($"using var {valueLiteralIterator.IteratorVariableName} = poco.{targetProperty.QueryPropertyNameBasedOnUmlProperties()}.GetEnumerator();"); + writer.WriteSafeString(Environment.NewLine); + ruleGenerationContext.DefinedIterators.Add(valueLiteralIterator); + + break; } - - writer.WriteSafeString(Environment.NewLine); - ruleGenerationContext.DefinedIterators.Add(iteratorToUse); } /// diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs index d0e42fb3..8babaf4d 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs @@ -54,6 +54,8 @@ public static void BuildDependency(SysML2.NET.Core.POCO.Root.Dependencies.IDepen } stringBuilder.Append("dependency "); + using var clientIterator = poco.Client.GetEnumerator(); + using var supplierIterator = poco.Supplier.GetEnumerator(); if (BuildGroupConditionForDependencyDeclaration(poco)) { @@ -62,17 +64,39 @@ public static void BuildDependency(SysML2.NET.Core.POCO.Root.Dependencies.IDepen stringBuilder.Append(' '); } - throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); + clientIterator.MoveNext(); + + if (clientIterator.Current != null) + { + stringBuilder.Append(clientIterator.Current.qualifiedName); + } + + while (clientIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); + + if (clientIterator.Current != null) + { + stringBuilder.Append(clientIterator.Current.qualifiedName); + } } stringBuilder.Append("to "); - throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); + supplierIterator.MoveNext(); + + if (supplierIterator.Current != null) + { + stringBuilder.Append(supplierIterator.Current.qualifiedName); + } + + while (supplierIterator.MoveNext()) { stringBuilder.Append(","); - throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); + + if (supplierIterator.Current != null) + { + stringBuilder.Append(supplierIterator.Current.qualifiedName); + } } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs index 08b23b29..27a9ec90 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs @@ -61,7 +61,7 @@ public static void BuildIfNode(SysML2.NET.Core.POCO.Systems.Actions.IIfActionUsa if (BuildGroupConditionForIfNode(poco)) { stringBuilder.Append("else "); - throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); stringBuilder.Append(' '); } diff --git a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs index 5226443c..4ec05fb3 100644 --- a/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs +++ b/SysML2.NET/TextualNotation/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs @@ -131,7 +131,7 @@ public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.I /// The that contains the entire textual notation public static void BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, StringBuilder stringBuilder) { - throw new System.NotSupportedException("Assigment of enumerable with non NonTerminalElement not supported yet"); + throw new System.NotSupportedException("Multiple alternatives not implemented yet"); }