Class Meta2ClassesTransformation.Reference2Type
The transformation rule to generate an implementation class for a reference with an opposite
Inheritance
Inherited Members
Namespace: NMF.Models.Meta
Assembly: NMF.Models.MetaTransformation.dll
Syntax
public class Meta2ClassesTransformation.Reference2Type : TransformationRule<IReference, CodeTypeDeclaration>
Methods
| Edit this page View SourceCreateBag(CodeTypeReference, CodeTypeReference, bool)
Creates the type reference to the base class implementing an opposite bag
Declaration
protected virtual CodeTypeReference CreateBag(CodeTypeReference baseTypeReference, CodeTypeReference elementTypeReference, bool isContainment)
Parameters
Type | Name | Description |
---|---|---|
Code |
baseTypeReference | The parent element type |
Code |
elementTypeReference | The referenced element type |
bool | isContainment | True, if the collection is a containment collection, otherwise False |
Returns
Type | Description |
---|---|
Code |
The type reference to the opposite bag |
CreateList(CodeTypeReference, CodeTypeReference, bool)
Creates the type reference to the base class implementing an opposite list
Declaration
protected virtual CodeTypeReference CreateList(CodeTypeReference baseTypeReference, CodeTypeReference elementTypeReference, bool isContainment)
Parameters
Type | Name | Description |
---|---|---|
Code |
baseTypeReference | The parent element type |
Code |
elementTypeReference | The referenced element type |
bool | isContainment | True, if the collection is a containment collection, otherwise False |
Returns
Type | Description |
---|---|
Code |
The type reference to the opposite list |
CreateOrderedSet(CodeTypeReference, CodeTypeReference, bool)
Creates the type reference to the base class implementing an opposite ordered set
Declaration
protected virtual CodeTypeReference CreateOrderedSet(CodeTypeReference baseTypeReference, CodeTypeReference elementTypeReference, bool isContainment)
Parameters
Type | Name | Description |
---|---|---|
Code |
baseTypeReference | The parent element type |
Code |
elementTypeReference | The referenced element type |
bool | isContainment | True, if the collection is a containment collection, otherwise False |
Returns
Type | Description |
---|---|
Code |
The type reference to the opposite ordered set |
CreateOutput(IReference, ITransformationContext)
Creates the transformation rule output, i.e. an empty code declaration
Declaration
public override CodeTypeDeclaration CreateOutput(IReference input, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IReference | input | The NMeta reference |
ITransformation |
context | The transformation context |
Returns
Type | Description |
---|---|
Code |
A new code type declaration |
Overrides
CreateSet(CodeTypeReference, CodeTypeReference, bool)
Creates the type reference to the base class implementing an opposite set
Declaration
protected virtual CodeTypeReference CreateSet(CodeTypeReference baseTypeReference, CodeTypeReference elementTypeReference, bool isContainment)
Parameters
Type | Name | Description |
---|---|---|
Code |
baseTypeReference | The parent element type |
Code |
elementTypeReference | The referenced element type |
bool | isContainment | True, if the collection is a containment collection, otherwise False |
Returns
Type | Description |
---|---|
Code |
The type reference to the opposite set |
Transform(IReference, CodeTypeDeclaration, ITransformationContext)
Initializes the generated code type declaration
Declaration
public override void Transform(IReference input, CodeTypeDeclaration output, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IReference | input | The input NMeta reference |
Code |
output | The generated code type declaration |
ITransformation |
context | The transformation context |