M
mathog
Typically I do forward references to struct like this:
typedef struct is_TYPE1 TYPE1; // forward reference for section 1.2.20
// code
typedef struct { // section 1.2.3
TYPE1 name;
} TYPE2;
// more code
struct is_TYPE1 { // section 1.2.20
int a;
float b;
};
The problem is that when this is run through doxygen the "is_TYPE1" is
exposed in the documentation. Ideally the structs would all be
declared in a particular order (corresponding to their section numbers
in the specification, as indicated in the comments).
At present I deal with this by rearranging the code to eliminate the
forward references:
typedef struct { // section 1.2.20, out of order, needed for TYPE2
int a;
float b;
} TYPE1;
// code
typedef struct { // section 1.2.3
TYPE1 name;
} TYPE2;
// more code
// struct TYPE1, section 1.2.20, implemented out of order, above
This goes through the documentation generator cleanly, and even though
everything is not strictly in the section order, at least the exceptions
are all documented where they occur.
Is there a better way to do this?
Thanks,
David Mathog
typedef struct is_TYPE1 TYPE1; // forward reference for section 1.2.20
// code
typedef struct { // section 1.2.3
TYPE1 name;
} TYPE2;
// more code
struct is_TYPE1 { // section 1.2.20
int a;
float b;
};
The problem is that when this is run through doxygen the "is_TYPE1" is
exposed in the documentation. Ideally the structs would all be
declared in a particular order (corresponding to their section numbers
in the specification, as indicated in the comments).
At present I deal with this by rearranging the code to eliminate the
forward references:
typedef struct { // section 1.2.20, out of order, needed for TYPE2
int a;
float b;
} TYPE1;
// code
typedef struct { // section 1.2.3
TYPE1 name;
} TYPE2;
// more code
// struct TYPE1, section 1.2.20, implemented out of order, above
This goes through the documentation generator cleanly, and even though
everything is not strictly in the section order, at least the exceptions
are all documented where they occur.
Is there a better way to do this?
Thanks,
David Mathog