How do I show map in UML? C++

  associative-array, c++, uml

I have a "Database" class that has a template "myMap" that stores instances of the "Client" class. The "myMap" consists of nodes (instances of the "Node" class). How do I show this in UML?

template<typename KEY, typename VALUE> class myMap;

template <typename KEY, typename VALUE>
class Node
{
private:
    friend class myMap<KEY, VALUE>;
    KEY id;
    VALUE object;
    Node* parent;
    Node* left;
    Node* right;
};

template<typename KEY, typename VALUE>
class myMap
{
    Node<KEY, VALUE>* root;
    ////
};

class Client
{
    int id;
};

class Database
{
    myMap<int, Client> clients;
};

Source: Windows Questions C++

LEAVE A COMMENT