Class Parameter
A parameter is a kind of typed element in order to allow the specification of an optional multiplicity on parameters. In addition, it supports the specification of an optional default value. A parameter is a typed element that represents a parameter of an operation.
[XmlNamespace("http://schema.omg.org/spec/MOF/2.0/cmof.xml")]
[XmlNamespacePrefix("cmof")]
[ModelRepresentationClass("http://schema.omg.org/spec/MOF/2.0/cmof.xml#//Parameter")]
public class Parameter : MultiplicityElement, IParameter, ITypedElement, INamedElement, IMultiplicityElement, IElement, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
Parameter
- Implements
- Inherited Members
Properties
Children
Gets the child model elements of this model element
public override IEnumerableExpression<IModelElement> Children { get; }
Property Value
ClassInstance
Gets the Class model for this type
public static IClass ClassInstance { get; }
Property Value
Default
Specifies a String that represents a value to be used when no argument is supplied for the Parameter.
[XmlElementName("default")]
[XmlAttribute(true)]
public string Default { get; set; }
Property Value
Direction
Indicates whether a parameter is being sent into or out of a behavioral element. The default value is in.
[XmlElementName("direction")]
[XmlAttribute(true)]
public ParameterDirectionKind Direction { get; set; }
Property Value
IsIdentified
Gets a value indicating whether the current model element can be identified by an attribute value
public override bool IsIdentified { get; }
Property Value
Name
The name of the NamedElement.
[XmlElementName("name")]
[Id]
[XmlAttribute(true)]
public string Name { get; set; }
Property Value
Operation
References the Operation for which this is a formal parameter. Subsets NamedElement::namespace and redefines Basic::Parameter::operation. The operation that owns the parameter.
[XmlElementName("operation")]
[XmlAttribute(true)]
public IOperation Operation { get; set; }
Property Value
ReferencedElements
Gets the referenced model elements of this model element
public override IEnumerableExpression<IModelElement> ReferencedElements { get; }
Property Value
Type
Redefines the corresponding property from Basic to derive this information from the return result for this Operation. The type of the TypedElement.
[XmlElementName("type")]
[XmlAttribute(true)]
public IType Type { get; set; }
Property Value
Visibility
Determines the visibility of the NamedElement within different Namespaces within the overall model.
[XmlElementName("visibility")]
[XmlAttribute(true)]
public VisibilityKind? Visibility { get; set; }
Property Value
Methods
AllNamespaces()
The query allNamespaces() gives the sequence of namespaces in which the NamedElement is nested, working outwards. result = if self.namespace->isEmpty() then Sequence{} else self.namespace.allNamespaces()->prepend(self.namespace) endif
public IOrderedSetExpression<INamespace> AllNamespaces()
Returns
CreateUriWithFragment(string, bool, IModelElement)
Creates the uri with the given fragment starting from the current model element
protected override Uri CreateUriWithFragment(string fragment, bool absolute, IModelElement baseElement)
Parameters
fragment
stringThe fragment starting from this element
absolute
boolTrue, if an absolute Uri is desired, otherwise false
baseElement
IModelElementThe element from which the uri shall be created or null
Returns
- Uri
A uri (relative or absolute)
GetAttributeValue(string, int)
Resolves the given attribute name
protected override object GetAttributeValue(string attribute, int index)
Parameters
Returns
- object
The attribute value or null if it could not be found
GetClass()
Gets the Class for this model element
public override IClass GetClass()
Returns
GetExpressionForAttribute(string)
Gets the property expression for the given attribute
protected override INotifyExpression<object> GetExpressionForAttribute(string attribute)
Parameters
attribute
stringThe requested attribute in upper case
Returns
- INotifyExpression<object>
An incremental property expression
GetExpressionForReference(string)
Gets the property expression for the given reference
protected override INotifyExpression<IModelElement> GetExpressionForReference(string reference)
Parameters
reference
stringThe requested reference in upper case
Returns
- INotifyExpression<IModelElement>
An incremental property expression
GetModelElementForReference(string, int)
Resolves the given URI to a child model element
protected override IModelElement GetModelElementForReference(string reference, int index)
Parameters
Returns
- IModelElement
The model element or null if it could not be found
IsDistinguishableFrom(INamedElement, INamespace)
The query isDistinguishableFrom() determines whether two NamedElements may logically co-exist within a Namespace. By default, two named elements are distinguishable if (a) they have unrelated types or (b) they have related types but different names. result = if self.oclIsKindOf(n.oclType) or n.oclIsKindOf(self.oclType) then ns.getNamesOfMember(self)->intersection(ns.getNamesOfMember(n))->isEmpty() else true endif
public bool IsDistinguishableFrom(INamedElement n, INamespace ns)
Parameters
n
INamedElementns
INamespace
Returns
No_name(object, object)
If there is no name, or one of the containing namespaces has no name, there is no qualified name. (self.name->isEmpty() or self.allNamespaces()->select(ns | ns.name->isEmpty())->notEmpty())
implies self.qualifiedName->isEmpty()
public bool No_name(object diagnostics, object context)
Parameters
Returns
PropagateNewModel(Model, Model, IModelElement)
Propagates through the composition hierarchy that an entire subtree has been added to a new model
protected override void PropagateNewModel(Model newModel, Model oldModel, IModelElement subtreeRoot)
Parameters
newModel
ModelThe new model that will host the subtree
oldModel
ModelThe old model of the subtree
subtreeRoot
IModelElementThe root element of the inserted subtree
QualifiedName()
When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces. result = if self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty() then self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result)) else Set{} endif
public string QualifiedName()
Returns
Qualified_name(object, object)
When there is a name, and all of the containing namespaces have a name, the qualified name is constructed from the names of the containing namespaces. (self.name->notEmpty() and self.allNamespaces()->select(ns | ns.name->isEmpty())->isEmpty()) implies self.qualifiedName = self.allNamespaces()->iterate( ns : Namespace; result: String = self.name | ns.name->union(self.separator())->union(result))
public bool Qualified_name(object diagnostics, object context)
Parameters
Returns
Separator()
The query separator() gives the string that is used to separate names when constructing a qualified name. result = '::'
public string Separator()
Returns
SetFeature(string, object)
Sets a value to the given feature
protected override void SetFeature(string feature, object value)
Parameters
ToIdentifierString()
Gets the identifier string for this model element
public override string ToIdentifierString()
Returns
- string
The identifier string
Visibility_needs_ownership(object, object)
If a NamedElement is not owned by a Namespace, it does not have a visibility. namespace->isEmpty() implies visibility->isEmpty()
public bool Visibility_needs_ownership(object diagnostics, object context)