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
baseTypeReferenceCodeTypeReferenceThe parent element type
elementTypeReferenceCodeTypeReferenceThe referenced element type
isContainmentboolTrue, 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
baseTypeReferenceCodeTypeReferenceThe parent element type
elementTypeReferenceCodeTypeReferenceThe referenced element type
isContainmentboolTrue, 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
baseTypeReferenceCodeTypeReferenceThe parent element type
elementTypeReferenceCodeTypeReferenceThe referenced element type
isContainmentboolTrue, 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
inputIReferenceThe NMeta reference
contextITransformationContextThe 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
baseTypeReferenceCodeTypeReferenceThe parent element type
elementTypeReferenceCodeTypeReferenceThe referenced element type
isContainmentboolTrue, 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
inputIReferenceThe input NMeta reference
outputCodeTypeDeclarationThe generated code type declaration
contextITransformationContextThe transformation context