|
From: David F. <fr...@tu...> - 2009-07-15 23:09:47
|
Hi all,
I haven't played much with %feature, but it looks like it would be
useful for an addition I'd like to make to the perl5 interface
generator.
Suppose that:
1. a .i file has been read that has a %feature defined like so:
%feature("myfeature") SomeType %{ text here %}
2. the functionWrapper() function has been called for some function
to be wrapped and this function returns a pointer (or reference
or ... ) to a SomeType
What's the best way to retrieve the text defined within the feature?
For example, suppose I had this:
virtual int functionWrapper(Node *n) {
String *name = Getattr(n, "name");
String *iname = Getattr(n, "sym:name");
SwigType *d = Getattr(n, "type");
...
/* Here's code I want to add ... */
String * text = GetFeatureText(d, "myfeature");
if (text) {
...
}
Is there already a function that I can use instead of
GetFeatureText()? If not, can anyone provide an outline that shows
how this function would work?
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
By the way, what I'm trying to do is augment the perl code that is
generated. There are any number of typemaps that can manipulate the
C/C++ code that is generated, but very few that augment the perl code
that is generated. Perhaps I missed something, but there doesn't seem
to be a typemap that is already defined that will handle this.
Perhaps someone knows of one?
Tx.
--
David Fletcher Tuscany Design Automation, Inc.
dav...@tu... 3030 S. College Ave.
Ft. Collins, CO 80525 USA
|