frepple::utils::Association< A, B, C > Class Template Reference
This template class represents a data structure for a load or flow network. More...
#include <utils.h>
Classes | |
class | List |
A abstract base class for the internal representation of the association lists. | |
class | ListA |
A list type of the "first" / "from" part of the association. More... | |
class | ListB |
A list type of the "second" / "to" part of the association. More... | |
class | Node |
A base class for the class representing the association itself. More... |
Detailed Description
template<class A, class B, class C>
class frepple::utils::Association< A, B, C >
This template class represents a data structure for a load or flow network.
A node class has pointers to 2 root classes.
The 2 root classes each maintain a singly linked list of nodes.
An example to clarify the usage:
- class "node" = a newspaper subscription.
- class "person" = maintains a list of all his subscriptions.
- class "newspaper" = maintains a list of all subscriptions for it.
This data structure could be replaced with 2 linked lists, but this specialized data type consumes considerably lower memory.
Reading from the structure is safe in multi-threading mode.
Updates to the data structure in a multi-threading mode require the user to properly lock and unlock the container.
Definition at line 4967 of file utils.h.
The documentation for this class was generated from the following file:
Documentation generated for frePPLe by
