yash jaiswal
yash jaiswal

Reputation: 9

How to create class diagram of single class that is not using inheritance using Doxygen Graphviz?

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.

Upvotes: 1

Views: 58

Answers (2)

albert
albert

Reputation: 9077

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

Upvotes: 0

albert
albert

Reputation: 9077

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

Upvotes: 0

Related Questions