Table of Contents

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

int

Current

Returns the current item of that list. May also be null.

INamedAttribute Current { get; }

Property Value

INamedAttribute

Owner

Internal use only.

IAttributeListContainer Owner { get; set; }

Property Value

IAttributeListContainer

Methods

Add(INamedAttribute)

Adds a named attribute to that list

void Add(INamedAttribute toAdd)

Parameters

toAdd INamedAttribute

the attribute to add

AttributeChanged(INamedAttribute, ReversibleChange)

Internal use only.

void AttributeChanged(INamedAttribute attribute, ReversibleChange Change)

Parameters

attribute INamedAttribute
Change ReversibleChange

Clone()

Creates a clone of both the list and the items.

IAttributeList Clone()

Returns

IAttributeList

Find(string)

Returns an item with the given name or null.

INamedAttribute Find(string name)

Parameters

name string

name 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

Index int

Index 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

attribute INamedAttribute

the attribute that wants to change its name

newName string

the 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

attribute INamedAttribute

the attribute

oldName string

the 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

Object2Update IGeoObject

the 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

AddMissingToList bool

true: add referenced attributes when not found in a list