Interface IAttributeList
- Namespace
- CADability.Attribute
- Assembly
- CADability.dll
Interface implemented by lists of attributes, e.g. LayerList.
public interface IAttributeList
Properties
Count
Gets the count of items in the list.
int Count { get; }
Property Value
Current
Returns the current item of that list. May also be null.
INamedAttribute Current { get; }
Property Value
Owner
Internal use only.
IAttributeListContainer Owner { get; set; }
Property Value
Methods
Add(INamedAttribute)
Adds a named attribute to that list
void Add(INamedAttribute toAdd)
Parameters
toAddINamedAttributethe attribute to add
AttributeChanged(INamedAttribute, ReversibleChange)
Internal use only.
void AttributeChanged(INamedAttribute attribute, ReversibleChange Change)
Parameters
attributeINamedAttributeChangeReversibleChange
Clone()
Creates a clone of both the list and the items.
IAttributeList Clone()
Returns
Find(string)
Returns an item with the given name or null.
INamedAttribute Find(string name)
Parameters
namestringname of the requested item
Returns
- INamedAttribute
the item or null if not found
Initialize()
Initializes this list with default items.
void Initialize()
Item(int)
Returns the item with the given index.
INamedAttribute Item(int Index)
Parameters
IndexintIndex of the item
Returns
- INamedAttribute
The item
MayChangeName(INamedAttribute, string)
Determines, whether a named attribute may change its name. It may not change its name if there is already an attribute with that desired name.
bool MayChangeName(INamedAttribute attribute, string newName)
Parameters
attributeINamedAttributethe attribute that wants to change its name
newNamestringthe new name
Returns
- bool
true, if name change is possible, false otherwise
NameChanged(INamedAttribute, string)
Notifies the list, that an attribute changed it's name.
void NameChanged(INamedAttribute attribute, string oldName)
Parameters
attributeINamedAttributethe attribute
oldNamestringthe old name (the new name can be accessed from the attribute)
Update(IGeoObject)
substitutes the attribute to the list member with the same name or adds objects attribute to the list.
void Update(IGeoObject Object2Update)
Parameters
Object2UpdateIGeoObjectthe Object with Attribute to substitute
Update(bool)
When attributes refer to other attributes these should be in the same AttributeListContainer. This method checks this consistency, changes the references where needed and adds new attributes to the corresponding lists when necessary.
void Update(bool AddMissingToList)
Parameters
AddMissingToListbooltrue: add referenced attributes when not found in a list