Specific Examples Test Suite

Typedef Examples

class TestClass

Public Types

typedef void *MemberTypedef

A typedef defined in a class.

class TypeDefTest
namespace testnamespace

Typedefs

typedef char *AnotherTypedef
file typedef.h

Typedefs

typedef TypeDefTest (*TypeDefTestFuncPtr)(void)
typedef void *(*voidFuncPtr)(float, int)
typedef void *voidPointer
typedef float *floatPointer
typedef float floatingPointNumber
typedef int TestTypedef

Namespaced Function Examples

virtual void testnamespace::NamespacedClassTest::function() const = 0

namespaced class function

void testnamespace::ClassTest::function()

second namespaced class function

void testnamespace::ClassTest::anotherFunction()

second namespaced class other function

void ClassTest::function(int myParameter)

non-namespaced class function

More details in the header file.

More documentation in the impl file

void ClassTest::anotherFunction()

non-namespaced class other function

More documentation in the impl file

Alias Example

void frob_foos(void *Frobs)

Foo frob routine.

bob this something else
Side Effects
Frobs any foos.
Return
Frobs any foos.
bob this something else
Side Effects
Frobs any foos.
Parameters
  • Frobs: any foos.

Fixed Width Font

class Out

Public Functions

Out()

Constructor for Out object

~Out()

Destructor for Out object

Function Overloads

void f(int, int)

Function which takes two int arguments.

void f(double, double)

Function which takes two double arguments.

void test::g(int, int)

Another function which takes two int arguments.

void test::g(double, double)

Another function which takes two double arguments.

void h(std::string, MyType)

Another function which takes a custom type.

void h(std::string, MyOtherType o)

Another function which takes another custom type.

void h(std::string, const int myint)

Another function which takes a const basic type.

template <typename T, typename U>
void h(std::string, const T m, const U n)

Another function which takes a const basic type.

Program Listing

class Vector

Vector class

Vector center() const

The center of the InteractionBox in device coordinates (millimeters). This point is equidistant from all sides of the box.

Vector boxCenter = interactionBox.center();
Vector max = interactionBox.max();
Vector diff = max - boxCenter;

Return
The InteractionBox center in device coordinates.
Since
1.0

Image

class ImageClass

This is a class with an image in the description.

It renders like this:

_images/imageExample.png

Breathe & Sphinx should automatically copy the image from the doxygen output directory into the _images folder of the Sphinx output.

Inherits from Image

Array Parameter

int foo(int a[5])

My function.

int bar(int n, int a[static n])

My other function.

C Enum

enum GSM_BackupFormat

Backup data.

Values:

GSM_Backup_Auto = 0

Compatibility with old gboolean used instead of format.

File type is guessed for extension, non unicode format used for Gammu backup.

GSM_Backup_AutoUnicode = 1

Compatibility with old gboolean used instead of format.

File type is guessed for extension, unicode format used for Gammu backup.

GSM_Backup_LMB

LMB format, compatible with Logo manager, can store phonebooks and logos.

GSM_Backup_VCalendar

vCalendar standard, can store todo and calendar entries.

GSM_Backup_VCard

vCard standard, can store phone phonebook entries.

GSM_Backup_LDIF

LDIF (LDAP Data Interchange Format), can store phone phonebook entries.

GSM_Backup_ICS

iCalendar standard, can store todo and calendar entries.

GSM_Backup_Gammu

Gammu own format can store almost anything from phone.

This is ASCII version of the format, Unicode strings are HEX encoded. Use GSM_Backup_GammuUCS2 instead if possible.

GSM_Backup_GammuUCS2

Gammu own format can store almost anything from phone.

This is UCS2-BE version of the format.

GSM_Backup_VNote

vNote standard, can store phone notes.

C Typedef

Typedefs

typedef int(* cTypeDefTestFuncPtr)(void)

Sample typedef for a function pointer.

typedef void*(* cVoidFuncPtr)(float, int)
typedef void* cVoidPointer
typedef float* cFloatPointer
typedef float cFloatingPointNumber
typedef int cTestTypedef

Test for a simple C typedef.

C Typedef

Defines

USE_STUFF

A simple define without a value.

MAX_LENGTH 100

A define with a simple value.

MAX(A, B) ((A > B)?(A):(B))

A define with some parameters.

Return
The maximum of A and B
Parameters
  • A: The parameter A
  • B: The parameter B

SWAP(A, B) { \ (a) ^= (b); \ (b) ^= (a); \ (a) ^= (b); \ }

A define which spans multiple lines.

Multifile

template <TestClass::Enum E>
void TestTemplateFunction()

The non-type template parameter references a different file.

Interface Class

interface InterfaceClass

This is a test interface class.

Some details about the InterfaceClass interface