1

I have evaluated Doxygen. I found that a class which is inheriting property from another class, that class diagram is generated by Doxygen. But for single class that is not using inheritance, Doxygen is not generating class diagram of that class. So how to resolve this.

I have added Graphviz path. I have marked all Graphviz diagram. Marked all required field like HAVE_DOT=YES UML_LOOK=YES etc.....

My expectation is Doxygen should be able to generate class diagram of all type of class.

2
  • Which version of doxygen you used? Please add a small example of a class with and one without inheritance to the question and also the doxygen settings used that differ from the default (i.e. the result of `doxygen -x Doxyfile) so in discussions we are always talking about the same. Commented Sep 27, 2023 at 7:49
  • Sir, I am using 1.9.8 version of Doxygen. And I only want class diagram which contain all the attribute and function present in class. I am getting it using COLLABORATION_GRAPH but the structure it is giving is not consumable. I only want a single class diagram. Commented Sep 27, 2023 at 11:03

2 Answers 2

0

I quickly made an example (hopefully this is like OP wants it),and used the current 1.9.8 doxygen version:

aa.h

class no_inher
{
  public:
    int i;
};

class base_inher
{
  public:
    int i;
};

class derived_inher : public base_inher
{
  public:
    int j;
};

Doxyfile

QUIET = YES
HAVE_DOT = YES
UML_LOOK = YES
EXTRACT_ALL = YES
#COLLABORATION_GRAPH = NO

Result with inheritance

enter image description here

Result without inheritance

enter image description here

Might have been that OP set COLLABORATION_GRAPH = NO instead of (the default) COLLABORATION_GRAPH = YES

Sign up to request clarification or add additional context in comments.

2 Comments

Sir, I am using 1.9.8 version of Doxygen. And I only want class diagram which contain all the attribute and function present in class. I am getting it using COLLABORATION_GRAPH but the structure it is giving is not consumable. I only want a single class diagram
What do you mean with "he structure it is giving is not consumable."? With the current master (1.10.0 (f23bba320bdc04996849bd8a369414f4a7950a0d)) there are some more possibilities as there we have a command \hideinheritancegraph.
0

As written in the comment with the current master version of doxygen (1.10.0 (f23bba320bdc04996849bd8a369414f4a7950a0d)) there are some more possibilities as there we have a command \hideinheritancegraph

I quickly made an example,and using the current master version ofdoxygen version:

aa.h

class no_inher
{
  public:
    int i;
};

/// \hideinheritancegraph
class base_inher
{
  public:
    int i;
};

/// \hideinheritancegraph
class derived_inher : public base_inher
{
  public:
    int j;
};

Doxyfile

QUIET = YES
HAVE_DOT = YES
UML_LOOK = YES
EXTRACT_ALL = YES
#COLLABORATION_GRAPH = NO

Result with inheritance base

enter image description here

Result with inheritance derived

enter image description here

Result without inheritance

enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.