/**
   The example of that Qt4's moc is mocked by C++ language.

   Copyright (C) Yamauchi, Hitoshi

   First version: 
   2006-09-01(Fri) Yamauchi Hitoshi MPI fuer Informatik, Saarbruecken, Germany
   Last update:
   2006-12-16(Sat) Yamauchi Hitoshi mentalimages GmbH, Berlin, Germany.
*/
#ifndef MOCDIAGRAPHTRAP_HH
#define MOCDIAGRAPHTRAP_HH
#include <QObject>

namespace AAA {
  /**
     \class BaseA 
     This is almost nothing, but in the namesapace AAA.
   */ 
  class BaseA {
  public:
    BaseA(){}
    virtual ~BaseA(){}
  };
} // namesapace AAA

namespace BBB {
/** 
    \class DerivedB 

    Qt4's moc automatically generates a function called
    qt_metacast(). In this function, there is a static_cast, (The
    former mocs generates a C type cast. I see this change is an
    improvement.) However, global namespece identifier gives a
    digraph, then, '<:' is translated to '[' because of C++ standard
    rule.

    <pre>
    return static_cast<::AAA::BaseA*>(const_cast<DerivedB*>(this));
    </pre>    
    means (after cpp processing)
    <pre>
    return static_cast[:AAA::BaseA*>(const_cast<DerivedB*>(this));
    </pre>    
*/
class DerivedB : public QObject, public ::AAA::BaseA {
  Q_OBJECT
public:
  DerivedB() : QObject(0), BaseA() {}
  virtual ~DerivedB() {}
public slots:
signals:
private:
};

} //namespace BBB
#endif // MOCDIAGRAPHTRAP_HH defined
