[GCC-XML] 2 newbie questions about "pseudo"
Brad King
brad.king at kitware.com
Fri May 27 15:33:04 EDT 2005
John Morrison wrote:
>>3.) Use the -fxml-start option to avoid getting the extra types. You
>>just specify a starting declaration and the dump will only include
>>things referenced by it. Nothing references these "pseudo" declarations
>>so they will not be dumped.
>
> How do I ask for just the top-level namespace named "::" and avoid the
> other ones "std" and "__gnu_cxx" ??? "-fxml-start=::" didn't work.
By default the global namespace is the starting point. Anything it
references is reported. This includes the extra internal symbols and
namespaces. The -fxml-start option could be used to specify the class
or function name you want to wrap. The approach I used in the wrapper
configuration files was something like:
#include <code_to_be_wrapped.h>
namespace wrapper_definitions
{
typedef ::class_to_be_wrapped class_to_be_wrapped;
typedef ::class_template_a<int>::class_template_a cta_int;
}
Then the gccxml run would specify -fxml-start=wrapper_definitions. Then
the wrapper configuration would be dumped along with the entire
interface of anything to be wrapped.
>>GCC-XML was originally written to support another tool that generates
>>bindings. I used option #3 because it also provides a nice way to let
>>the user specify what parts of the interface to wrap and instantiate
>>templates to be wrapped.
>
> I am trying to take the hint!
The project is called CableSwig:
http://www.itk.org/HTML/CableSwig.html
it adds GCC-XML parsing power to the popular "SWIG" wrapping tool. It
was created for wrapping ITK and is not really supported outside of that
purpose.
Another project that uses GCC-XML to help generate wrappers is:
http://www.boost.org/libs/python/pyste/
but it is only for python.
-Brad
More information about the gccxml
mailing list