%extend member variable test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7315 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a365332c97
commit
0e588cf149
1 changed files with 2 additions and 6 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
class ExtendMe {
|
class ExtendMe {
|
||||||
double var;
|
double var;
|
||||||
public:
|
public:
|
||||||
ExtendMe(){}
|
ExtendMe() : var(0.0) {}
|
||||||
bool get(double &d) {
|
bool get(double &d) {
|
||||||
d = var;
|
d = var;
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -19,14 +19,10 @@ public:
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%extend ExtendMe {
|
%extend ExtendMe {
|
||||||
ExtendVar;
|
double ExtendVar;
|
||||||
};
|
};
|
||||||
|
|
||||||
%{
|
%{
|
||||||
namespace {
|
|
||||||
static double StaticVar = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If possible, all language modules should use this naming format for consistency
|
// If possible, all language modules should use this naming format for consistency
|
||||||
void ExtendMe_ExtendVar_set(ExtendMe *thisptr, double value) {
|
void ExtendMe_ExtendVar_set(ExtendMe *thisptr, double value) {
|
||||||
thisptr->set(value);
|
thisptr->set(value);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue