51"/>
<rectangle x1="1.3732" y1="0.73" x2="1.5238" y2="0.759" layer="51"/>
<rectangle x1="1.8599" y1="0.6547" x2="1.8946" y2="0.9444" layer="51"/>
<rectangle x1="1.9584" y1="0.6547" x2="1.9931" y2="0.7764" layer="51"/>
<rectangle x1="2.109" y1="0.6547" x2="2.1437" y2="0.817" layer="51"/>
<rectangle x1="2.2075" y1="0.6547" x2="2.2422" y2="0.7764" layer="51"/>
<rectangle x1="2.619" y1="0.6547" x2="2.6536" y2="0.9443" layer="51"/>
<rectangle x1="3.3026" y1="0.6547" x2="3.3373" y2="0.8227" layer="51"/>
<rectangle x1="3.4532" y1="0.73" x2="3.6038" y2="0.759" layer="51"/>
<polygon width="0.0102" layer="51">
<vertex x="1.0893" y="1.9062" curve="-31.391799"/>
<vertex x="1.0487" y="2.0453"/>
<vertex x="0.8807" y="1.9873" curve="6.600003"/>
<vertex x="0.7822" y="1.9468" curve="1.838803"/>
<vertex x="0.5852" y="1.8483" curve="8.257493"/>
<vertex x="0.4346" y="1.7556" curve="3.886845"/>
<vertex x="0.3071" y="1.6571" curve="10.726515"/>
<vertex x="0.2376" y="1.5876" curve="-3.615587"/>
<vertex x="0.1506" y="1.4891" curve="21.577252"/>
<vertex x="0.0695" y="1.3616" curve="1.369946"/>
<vertex x="0.0406" y="1.2863" curve="21.04052"/>
<vertex x="0.0116" y="1.1182" curve="14.83372"/>
<vertex x="0.0348" y="0.956" curve="20.430091"/>
<vertex x="0.1159" y="0.788" curve="11.786339"/>
<vertex x="0.2665" y="0.62" curve="10.152173"/>
<vertex x="0.4577" y="0.4751" curve="8.279602"/>
<vertex x="0.7416" y="0.3245" curve="7.798412"/>
<vertex x="1.0777" y="0.2028" curve="3.948694"/>
<vertex x="1.379" y="0.1275" curve="2.410654"/>
<vertex x="1.6513" y="0.0753" curve="5.069986"/>
<vertex x="1.9294" y="0.0406" curve="4.254152"/>
<vertex x="2.6073" y="0.0116" curve="13.441337"/>
<vertex x="3.7429" y="0.1391" curve="10.613893"/>
<vertex x="4.3339" y="0.3361" curve="8.146352"/>
<vertex x="4.7511" y="0.5562" curve="15.823896"/>
<vertex x="4.9597" y="0.73" curve="172.109628"/>
<vertex x="4.9539" y="0.7358" curve="-5.433492"/>
<vertex x="4.8148" y="0.6258" curve="-13.999292"/>
<vertex x="4.5599" y="0.4867" curve="-0.116677"/>
<vertex x="4.3107" y="0.3882" curve="-13.042388"/>
<vertex x="3.8994" y="0.2781" curve="1.960346"/>
<vertex x="3.656" y="0.2376" curve="-8.871401"/>
<vertex x="2.9376" y="0.1622" curve="-3.114208"/>
<vertex x="2.364" y="0.1622" curve="-5.185695"/>
<vertex x="1.9642" y="0.1912" curve="-5.19899"/>
<vertex x="1.5064" y="0.2665" curve="-5.873861"/>
<vertex x="1.1356" y="0.365" curve="-8.501763"/>
<vertex x="0.9212" y="0.4519" curve="-3.189882"/>
<vertex x="0.7243" y="0.5562" curve="-13.033235"/>
<vertex x="0.533" y="0.6953" curve="-11.411402"/>
<vertex x="0.3882" y="0.8575" curve="-22.063155"/>
<vertex x="0.3071" y="1.0313" curve="-6.690142"/>
<vertex x="0.2897" y="1.124" curve="-26.38927"/>
<vertex x="0.3071" y="1.2921" curve="-19.870235"/>
<vertex x="0.394" y="1.4485" curve="-13.873453"/>
<vertex x="0.5736" y="1.6223" curve="-7.551782"/>
<vertex x="0.7938" y="1.7672" curve="-6.010589"/>
<vertex x="1.0024" y="1.8715" curve="-3.588979"/>
</polygon>
<polygon width="0.0102" layer="51">
<vertex x="1.5006" y="2.0453"/>
<vertex x="1.5876" y="2.0743" curve="-10.241607"/>
<vertex x="1.8077" y="2.1264" curve="0.331965"/>
<vertex x="2.2017" y="2.1843" curve="-3.882318"/>
<vertex x="2.3524" y="2.2017" curve="-4.8734"/>
<vertex x="2.6537" y="2.2133"/>
<vertex x="2.4567" y="2.2133" curve="1.33347"/>
<vertex x="1.9584" y="2.2075" curve="6.144407"/>
<vertex x="1.7324" y="2.1901" curve="2.714448"/>
<vertex x="1.4717" y="2.1496" curve="-35.411692"/>
</polygon>
<polygon width="0.0102" layer="51">
<vertex x="3.8067" y="1.3732"/>
<vertex x="3.8067" y="1.4021// C++ namespace tests

%module cpp_namespace

%inline %{
  typedef int Bad;

  /* A very basic namespace */
  namespace example {
    typedef char *Bad;

    int fact(int n) {
      if (n <= 0) return 1;
      else return n*fact(n-1);
    }
    int Foo = 42;

    class Test {
    public:
      Test() { }
      ~Test() { }
      char *method() {
	return (char *) "Test::method";
      }
    };
    typedef Test *TestPtr;
    void weird(Bad x, ::Bad y) { }
  }

  char *do_method(example::TestPtr t) {
    return t->method();
  }

  namespace ex = example;

  char *do_method2(ex::TestPtr t) {
     return t->method();
  }

%}

// Some more complicated namespace examples

%inline %{
namespace Foo {
   typedef int Integer;
   class Test2 { 
   public:
       virtual ~Test2() { }
       virtual char *method() {	
	 return (char *) "Test2::method";
       }
   };
  typedef Test2 *Test2Ptr;
}

namespace Foo2 {
  using Foo::Integer;
  using Foo::Test2;
  class Test3 : public Test2 {
  public:
    virtual char *method() {	
      return (char *) "Test3::method";
    }
  };
  typedef Test3 *Test3Ptr;
  typedef Test3 Test3Alt;
}

namespace Foo3 {
  using namespace Foo2;
  class Test4 : public Test3 {
  public:
    virtual char *method() {	
      return (char *) "Test4::method";
    }
  };
  Integer foo3(Integer x) { return x; }
  typedef Test4 *Test4Ptr;
  
}
   
using Foo2::Test3Alt;
using Foo3::Integer;

class Test5 : public Test3Alt { 
public:
  virtual char *method() {	
    return (char *) "Test5::method";
  }
};

char *do_method3(Foo::Test2 *t, Integer x) {
  return t->method();
}

%}



   


      	

