Fixes to support protected members with director, proper virtual member recognition and support of the nodirector feature
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5485 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
94fa335b14
commit
0f19564193
13 changed files with 380 additions and 37 deletions
35
Source/Modules/utils.h
Normal file
35
Source/Modules/utils.h
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#ifndef __Modules_utils_h__
|
||||
#define __Modules_utils_h__
|
||||
|
||||
|
||||
inline
|
||||
int is_public(Node* n)
|
||||
{
|
||||
String* access = Getattr(n, "access");
|
||||
return !access || !Cmp(access, "public");
|
||||
}
|
||||
|
||||
inline
|
||||
int is_private(Node* n)
|
||||
{
|
||||
String* access = Getattr(n, "access");
|
||||
return access && !Cmp(access, "private");
|
||||
}
|
||||
|
||||
inline
|
||||
int is_protected(Node* n)
|
||||
{
|
||||
String* access = Getattr(n, "access");
|
||||
return access && !Cmp(access, "protected");
|
||||
}
|
||||
|
||||
inline
|
||||
int is_member_director(Node* classnode, Node* member)
|
||||
{
|
||||
int class_director = !Cmp(Getattr(classnode,"feature:director"), "1");
|
||||
int cdecl_nodirector = !Cmp(Getattr(member,"feature:nodirector"),"1");
|
||||
return class_director && !cdecl_nodirector;
|
||||
}
|
||||
|
||||
|
||||
#endif //__Modules_utils_h__
|
||||
Loading…
Add table
Add a link
Reference in a new issue