Class Meta2ClassesTransformation.Reference2Type
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
-
TransformationRule<IReference, CodeTypeDeclaration>.CreateComputation(object[], IComputationContext)TransformationRule<IReference, CodeTypeDeclaration>.CreateOutput(IReference, ITransformationContext)
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
CodeTypeReferenceThe parent element type
elementTypeReference
CodeTypeReferenceThe referenced element type
isContainment
boolTrue, 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
CodeTypeReferenceThe parent element type
elementTypeReference
CodeTypeReferenceThe referenced element type
isContainment
boolTrue, 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
CodeTypeReferenceThe parent element type
elementTypeReference
CodeTypeReferenceThe referenced element type
isContainment
boolTrue, 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
IReferenceThe NMeta reference
context
ITransformationContextThe 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
CodeTypeReferenceThe parent element type
elementTypeReference
CodeTypeReferenceThe referenced element type
isContainment
boolTrue, 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
IReferenceThe input NMeta reference
output
CodeTypeDeclarationThe generated code type declaration
context
ITransformationContextThe transformation context