Chapter 6. Basic Usage

Table of Contents

Quick Start
Setting Up The Environment
Compiling Stage
Merging Stage
Output Stage
Output formats
Simple Format
Simple Doxygen Format
Detailed Doxygen Format
Output Notifications (Errors/Warnings)
Running Doxygen
The Doxygen Configuration File

For this quick start we will provide an example of gathering exception information for a very basic C++ program shown below.

The source code for this program can be found in Example Project:

// main.cpp

#include "extra.h"

void Function2()
{
   Function1();
   throw FileException();
}

void Function3()
{
   FuncPtr fp = &Function1;
   
   throw 3.0f;
   fp();
   try
   {
      Function2();
   }
   catch(FileException& fe)
   {
      throw;
   }
}

int main()
{
   try
   {
      Function3();
   }
   catch(...)
   {
   }
   return 0;
}

// extra.h

#ifndef EXAMPLE_EXTRA_H
#define EXAMPLE_EXTRA_H

class Exception{};
class FileException : public Exception{};

typedef void(*FuncPtr)();
void Function1();

#endif // EXAMPLE_EXTRA_H

// extra.cpp

#include "extra.h"

void Function1()
{
   throw Exception();
   throw FileException();
   throw 2;
}

Following are a set of stages that break down the sequence in which EDoc++ would generally be used. Each stage and its various options are described in order to teach how best to use EDoc++

Quick Start

Here we will list the commands to perform in order to analyze the above source code. The various commands are then explained in later sections. For the impatient this will give a succicnt example of using EDoc++

EDOC -> EDOC -> $  start_edoc.sh
g++ -fedoc-embed -c main.cpp -o main.o
g++ -fedoc-embed -c extra.cpp -o extra.o
g++ main.o extra.o -o simple
edoc --format simple simple
Logs going to file: /tmp/edoc_BRTRUR
F: Function1()
O: 	Exception
O: 	FileException
O: 	int

F: Function2()
O: 	FileException
E: 	Exception  -  Function1()
E: 	FileException  -  Function1()
E: 	int  -  Function1()

F: Function3()
O: 	float
P: 	Exception  -  Function1()
P: 	FileException  -  Function1()
P: 	int  -  Function1()
E: 	FileException  -  Function2()
E: 	FileException  -  Function2()
E: 	Exception  -  Function2()
E: 	int  -  Function2()