diff --git a/Examples/doxygencomments/java/callback/example.h b/Examples/doxygencomments/java/callback/example.h index 38ada8b84..a0c5fc4d2 100644 --- a/Examples/doxygencomments/java/callback/example.h +++ b/Examples/doxygencomments/java/callback/example.h @@ -3,9 +3,12 @@ #include #include -/** Let's document class CALLBACK! */ +/*! Let's document class CALLBACK! + /author Alfred + */ class Callback { public: + /** Information about Callback */ virtual ~Callback() { std::cout << "Callback::~Callback()" << std:: endl; } virtual void run() { std::cout << "Callback::run()" << std::endl; } }; @@ -16,7 +19,7 @@ private: Callback *_callback; public: Caller(): _callback(0) {} - ~Caller() { delCallback(); } + ~Caller() { delCallback(); }/**< Deletes Callback */ void delCallback() { delete _callback; _callback = 0; } void setCallback(Callback *cb) { delCallback(); _callback = cb; } void call() { if (_callback) _callback->run(); } diff --git a/Examples/doxygencomments/java/extend/example.h b/Examples/doxygencomments/java/extend/example.h index db49ae747..9b882fd59 100644 --- a/Examples/doxygencomments/java/extend/example.h +++ b/Examples/doxygencomments/java/extend/example.h @@ -6,12 +6,15 @@ #include #include -/**This is describiing class Employee */ +/**This is describiing class Employee + /author Bob */ class Employee { private: std::string name; public: - /** TEST */ + /** Employee + \param n name of Employee + \throws some exception */ Employee(const char* n): name(n) {} /**This is describing method getTitle */ virtual std::string getTitle() { return getPosition() + " " + getName(); } @@ -31,11 +34,15 @@ public: class EmployeeList { std::vector list; public: + /** Initialises Employee List */ EmployeeList() { list.push_back(new Employee("Bob")); list.push_back(new Employee("Jane")); list.push_back(new Manager("Ted")); } + /** Add employee + * \param p employee p + * \return void */ void addEmployee(Employee *p) { list.push_back(p); std::cout << "New employee added. Current employees are:" << std::endl; diff --git a/Examples/doxygencomments/java/native/example.i b/Examples/doxygencomments/java/native/example.i index 851b6fdc2..21bcf528c 100644 --- a/Examples/doxygencomments/java/native/example.i +++ b/Examples/doxygencomments/java/native/example.i @@ -4,11 +4,16 @@ %{ #include +/*! Structure Point */ typedef struct point { int x; int y; } Point; +/*! Point_create Description + /param x integer x + /param y some integer y + /return a point */ Point *point_create(int x, int y) { Point *p = (Point *) malloc(sizeof(Point)); @@ -18,6 +23,11 @@ Point *point_create(int x, int y) { return p; } +/*! Point_create Description + /param format the format + /param p some p + /return a character string of the point p */ + static char *point_toString(char *format, Point *p) { static char buf[80]; @@ -54,3 +64,4 @@ char *point_toString1(Point *p); extern void free(void *memblock); %native(point_toString2) char *point_toString2(Point *p); + diff --git a/Examples/doxygencomments/java/pointer/example.i b/Examples/doxygencomments/java/pointer/example.i index a8ac79499..7ac3b8cf8 100644 --- a/Examples/doxygencomments/java/pointer/example.i +++ b/Examples/doxygencomments/java/pointer/example.i @@ -7,10 +7,16 @@ extern void sub(int *, int *, int *); extern int divide(int, int, int *); %} -/* This example illustrates a couple of different techniques +/** This example illustrates a couple of different techniques for manipulating C pointers */ /* First we'll use the pointer library */ + +/*! function add + \param x some int x + \param y some int y + \param result some result + */ extern void add(int *x, int *y, int *result); %include cpointer.i %pointer_functions(int, intp); @@ -28,3 +34,5 @@ extern int divide(int n, int d, int *r); + + diff --git a/Examples/doxygencomments/java/reference/example.i b/Examples/doxygencomments/java/reference/example.i index 6daa3b1f4..8e4d05239 100644 --- a/Examples/doxygencomments/java/reference/example.i +++ b/Examples/doxygencomments/java/reference/example.i @@ -8,6 +8,12 @@ #include "example.h" %} +/*! Class vector description + \author Fred + \exception something random + \since 1.0 + \name ignoreme + \see something */ class Vector { public: Vector(double x, double y, double z); @@ -15,15 +21,18 @@ public: char *print(); }; -/* This helper function calls an overloaded operator */ +/** This helper function calls an overloaded operator */ %inline %{ Vector addv(Vector &a, Vector &b) { return a+b; } %} -/* Wrapper around an array of vectors class */ - +/*! Class Vector Array + \exception something random + \since 1.3 + \see something + \author Fred */ class VectorArray { public: VectorArray(int maxsize); @@ -44,3 +53,6 @@ public: + + + diff --git a/Examples/doxygencomments/java/simple/example.i b/Examples/doxygencomments/java/simple/example.i index 24093b9bf..c823bc8b6 100644 --- a/Examples/doxygencomments/java/simple/example.i +++ b/Examples/doxygencomments/java/simple/example.i @@ -2,6 +2,10 @@ %module example %inline %{ +/*! Function foo + \param x int x + \param y int y + \return the gcd */ extern int gcd(int x, int y); -extern double Foo; +extern double Foo; /*!< description of double foo %} diff --git a/Examples/doxygencomments/java/template/example.h b/Examples/doxygencomments/java/template/example.h index 7401df650..9ec711391 100644 --- a/Examples/doxygencomments/java/template/example.h +++ b/Examples/doxygencomments/java/template/example.h @@ -2,8 +2,15 @@ // Some template definitions +/*! Template class T + \author cmfoil + \sa something something */ + template T max(T a, T b) { return a>b ? a : b; } +/*! Template class Vector + \author cmfoil + \sa something something */ template class vector { T *v; int sz; @@ -17,12 +24,12 @@ template class vector { } void set(int index, T &val) { v[index] = val; - } + } /*!< Something about set */ #ifdef SWIG %extend { T getitem(int index) { return $self->get(index); - } + }/*!< Something about get item */ void setitem(int index, T val) { $self->set(index,val); } diff --git a/Examples/java/pointer/example.i b/Examples/java/pointer/example.i index a8ac79499..5b725cee6 100644 --- a/Examples/java/pointer/example.i +++ b/Examples/java/pointer/example.i @@ -26,5 +26,3 @@ extern void sub(int *INPUT, int *INPUT, int *OUTPUT); extern int divide(int n, int d, int *r); - - diff --git a/Examples/java/reference/example.i b/Examples/java/reference/example.i index 6daa3b1f4..fd80f9a94 100644 --- a/Examples/java/reference/example.i +++ b/Examples/java/reference/example.i @@ -41,6 +41,3 @@ public: } }; - - -