Example API

Description
This example class shows how cxxwrap can be used to generate documentation and java code for a C++ class.
Author: Dave Deaven
Date: 19990409
Heritage
    examples.Example
Known directly derived classes: DerivedExample, DerivedExample2
Complete known class diagram
Header file

#include <sys/types.h> // added in the class comment
#include <examples/Example.h>


Public Method and Attribute summary
Example()
Example(init, temp1)
        in general, any html tags with matching start and end tags are recognized.
Example(init)
        Helen asked me to make links work, too.
~Example()
anon3 AnonEnumeratedVariable
        this tests a bug
ACE::Interior::Nest badPractice()
        C++ namespaces, some like them, I don't
int bar()
        multiple comment styles are recognized
int booboo()
        if you use strict C type checking for no args, we'll remove the "void" spec
void callCallback()
void (*)(int,ExampleData*,void*) callback_func()
Example* clone()
        java defines these methods, so they must be aliased in wrappers
double doubleField
        A public member field containing a primitive type
ExampleData exampleData
        A public member field containing an object instance
ExampleData* exampleDataPtr
        A public member field containing an object pointer
void explicit_arrays(x)
        plain jane C comment on one line follows slash-slash
int foo(x, y, z)
        A simple function
int foo2(x, len)
const char* foo3(s)
const char* foo4(s)
void fun(x, f, g, i, l)
        this is fun
static int getter(x, y, z, q)
        this method tests an argument formatting bug
double h(n)
void how_big(so_big)
        this function uses the local type definition
void how_big_ptr(so_big)
void indy_int(threestar)
void indy_object(twostar)
        proper documenting of multiple indirection levels
unsigned long my_size_t()
        This is a type definition local to this class, which can be documented here.
my_size_t* my_size_t_ptr()
        this is a recursive typedef
Example* nullTest(in)
        test NULL across JNI
void op+=(other)
Example& op=(other)
int opCast()
void other_arrays(x)
void pointers(x, y, f, g)
         This comment is loaded with stars, including a passel of 'em on the first line.
void registerCallback(__cbd, cbfunc)
void setCallback(x)
char* str(s)
        this comment has stars at the beginning of each line
void string_arrays(files, len)
void stringarrayfunc(a)
        test string arrays
void test32(i)
void test64(l)
        test 32/64 bit int sizes
int testDefaults(x)
int testDefaults2(x)
void ti(dp)
        template instantiation woes illustrated by these.
void unknownClassPointerArray(array)
        this should not get JNI wrapped
Type Definitions
typedef unsigned long my_size_t
This is a type definition local to this class, which can be documented here.

typedef my_size_t* my_size_t_ptr
this is a recursive typedef

typedef void (*)(int,ExampleData*,void*) callback_func
typedef unsigned long my_protected_size_t
a protected typedef

Enumerations
enum KnownNumber
This is the definition of an enumerated type.

Values:
ZERO
This is an embedded enumeration comment.
ONE
TWO
THREE
FOUR
enum SecondEnumeration
Values:
BOBO
different style of comments in this one
RINGO
checking a bug
Constructors
Example()
Example(const ExampleData& init,
         int temp1)
in general, any html tags with matching start and end tags are recognized.
Example(const ExampleData* init)
Helen asked me to make links work, too. but she probably wants ExampleData style links.
Parameters:
init - and booboo a link to booboo() embedded
~ Example()
Public Methods and Attributes
int booboo()
if you use strict C type checking for no args, we'll remove the "void" spec. Also note that this comment is done with double slashes ("//") at the beginning of each line.
int foo(int x = 0,
        double y = 0,
        double z = -1)
A simple function
Parameters:
x - the first argument
y - the second argument
z - the third argument
Returns:
a status
int foo2(int* x,
         int len)
const char* foo3(const char* s)
const char* foo4(const char* s)
int testDefaults(int x = -1)
int testDefaults2(char* x = 0)
int bar()
multiple comment styles are recognized
void unknownClassPointerArray(UnknownClass** array)
this should not get JNI wrapped
anon3 AnonEnumeratedVariable
this tests a bug
void fun(int x,
         float f,
         double g,
         unsigned int i,
         long l)
this is fun. there should be two lines in this comment.
char* str(char* s)
this comment has stars at the beginning of each line.
static int getter(int x,
                  int y,
                  int z,
                  const char* q)
this method tests an argument formatting bug
ACE::Interior::Nest badPractice()
C++ namespaces, some like them, I don't
void pointers(int* x,
              long* y,
              float* f,
              double* g)
This comment is loaded with stars, including a passel of 'em on the first line. The next line has'em too.
void explicit_arrays(int* x)
plain jane C comment on one line follows slash-slash
void other_arrays(int* x)
void string_arrays(const char** files,
                   int len)
double h(Example::KnownNumber n)
Example* clone()
java defines these methods, so they must be aliased in wrappers.
void how_big(unsigned long so_big)
this function uses the local type definition
void how_big_ptr(unsigned long* so_big)
Example& op=(const Example& other)
void op+=(const Example& other)
int opCast()
void ti(DerivedParameterized<int> & dp)
template instantiation woes illustrated by these.
void setCallback(Callback* x)
void callCallback()
Example* nullTest(Example* in)
test NULL across JNI
void stringarrayfunc(char** a)
test string arrays
void test64(long* l)
test 32/64 bit int sizes
void test32(int* i)
void indy_object(Example** twostar)
proper documenting of multiple indirection levels
void indy_int(int*** threestar)
ExampleData exampleData
A public member field containing an object instance
ExampleData* exampleDataPtr
A public member field containing an object pointer
double doubleField
A public member field containing a primitive type
void registerCallback(void* __cbd,
                      void (*)(int,ExampleData*,void*) cbfunc)
Protected Methods and Attributes
void how_big_protected(unsigned long so_big)
ExampleData num
Callback* cb