7
7
* Functions for generating various kinds of names during code generation.
8
8
* ----------------------------------------------------------------------------- */
10
char cvsroot_naming_c[] = "$Id: naming.c 10297 2008-03-04 21:37:25Z wsfulton $";
10
char cvsroot_naming_c[] = "$Id: naming.c 10540 2008-06-21 15:23:02Z wsfulton $";
13
13
#include "cparse.h"
484
484
/* A template-based class lookup */
485
if (0 && !rn && SwigType_istemplate(prefix)) {
486
if (!rn && SwigType_istemplate(prefix)) {
486
487
String *t_prefix = SwigType_templateprefix(prefix);
487
488
if (Strcmp(t_prefix, prefix) != 0) {
488
489
String *t_name = SwigType_templateprefix(name);
966
968
* int Swig_need_protected(Node* n)
968
970
* Detects when we need to fully register the protected member.
971
* This is basically any protected members when the allprotected mode is set.
972
* Otherwise we take just the protected virtual methods and non-static methods
973
* (potentially virtual methods) as well as constructors/destructors.
970
975
* ----------------------------------------------------------------------------- */
972
977
int Swig_need_protected(Node *n) {
973
/* First, 'n' looks like a function */
974
/* if (!Swig_director_mode()) return 0; */
975
978
String *nodetype = nodeType(n);
976
if ((Equal(nodetype, "cdecl")) && SwigType_isfunction(Getattr(n, "decl"))) {
977
String *storage = Getattr(n, "storage");
978
/* and the function is declared like virtual, or it has no
979
storage. This eliminates typedef, static and so on. */
980
return !storage || Equal(storage, "virtual");
981
} else if (Equal(nodetype, "constructor") || Equal(nodetype, "destructor")) {
979
if (checkAttribute(n, "access", "protected")) {
980
if ((Equal(nodetype, "cdecl"))) {
981
if (Swig_director_mode() && Swig_director_protected_mode() && Swig_all_protected_mode()) {
984
if (SwigType_isfunction(Getattr(n, "decl"))) {
985
String *storage = Getattr(n, "storage");
986
/* The function is declared virtual, or it has no storage. This eliminates typedef, static etc. */
987
return !storage || Equal(storage, "virtual");
989
} else if (Equal(nodetype, "constructor") || Equal(nodetype, "destructor")) {
1474
if (rename_hash || rename_list) {
1482
if (rename_hash || rename_list || namewarn_hash || namewarn_list) {
1475
1483
Hash *rn = Swig_name_object_get(Swig_name_rename_hash(), prefix, name, decl);
1476
1484
if (!rn || !Swig_name_match_nameobj(rn, n)) {
1477
1485
rn = Swig_name_nameobj_lget(Swig_name_rename_list(), n, prefix, name, decl);