A DataLink links too variables in memory. More...
#include <DataHandling.h>
Public Member Functions | |
virtual void | CopyA1_to_A2 () |
Copy a1 into a2. More... | |
virtual void | CopyA2_to_A1 () |
Copy a2 into a1. More... | |
DataLink () | |
virtual void | Link (void *, void *) |
test if the given address is one of the Link More... | |
virtual void | Reset () |
both linked data to default More... | |
virtual void | ResetA1 () |
set A1 to default More... | |
virtual void | ResetA2 () |
set A2 to default More... | |
virtual | ~DataLink () |
Protected Member Functions | |
virtual void * | A1 () |
virtual void * | A2 () |
Friends | |
class | GObject |
A DataLink links too variables in memory.
Two addresses of the same type of data are linked by a DataLink. Once linked, the value of the first one (second one) is copied in the second one (first one) each time the CopyA1_to_A2 (CopyA2_to_A1) method is called.
Both values could be set to a default value by calling the Reset method. The default value are set in the constructor
Be careful, it is the charge of the user to be sure a DalaLink is correctly linked with two valid addresses.
With this, user's variables could be linked on the basis of a common name.
See for instance ANamedItem, NamedItem and GObject.
Definition at line 80 of file DataHandling.h.