Can Doxygen recognize std :: shared_ptr or std :: map

Is it possible to teach Doxygen to recognize a member of type std::shared_ptr<T> as aggregation? I think he does this for regular pointers, although I 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. can be documented as a composition with a multiplicity of 1 ... N, although I am sure that I do not need this in all cases.

If this is not possible with Doxygen, I would be interested in alternative documentation systems for C ++.

+5
source share
1 answer

Starting with version 1.8.14, Doxygen does not add std::shared_ptr<T> to the internal list of std classes when BUILTIN_STL_SUPPORT enabled.

But it is relatively easy to add it by changing the sources of Doxygen. In src/doxygen.cpp there is a global variable g_stlinfo that contains definitions of standard classes. In addition, the addSTLClasses() function in the same class has a branch for smart pointer classes.

Refer to this changeset for a minimal change to enable shared_ptr support.

Unfortunately, I still can not answer the rest of your question.

+2
source

Source: https://habr.com/ru/post/1244728/


All Articles