| | This abstract class, alongwith Label,
is one of the cornerstones of Model Editor.
The groundwork is to define the root of
information. This information is to be
attached to a Label, and could be of any of
the following types:
- a feature
- a constraint
- a comment
Contents:
---------
Each software component who'd like to attach its
own information to a label has to inherit from
this class and has to add its own information as
fields of this new class.
Identification:
---------------
An attribute can be identified by its ID. Every
attributes used with the same meaning (for
exemple: Integer, String, Topology...) have the
same worldwide unique ID.
Addition:
---------
An attribute can be added to a label only if there
is no attribute yet with the same ID. Call-back
methods are offered, called automatically before
and after the addition action.
Removal:
--------
An attribute can be removed from a label only if
there is an attribute yet with the same
ID. Call-back methods are offered, called
automatically before and after the removal
action. A removed attribute cannot be found
again. After a removal, only an addition of an
attribute with the sane ID is possible (no
backup...).
Modification & Transaction:
---------------------------
An attribute can be backuped before a
modification. Only one backup attribute by
transaction is possible. The modification can be
forgotten (abort transaction) or validated (commit
transaction).
BackupCopy and restore are methods used by the backup or
abort transaction actions. BackupCopy is called by
Backup to generate an attribute with the same
contents as the current one. Restore is called
when aborting a transaction to transfer the
backuped contents into the current
attribute. These methods must be implemented by
end use inheriting classes.
A standard implementation of BackupCopy is provided, but
it is not necessary a good one for any use.
Copy use methods:
-----------------
Paste and NewEmpty methods are used by the copy
algorithms. The goal of "Paste" is to transfer an
attribute new contents into another attribute. The
goal of "NewEmpty" is to create an attribute
whithout contents, to be further filled with the
new contents of another one. These 2 methods must
be implemented by end use inheriting classes.
AttributeDelta:
---------------
An AttributeDelta is the difference between to
attribute values states. These methods must be
implemented by end use inheriting classes, to
profit from the delta services.
More...
|