You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Rush Manbert (JIRA)" <ji...@apache.org> on 2010/01/14 07:54:55 UTC
[jira] Created: (THRIFT-676) Change C++ code generator so that
generated classes can be wrapped with SWIG
Change C++ code generator so that generated classes can be wrapped with SWIG
----------------------------------------------------------------------------
Key: THRIFT-676
URL: https://issues.apache.org/jira/browse/THRIFT-676
Project: Thrift
Issue Type: Improvement
Components: Compiler (C++)
Affects Versions: 0.3
Environment: Any C++
Reporter: Rush Manbert
There are times when it would be beneficial to wrap Thrift-generated C++ classes with the SWIG tool (http://www.swig.org). This is a problem, though, because SWIG does not yet handle nested class or structure definitions and the C++ code generator defines the __isset structure within the scope of the class definition to which it pertains.
In order to make the Thrift-generated classes wrappable by SWIG, the __isset structure definition needs to be moved outside of the class definition. For a Thrift generated class called foo, the __isset definition would look like this:
typedef struct _foo__isset {
_foo__isset() : member0(false), member1(false) {}
bool member0;
bool member1;
} _foo__isset;
and the using class would contain this line:
_foo__isset __isset;
All existing code will continue to work, and can be regenerated at will.
I have a patch for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (THRIFT-676) Change C++ code generator so that
generated classes can be wrapped with SWIG
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury reassigned THRIFT-676:
------------------------------------
Assignee: Rush Manbert
> Change C++ code generator so that generated classes can be wrapped with SWIG
> ----------------------------------------------------------------------------
>
> Key: THRIFT-676
> URL: https://issues.apache.org/jira/browse/THRIFT-676
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Any C++
> Reporter: Rush Manbert
> Assignee: Rush Manbert
> Fix For: 0.4
>
> Attachments: patchThrift-676.txt
>
>
> There are times when it would be beneficial to wrap Thrift-generated C++ classes with the SWIG tool (http://www.swig.org). This is a problem, though, because SWIG does not yet handle nested class or structure definitions and the C++ code generator defines the __isset structure within the scope of the class definition to which it pertains.
> In order to make the Thrift-generated classes wrappable by SWIG, the __isset structure definition needs to be moved outside of the class definition. For a Thrift generated class called foo, the __isset definition would look like this:
> typedef struct _foo__isset {
> _foo__isset() : member0(false), member1(false) {}
> bool member0;
> bool member1;
> } _foo__isset;
> and the using class would contain this line:
> _foo__isset __isset;
> All existing code will continue to work, and can be regenerated at will.
> I have a patch for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (THRIFT-676) Change C++ code generator so that
generated classes can be wrapped with SWIG
Posted by "David Reiss (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Reiss resolved THRIFT-676.
--------------------------------
Fix Version/s: 0.5
Resolution: Fixed
> Change C++ code generator so that generated classes can be wrapped with SWIG
> ----------------------------------------------------------------------------
>
> Key: THRIFT-676
> URL: https://issues.apache.org/jira/browse/THRIFT-676
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Any C++
> Reporter: Rush Manbert
> Fix For: 0.5
>
> Attachments: patchThrift-676.txt
>
>
> There are times when it would be beneficial to wrap Thrift-generated C++ classes with the SWIG tool (http://www.swig.org). This is a problem, though, because SWIG does not yet handle nested class or structure definitions and the C++ code generator defines the __isset structure within the scope of the class definition to which it pertains.
> In order to make the Thrift-generated classes wrappable by SWIG, the __isset structure definition needs to be moved outside of the class definition. For a Thrift generated class called foo, the __isset definition would look like this:
> typedef struct _foo__isset {
> _foo__isset() : member0(false), member1(false) {}
> bool member0;
> bool member1;
> } _foo__isset;
> and the using class would contain this line:
> _foo__isset __isset;
> All existing code will continue to work, and can be regenerated at will.
> I have a patch for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-676) Change C++ code generator so that
generated classes can be wrapped with SWIG
Posted by "Rush Manbert (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rush Manbert updated THRIFT-676:
--------------------------------
Attachment: patchThrift-676.txt
Patch file.
> Change C++ code generator so that generated classes can be wrapped with SWIG
> ----------------------------------------------------------------------------
>
> Key: THRIFT-676
> URL: https://issues.apache.org/jira/browse/THRIFT-676
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Any C++
> Reporter: Rush Manbert
> Attachments: patchThrift-676.txt
>
>
> There are times when it would be beneficial to wrap Thrift-generated C++ classes with the SWIG tool (http://www.swig.org). This is a problem, though, because SWIG does not yet handle nested class or structure definitions and the C++ code generator defines the __isset structure within the scope of the class definition to which it pertains.
> In order to make the Thrift-generated classes wrappable by SWIG, the __isset structure definition needs to be moved outside of the class definition. For a Thrift generated class called foo, the __isset definition would look like this:
> typedef struct _foo__isset {
> _foo__isset() : member0(false), member1(false) {}
> bool member0;
> bool member1;
> } _foo__isset;
> and the using class would contain this line:
> _foo__isset __isset;
> All existing code will continue to work, and can be regenerated at will.
> I have a patch for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-676) Change C++ code generator so that
generated classes can be wrapped with SWIG
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-676:
---------------------------------
Fix Version/s: 0.4
(was: 0.5)
> Change C++ code generator so that generated classes can be wrapped with SWIG
> ----------------------------------------------------------------------------
>
> Key: THRIFT-676
> URL: https://issues.apache.org/jira/browse/THRIFT-676
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (C++)
> Affects Versions: 0.3
> Environment: Any C++
> Reporter: Rush Manbert
> Fix For: 0.4
>
> Attachments: patchThrift-676.txt
>
>
> There are times when it would be beneficial to wrap Thrift-generated C++ classes with the SWIG tool (http://www.swig.org). This is a problem, though, because SWIG does not yet handle nested class or structure definitions and the C++ code generator defines the __isset structure within the scope of the class definition to which it pertains.
> In order to make the Thrift-generated classes wrappable by SWIG, the __isset structure definition needs to be moved outside of the class definition. For a Thrift generated class called foo, the __isset definition would look like this:
> typedef struct _foo__isset {
> _foo__isset() : member0(false), member1(false) {}
> bool member0;
> bool member1;
> } _foo__isset;
> and the using class would contain this line:
> _foo__isset __isset;
> All existing code will continue to work, and can be regenerated at will.
> I have a patch for this.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.