use separate slot implementation for each module
[lqt.git] / test / noqt / n3
blob748c2b57e9c63982f8c8810d3262737bfd7b93fa
1 #ifndef AA
2 #define AA
4 #include <iostream>
5 #include <vector>
6 #include <cstdio>
9 #include <cassert>
11 namespace N {
13   class Shape {
14   public:
15   Shape() {}
16   };
18   class Sphere : public Shape
19   {
20   public:
21   Sphere() {}
22   };
24   class Geometry {
25   public:
26     Geometry(Shape *shape) { assert(shape); }
27     void add(Shape *shape) { assert(shape); }
28   };
33 namespace N
36 class A 
38 public:
39   A() {}
40   enum E {
41     E1=3,
42     E2=5,
43     E3=7
44     
45   };
46   
47   void setInt( int i ) { std::cerr << "setInt: " << i << std::endl; }
48   void setEnum( E i ) { std::cerr << "setEnum: " << i << std::endl; }
55 typedef std::vector<void*> ASomething;
57 class C {
58 private:
59 ~C() {}
62 namespace test {
63 class A
65  public:
66  A() { std::cerr << "A::A" << std::endl; }
67  ~A() { std::cerr << "A::~A" << std::endl; }
70  const std::string & get_string(const std::string& a="") {return a;}
71  void doFunc() { std::cout << "A::doFunc()" << std::endl; func(); }
72  virtual void func() { std::cout << "A::func()" << std::endl;  }
74  class B
75  {
76    public:
78    B() { std::cout << "B::B" << std::endl; }
79   ~B() { std::cout << "B::~B" << std::endl; }
81    void do_something() { std::cout << "B::do_something()" << std::endl; }
83  };
85  void useB(B* b) { b->do_something();
86   } 
91 namespace N {
92 typedef double Real;
94  class  Time
95  {
96  public:
97    Time() {}
98    virtual ~Time() {}
100     void setTimeStep(Real h) {}
101    virtual Real getTimeStep() const { return 32;}
102  protected:
103    Real m_timeStep;
104  };
107 #endif