Table of Contents

Class Meta2ClassesTransformation.Reference2Type

Namespace
NMF.Models.Meta
Assembly
NMF.Models.MetaTransformation.dll

The transformation rule to generate an implementation class for a reference with an opposite

public class Meta2ClassesTransformation.Reference2Type : TransformationRule<IReference, CodeTypeDeclaration>
Inheritance
Meta2ClassesTransformation.Reference2Type
Inherited Members

Methods

CreateBag(CodeTypeReference, CodeTypeReference, bool)

Creates the type reference to the base class implementing an opposite bag

protected virtual CodeTypeReference CreateBag(CodeTypeReference baseTypeReference, CodeTypeReference elementTypeReference, bool isContainment)

Parameters

baseTypeReference CodeTypeReference

The parent element type

elementTypeReference CodeTypeReference

The referenced element type

isContainment bool

True, if the collection is a containment collection, otherwise False

Returns

CodeTypeReference

The type reference to the opposite bag

CreateList(CodeTypeReference, CodeTypeReference, bool)

Creates the type reference to the base class implementing an opposite list

protected virtual CodeTypeReference CreateList(CodeTypeReference baseTypeReference, CodeTypeReference elementTypeReference, bool isContainment)

Parameters

baseTypeReference CodeTypeReference

The parent element type

elementTypeReference CodeTypeReference

The referenced element type

isContainment bool

True, if the collection is a containment collection, otherwise False

Returns

CodeTypeReference

The type reference to the opposite list

CreateOrderedSet(CodeTypeReference, CodeTypeReference, bool)

Creates the type reference to the base class implementing an opposite ordered set

protected virtual CodeTypeReference CreateOrderedSet(CodeTypeReference baseTypeReference, CodeTypeReference elementTypeReference, bool isContainment)

Parameters

baseTypeReference CodeTypeReference

The parent element type

elementTypeReference CodeTypeReference

The referenced element type

isContainment bool

True, if the collection is a containment collection, otherwise False

Returns

CodeTypeReference

The type reference to the opposite ordered set

CreateOutput(IReference, ITransformationContext)

Creates the transformation rule output, i.e. an empty code declaration

public override CodeTypeDeclaration CreateOutput(IReference input, ITransformationContext context)

Parameters

input IReference

The NMeta reference

context ITransformationContext

The transformation context

Returns

CodeTypeDeclaration

A new code type declaration

CreateSet(CodeTypeReference, CodeTypeReference, bool)

Creates the type reference to the base class implementing an opposite set

protected virtual CodeTypeReference CreateSet(CodeTypeReference baseTypeReference, CodeTypeReference elementTypeReference, bool isContainment)

Parameters

baseTypeReference CodeTypeReference

The parent element type

elementTypeReference CodeTypeReference

The referenced element type

isContainment bool

True, if the collection is a containment collection, otherwise False

Returns

CodeTypeReference

The type reference to the opposite set

Transform(IReference, CodeTypeDeclaration, ITransformationContext)

Initializes the generated code type declaration

public override void Transform(IReference input, CodeTypeDeclaration output, ITransformationContext context)

Parameters

input IReference

The input NMeta reference

output CodeTypeDeclaration

The generated code type declaration

context ITransformationContext

The transformation context