Interface IAttributeList
Interface implemented by lists of attributes, e.g. LayerList.
Namespace: CADability.Attribute
Assembly: CADability.dll
Syntax
public interface IAttributeList
Properties
| Improve this Doc View SourceCount
Gets the count of items in the list.
Declaration
int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Current
Returns the current item of that list. May also be null.
Declaration
INamedAttribute Current { get; }
Property Value
| Type | Description |
|---|---|
| INamedAttribute |
Owner
Internal use only.
Declaration
IAttributeListContainer Owner { get; set; }
Property Value
| Type | Description |
|---|---|
| IAttributeListContainer |
Methods
| Improve this Doc View SourceAdd(INamedAttribute)
Adds a named attribute to that list
Declaration
void Add(INamedAttribute toAdd)
Parameters
| Type | Name | Description |
|---|---|---|
| INamedAttribute | toAdd | the attribute to add |
AttributeChanged(INamedAttribute, ReversibleChange)
Internal use only.
Declaration
void AttributeChanged(INamedAttribute attribute, ReversibleChange Change)
Parameters
| Type | Name | Description |
|---|---|---|
| INamedAttribute | attribute | |
| ReversibleChange | Change |
Clone()
Creates a clone of both the list and the items.
Declaration
IAttributeList Clone()
Returns
| Type | Description |
|---|---|
| IAttributeList |
Find(String)
Returns an item with the given name or null.
Declaration
INamedAttribute Find(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | name of the requested item |
Returns
| Type | Description |
|---|---|
| INamedAttribute | the item or null if not found |
Initialize()
Initializes this list with default items.
Declaration
void Initialize()
Item(Int32)
Returns the item with the given index.
Declaration
INamedAttribute Item(int Index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | Index | Index of the item |
Returns
| Type | Description |
|---|---|
| INamedAttribute | The item |
MayChangeName(INamedAttribute, String)
Determins, whether a named attribute may change its name. It may not change its name if there is already an attribut with that desired name.
Declaration
bool MayChangeName(INamedAttribute attribute, string newName)
Parameters
| Type | Name | Description |
|---|---|---|
| INamedAttribute | attribute | the attribute that wants to change its name |
| System.String | newName | the new name |
Returns
| Type | Description |
|---|---|
| System.Boolean | true, if name change is possible, false otherwise |
NameChanged(INamedAttribute, String)
Notifies the list, that an attribut changed ist name.
Declaration
void NameChanged(INamedAttribute attribute, string oldName)
Parameters
| Type | Name | Description |
|---|---|---|
| INamedAttribute | attribute | the attribute |
| System.String | oldName | the old name (the new name can be accessed from the attribute) |
Update(IGeoObject)
Declaration
void Update(IGeoObject Object2Update)
Parameters
| Type | Name | Description |
|---|---|---|
| IGeoObject | Object2Update |
Update(Boolean)
When attributes refer to other attributes these should be in the same AttributeListContainer. This method checks this consitency, changes the references where needed and adds new attributes to the corresponding lists when necessery.
Declaration
void Update(bool AddMissingToList)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | AddMissingToList | true: add referenced attributes when not found in a list |