Nested classes support is diversified, depending on the language capability. If the language cannot support nested classes, they will be unconditionally moved to the global namespace. If language module does not override Language::nestedClassesSupport() function, nested classes will be ignored, unless "feature:flatnested" is used.
This commit is contained in:
parent
2c87cee65a
commit
2f3d93e93a
9 changed files with 60 additions and 39 deletions
|
|
@ -416,7 +416,7 @@ void Swig_nested_name_unnamed_c_structs(Node *n) {
|
|||
|
||||
static void remove_outer_class_reference(Node *n) {
|
||||
for (Node *c = firstChild(n); c; c = nextSibling(c)) {
|
||||
if (GetFlag(c, "feature:flatnested")) {
|
||||
if (GetFlag(c, "feature:flatnested") || Language::instance()->nestedClassesSupport() == Language::NCS_None) {
|
||||
Delattr(c, "nested:outer");
|
||||
remove_outer_class_reference(c);
|
||||
}
|
||||
|
|
@ -428,7 +428,7 @@ void Swig_nested_process_classes(Node *n) {
|
|||
while (c) {
|
||||
Node *next = nextSibling(c);
|
||||
if (!Getattr(c, "templatetype")) {
|
||||
if (GetFlag(c, "nested") && GetFlag(c, "feature:flatnested")) {
|
||||
if (GetFlag(c, "nested") && (GetFlag(c, "feature:flatnested") || Language::instance()->nestedClassesSupport() == Language::NCS_None)) {
|
||||
removeNode(c);
|
||||
if (!checkAttribute(c, "access", "public"))
|
||||
SetFlag(c, "feature:ignore");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue