Browse Source

Fixed the declaration qualified name printing to take into account library namespaces.

pull/1/head
triton 13 years ago
parent
commit
b78af2d521
  1. 13
      src/Generator/Generators/CLI/CLITypePrinter.cs

13
src/Generator/Generators/CLI/CLITypePrinter.cs

@ -195,8 +195,17 @@ namespace Cxxi.Generators.CLI
public string VisitDeclaration(Declaration decl) public string VisitDeclaration(Declaration decl)
{ {
var name = decl.Visit(this); var names = new List<string>();
return string.Format("{0}::{1}", decl.Namespace.QualifiedName, name);
if (Options.GenerateLibraryNamespace)
names.Add(Library.Name);
if (!string.IsNullOrEmpty(decl.Namespace.QualifiedName))
names.Add(decl.Namespace.QualifiedName);
names.Add(decl.Visit(this));
return string.Join("::", names);
} }
public string VisitClassDecl(Class @class) public string VisitClassDecl(Class @class)

Loading…
Cancel
Save