mirror of
https://github.com/michaelrsweet/mxml.git
synced 2024-11-14 15:55:30 +00:00
f7fdbeb2c9
mxmldoc.c: - find_public(): Added - scan_file(): Revert previous @private@ changes, clear typedefnode after we assign a comment, and remove unnecessary @private@ comment check. - write_documentation(): Use find_public() instead of mxmlFindElement() when enumerating public types, structs, etc. test/dotest.sh: - Run "make mxmldoc-static" so that the test uses a current executable. test/function.cxx: - Add @private@ function. test/struct.cxx: - Add @private@ struct. test/type.cxx: - Added (simple typedef types)
55 lines
893 B
C++
55 lines
893 B
C++
typedef struct foo_s /* Foo structure */
|
|
{
|
|
float foo; /* Real number */
|
|
int bar; /* Integer */
|
|
|
|
foo_s(float f, int b);
|
|
~foo_s();
|
|
|
|
// 'get_bar()' - Get the value of bar.
|
|
int // O - Value of bar
|
|
get_bar()
|
|
{
|
|
return (bar);
|
|
}
|
|
|
|
// 'get_foo()' - Get the value of foo.
|
|
float // O - Value of foo
|
|
get_foo()
|
|
{
|
|
return (foo);
|
|
}
|
|
|
|
// 'set_bar()' - Set the value of bar.
|
|
void
|
|
set_bar(int b) // I - Value of bar
|
|
{
|
|
bar = b;
|
|
}
|
|
|
|
// 'set_foo()' - Set the value of foo.
|
|
void
|
|
set_foo(float f) // I - Value of foo
|
|
{
|
|
foo = f;
|
|
}
|
|
} foo_t;
|
|
|
|
// 'foo_s::foo_s()' - Create a foo_s structure.
|
|
foo_s::foo_s(float f, int b)
|
|
{
|
|
foo = f;
|
|
bar = b;
|
|
}
|
|
|
|
// 'foo_s::~foo_s()' - Destroy a foo_s structure.
|
|
foo_s::~foo_s()
|
|
{
|
|
}
|
|
|
|
typedef struct foo_private_s /* @private@ */
|
|
{
|
|
int a; /* Value of "a" */
|
|
char b[255]; /* Value of "b" */
|
|
} foo_private_t;
|