Customizing field accessors

 

Introduction

Each class that parameterizes accessors for a class must contain a method named "declare", used to generate the declaration of the corresponding C# field. The methods are used to generate accessors in access or modify mode. For finite or multiple fields, one of them must generate an accessor named "card", which returns an integer containing the field's current multiplicity.

 

 

Customizing the fields of the "defaultSimpleAttribute" class

 

The ... field

is used to customize ...

declare

the declaration of the C# field.

get

the access to the C# field.

set

the modification of the C# field.

 

 

Customizing the fields of the "arrayFiniteAttribute" class

 

The ... field

is used to customize ...

declare

the declaration of the field.

get

the access to an element with the given index.

get_all

the access to all the elements.

set

the modification of the element with the given index.

set_all

the modification of all the elements.

 

 

Customizing the fields of the "stackMultipleAttribute" class

 

The ... field

is used to customize ...

declare

the declaration of the field.

get

the access to the element on top of the stack.

append

the addition of an element.

erase

the deletion of an element on top of the stack.

card

the calculation of the number of elements.

 

 

Customizing the fields of the "stackFiniteAttribute" class

 

The ... field

is used to customize ...

declare

the declaration of the field.

get

the access to the element on top of the stack.

append

the addition of an element.

erase

the deletion of an element on top of the stack.

card

the calculation of the number of elements.

 

 

Customizing the fields of the "hashtableMultipleAttribute" class

 

The ... field

is used to customize ...

declare

the declaration of the field.

get

the access to an element from its key.

append

the addition of an element with its key.

erase_by_key

the deletion of an element from its key.

card

the calculation of the number of elements.