new method abstractClassTest - by Scott Michel
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5085 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
173dd1cc45
commit
d5443cb3d0
2 changed files with 10 additions and 1 deletions
|
|
@ -1619,7 +1619,7 @@ int Language::classDeclaration(Node *n) {
|
||||||
InClass = 1;
|
InClass = 1;
|
||||||
CurrentClass = n;
|
CurrentClass = n;
|
||||||
|
|
||||||
Abstract = (Getattr(n,"abstract") ? 1 : 0);
|
Abstract = abstractClassTest(n);
|
||||||
|
|
||||||
/* Call classHandler() here */
|
/* Call classHandler() here */
|
||||||
if (!ImportMode) {
|
if (!ImportMode) {
|
||||||
|
|
@ -2166,6 +2166,14 @@ String * Language::getClassType() const {
|
||||||
return ClassType;
|
return ClassType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -----------------------------------------------------------------------------
|
||||||
|
* Language::abstractClassTest()
|
||||||
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
int Language::abstractClassTest(Node *n) {
|
||||||
|
return (Getattr(n,"abstract") ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
void Language::setSubclassInstanceCheck(String *nc) {
|
void Language::setSubclassInstanceCheck(String *nc) {
|
||||||
none_comparison = nc;
|
none_comparison = nc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,7 @@ public:
|
||||||
virtual int addSymbol(String *s, Node *n); /* Add symbol */
|
virtual int addSymbol(String *s, Node *n); /* Add symbol */
|
||||||
virtual Node *symbolLookup(String *s); /* Symbol lookup */
|
virtual Node *symbolLookup(String *s); /* Symbol lookup */
|
||||||
virtual Node *classLookup(SwigType *s); /* Class lookup */
|
virtual Node *classLookup(SwigType *s); /* Class lookup */
|
||||||
|
virtual int abstractClassTest(Node *n); /* Is class really abstract? */
|
||||||
|
|
||||||
/* Allow director related code generation */
|
/* Allow director related code generation */
|
||||||
void allow_directors(int val = 1);
|
void allow_directors(int val = 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue