/** Namespace for containers. This class is used as a namespace for global identifiers related to the implementation of containers. It is inherited by all container objects. */ class GCont { private: // --- Base class for list nodes struct Node { Node *next; Node *prev; }; // -- Class for list nodes template struct ListNode : public Node { T val; ListNode(); ListNode(const T &ref) : val(ref) { } ; }; // -- Class for map nodes showing the hash struct HNode : public Node { unsigned int hashcode; }; // -- Class for map nodes showing the hash and the key template struct SetNode : public HNode { K key; SetNode(const K &key) : key(key) { } ; }; // -- Class for map nodes with everything template struct MapNode : public SetNode { T val; MapNode(const K &key) : SetNode(key) { } ; }; };