I am completely new in using Doxygen and Sphinx. Going through some resources(this, this) I have managed to kick off my initial project. But now I am trying to draw an UML diagram
for my CPP classes
sample.h
/// Documenting Base Class
class Base_A{
/// Name of each student
char Name[50];
public:
Base_A(char *name_1, char *id_1){
strcpy(Name,name_1);
strcpy(Id,id_1);
}
/// Prints student info
void PrintStudentInfo();
/// ID of each student
char Id[20];
};
/// Documenting Child Class
class Child_A : public Base_A{
/// Nationality of each student
char Nationality[50];
/// Fees of each student
float fees;
public:
Child_A(char *name_1, char *id_1, char *nationality_1, float fees_1):Base_A(name_1, id_1){
strcpy(Nationality,nationality_1);
fees = fees_1;}
/// Prints student register info
void PrintRegInfo();
};
index.rst
.. CatCutifier documentation master file, created by
sphinx-quickstart on Wed Apr 24 15:19:01 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to CatCutifier's documentation!
=======================================
.. toctree::
:maxdepth: 2
:caption: Contents:
:ref:`genindex`
Docs
====
.. doxygenclass:: Base_A
:members:
:private-members:
.. doxygenclass:: Child_A
:members:
:private-members:
A snippet of conf.py where I have added extensions
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.imgmath',
'sphinx.ext.todo',
'sphinx.ext.graphviz',
'sphinx.ext.inheritance_diagram',
'breathe',
]
My process is just build the project from /project/build
by using cmake .. && make
. Is there anything else I have to do or what directive
I need to add in index.rst
file to get the UML
? I have followed this but it is for python class
. Also gone through the Breathe docs but could not find any fruitful.