Class Meta2ClassesTransformation.Reference2Property
The transformation rule to transform a reference to a code property
public class Meta2ClassesTransformation.Reference2Property : TransformationRule<IReference, CodeMemberProperty>
- Inheritance
-
Meta2ClassesTransformation.Reference2Property
- Inherited Members
Methods
CreateBag(CodeTypeReference, bool)
Creates the type reference for a bag with the given element type
protected virtual CodeTypeReference CreateBag(CodeTypeReference elementTypeReference, bool isContainment)
Parameters
elementTypeReference
CodeTypeReferenceThe element type reference
isContainment
boolIndicates whether the reference is a containment
Returns
- CodeTypeReference
A code reference to the class that implements the collection
CreateBagInterfaceType(CodeTypeReference)
Creates the interface type for a bag with the given element type
protected virtual CodeTypeReference CreateBagInterfaceType(CodeTypeReference elementTypeReference)
Parameters
elementTypeReference
CodeTypeReference
Returns
CreateList(CodeTypeReference, bool)
Creates the type reference for a list with the given element type
protected virtual CodeTypeReference CreateList(CodeTypeReference elementTypeReference, bool isContainment)
Parameters
elementTypeReference
CodeTypeReferenceThe element type reference
isContainment
boolIndicates whether the reference is a containment
Returns
- CodeTypeReference
A code reference to the class that implements the collection
CreateListInterfaceType(CodeTypeReference)
Creates the interface type for a list with the given element type
protected virtual CodeTypeReference CreateListInterfaceType(CodeTypeReference elementTypeReference)
Parameters
elementTypeReference
CodeTypeReferenceThe element type reference
Returns
- CodeTypeReference
A code type reference that represents a list with the given elements
CreateOrderedSet(CodeTypeReference, bool)
Creates the type reference for an ordered set with the given element type
protected virtual CodeTypeReference CreateOrderedSet(CodeTypeReference elementTypeReference, bool isContainment)
Parameters
elementTypeReference
CodeTypeReferenceThe element type reference
isContainment
boolIndicates whether the reference is a containment
Returns
- CodeTypeReference
A code type reference to the class that implements the collection
CreateOrderedSetInterfaceType(CodeTypeReference)
Creates the interface type for an ordered set with the given element type
protected virtual CodeTypeReference CreateOrderedSetInterfaceType(CodeTypeReference elementTypeReference)
Parameters
elementTypeReference
CodeTypeReferenceThe element tye reference
Returns
- CodeTypeReference
A code type reference that represents an ordered set
CreateOutput(IReference, ITransformationContext)
Creates the output of this transformation rule
public override CodeMemberProperty CreateOutput(IReference input, ITransformationContext context)
Parameters
input
IReferenceThe input of the transformation rule
context
ITransformationContextThe context (and trace!) object
Returns
- CodeMemberProperty
The output for this transformation under this input
Remarks
At this point, not all of the computations have created their output and thus, the trace is not complete. Use the OutputDelayLevel-feature to have the trace contain all elements created in earlier levels
CreateSet(CodeTypeReference, bool)
Creates the type reference for an unordered set with the given element type
protected virtual CodeTypeReference CreateSet(CodeTypeReference elementTypeReference, bool isContainment)
Parameters
elementTypeReference
CodeTypeReferenceThe element type reference
isContainment
boolIndicates whether the reference is a containment
Returns
- CodeTypeReference
A code type reference to the class that implements the collection
CreateSetInterfaceType(CodeTypeReference)
Creates the interface type for an unordered set with the given element type
protected virtual CodeTypeReference CreateSetInterfaceType(CodeTypeReference elementTypeReference)
Parameters
elementTypeReference
CodeTypeReferenceThe element type reference
Returns
- CodeTypeReference
A code type reference that represents an unordered set with the given elements
GenerateSetStatement(IReference, CodeMemberProperty, CodeExpression, ITransformationContext)
Generates the set statements of a normal reference
protected virtual void GenerateSetStatement(IReference property, CodeMemberProperty codeProperty, CodeExpression fieldReference, ITransformationContext context)
Parameters
property
IReferenceThe NMeta reference
codeProperty
CodeMemberPropertyThe generated code property
fieldReference
CodeExpressionA reference to the backening field
context
ITransformationContextThe context in which the reference is generated
Remarks
Normal means in this case that the reference is not an overridden container reference
RegisterDependencies()
Registers the dependencies, i.e. transform the reference type and refined references
public override void RegisterDependencies()
Transform(IReference, CodeMemberProperty, ITransformationContext)
Initializes the generated property
public override void Transform(IReference input, CodeMemberProperty generatedProperty, ITransformationContext context)
Parameters
input
IReferenceThe NMeta reference
generatedProperty
CodeMemberPropertyThe generated property
context
ITransformationContextThe transformation context