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:
William S Fulton 2003-09-06 15:39:31 +00:00
commit c4d545bd5d
2 changed files with 10 additions and 1 deletions

View file

@ -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;
}

View file

@ -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);