Class Meta2ClassesTransformation.Reference2Property
The transformation rule to transform a reference to a code property
Inheritance
Inherited Members
Namespace: NMF.Models.Meta
Assembly: NMF.Models.MetaTransformation.dll
Syntax
public class Meta2ClassesTransformation.Reference2Property : TransformationRule<IReference, CodeMemberProperty>
Methods
| Edit this page View SourceCreateBag(CodeTypeReference, bool)
Creates the type reference for a bag with the given element type
Declaration
protected virtual CodeTypeReference CreateBag(CodeTypeReference elementTypeReference, bool isContainment)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type reference |
bool | isContainment | Indicates whether the reference is a containment |
Returns
Type | Description |
---|---|
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
Declaration
protected virtual CodeTypeReference CreateBagInterfaceType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference |
Returns
Type | Description |
---|---|
CodeTypeReference |
CreateList(CodeTypeReference, bool)
Creates the type reference for a list with the given element type
Declaration
protected virtual CodeTypeReference CreateList(CodeTypeReference elementTypeReference, bool isContainment)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type reference |
bool | isContainment | Indicates whether the reference is a containment |
Returns
Type | Description |
---|---|
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
Declaration
protected virtual CodeTypeReference CreateListInterfaceType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type reference |
Returns
Type | Description |
---|---|
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
Declaration
protected virtual CodeTypeReference CreateOrderedSet(CodeTypeReference elementTypeReference, bool isContainment)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type reference |
bool | isContainment | Indicates whether the reference is a containment |
Returns
Type | Description |
---|---|
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
Declaration
protected virtual CodeTypeReference CreateOrderedSetInterfaceType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element tye reference |
Returns
Type | Description |
---|---|
CodeTypeReference | A code type reference that represents an ordered set |
CreateOutput(IReference, ITransformationContext)
Creates the output of this transformation rule
Declaration
public override CodeMemberProperty CreateOutput(IReference input, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IReference | input | The input of the transformation rule |
ITransformationContext | context | The context (and trace!) object |
Returns
Type | Description |
---|---|
CodeMemberProperty | The output for this transformation under this input |
Overrides
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
Declaration
protected virtual CodeTypeReference CreateSet(CodeTypeReference elementTypeReference, bool isContainment)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type reference |
bool | isContainment | Indicates whether the reference is a containment |
Returns
Type | Description |
---|---|
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
Declaration
protected virtual CodeTypeReference CreateSetInterfaceType(CodeTypeReference elementTypeReference)
Parameters
Type | Name | Description |
---|---|---|
CodeTypeReference | elementTypeReference | The element type reference |
Returns
Type | Description |
---|---|
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
Declaration
protected virtual void GenerateSetStatement(IReference property, CodeMemberProperty codeProperty, CodeExpression fieldReference, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IReference | property | The NMeta reference |
CodeMemberProperty | codeProperty | The generated code property |
CodeExpression | fieldReference | A reference to the backening field |
ITransformationContext | context | The 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
Declaration
public override void RegisterDependencies()
Overrides
| Edit this page View SourceTransform(IReference, CodeMemberProperty, ITransformationContext)
Initializes the generated property
Declaration
public override void Transform(IReference input, CodeMemberProperty generatedProperty, ITransformationContext context)
Parameters
Type | Name | Description |
---|---|---|
IReference | input | The NMeta reference |
CodeMemberProperty | generatedProperty | The generated property |
ITransformationContext | context | The transformation context |