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