Interface INamedElement
The public interface for NamedElement
[DefaultImplementationType(typeof(NamedElement))]
[XmlDefaultImplementationType(typeof(NamedElement))]
[ModelRepresentationClass("http://www.omg.org/spec/MOF/20131001/cmof.xmi#//NamedElement")]
public interface INamedElement : IElement, IObject, IModelElement, INotifyPropertyChanged, INotifyPropertyChanging
- Inherited Members
Properties
Name
The name of the NamedElement.
[XmlElementName("name")]
[Id]
[XmlAttribute(true)]
string Name { get; set; }
Property Value
Visibility
Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility.
[XmlElementName("visibility")]
[XmlAttribute(true)]
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
IOrderedSetExpression<INamespace> AllNamespaces()
Returns
Has_no_qualified_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()
bool Has_no_qualified_name(object diagnostics, object context)
Parameters
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
Has_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))
bool Has_qualified_name(object diagnostics, object context)
Parameters
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
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
bool IsDistinguishableFrom(INamedElement n, INamespace ns)
Parameters
nINamedElementnsINamespace
Returns
Separator()
The query separator() gives the string that is used to separate names when constructing a qualified name. result = '::'
string Separator()
Returns
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()
bool Visibility_needs_ownership(object diagnostics, object context)
Parameters
diagnosticsobjectThe chain of diagnostics to which problems are to be appended.
contextobjectThe cache of context-specific information.
Returns
Events
AllNamespacesCalled
Gets fired after the operation allNamespaces got called
event EventHandler<OperationCallEventArgs> AllNamespacesCalled
Event Type
AllNamespacesCalling
Gets fired before the operation allNamespaces gets called
event EventHandler<OperationCallEventArgs> AllNamespacesCalling
Event Type
Has_no_qualified_nameCalled
Gets fired after the operation has_no_qualified_name got called
event EventHandler<OperationCallEventArgs> Has_no_qualified_nameCalled
Event Type
Has_no_qualified_nameCalling
Gets fired before the operation has_no_qualified_name gets called
event EventHandler<OperationCallEventArgs> Has_no_qualified_nameCalling
Event Type
Has_qualified_nameCalled
Gets fired after the operation has_qualified_name got called
event EventHandler<OperationCallEventArgs> Has_qualified_nameCalled
Event Type
Has_qualified_nameCalling
Gets fired before the operation has_qualified_name gets called
event EventHandler<OperationCallEventArgs> Has_qualified_nameCalling
Event Type
IsDistinguishableFromCalled
Gets fired after the operation isDistinguishableFrom got called
event EventHandler<OperationCallEventArgs> IsDistinguishableFromCalled
Event Type
IsDistinguishableFromCalling
Gets fired before the operation isDistinguishableFrom gets called
event EventHandler<OperationCallEventArgs> IsDistinguishableFromCalling
Event Type
NameChanged
Gets fired when the Name property changed its value
event EventHandler<ValueChangedEventArgs> NameChanged
Event Type
NameChanging
Gets fired before the Name property changes its value
event EventHandler<ValueChangedEventArgs> NameChanging
Event Type
SeparatorCalled
Gets fired after the operation separator got called
event EventHandler<OperationCallEventArgs> SeparatorCalled
Event Type
SeparatorCalling
Gets fired before the operation separator gets called
event EventHandler<OperationCallEventArgs> SeparatorCalling
Event Type
VisibilityChanged
Gets fired when the Visibility property changed its value
event EventHandler<ValueChangedEventArgs> VisibilityChanged
Event Type
VisibilityChanging
Gets fired before the Visibility property changes its value
event EventHandler<ValueChangedEventArgs> VisibilityChanging
Event Type
Visibility_needs_ownershipCalled
Gets fired after the operation visibility_needs_ownership got called
event EventHandler<OperationCallEventArgs> Visibility_needs_ownershipCalled
Event Type
Visibility_needs_ownershipCalling
Gets fired before the operation visibility_needs_ownership gets called
event EventHandler<OperationCallEventArgs> Visibility_needs_ownershipCalling