lundi 25 avril 2022

Class diagram for variable member with the type of `std::shared_ptr

class Foo{};

class Demo
{
public:
    std::shared_ptr<Foo> foo_ptr{new Foo()};;
};

What's the relationship between Foo and Demo? I think it is an aggregation. Am I right? How to draw such the relationship between them?

Aucun commentaire:

Enregistrer un commentaire