Is it possible to teach Doxygen to recognize a member of type std::shared_ptr<T>
as an aggregation? I think it does it for normal pointers, although I have added BUILTIN_STL_SUPPORT=YES
.
The question also extends to std::unique_ptr
which should be a composition, and I think std::map<K,V>
, std::vector<V>
etc could be documented as composition with multiplicity 1...N, although I am pretty sure I don't want this in all cases.
If this is not possible with Doxygen, I would be interested in alternative documentation systems for C++.
As of version 1.8.14, Doxygen doesn't add std::shared_ptr<T>
to the internal list of std classes when BUILTIN_STL_SUPPORT
is on.
But it's relatively easy to add it by modifying Doxygen sources. In src/doxygen.cpp
there's a global variable g_stlinfo
that holds definitions of standard classes. Also, addSTLClasses()
function in the same class has a branch for smart pointer classes.
Refer to this changeset for minimal change to enable shared_ptr support.
Unfortunately, I cannot answer the rest of your question yet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With