Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <boost/python.hpp>
- #include <boost/shared_ptr.hpp>
- #include <boost/enable_shared_from_this.hpp>
- class Communicatable
- {
- public:
- virtual ~Communicatable() { }
- virtual int GetMessage() = 0;
- virtual void Communicate(boost::shared_ptr<Communicatable> destination) = 0;
- virtual void Listen(boost::shared_ptr<Communicatable> originator) = 0;
- };
- class CommunicatableWrapper : public Communicatable, public boost::python::wrapper<Communicatable>
- {
- public:
- virtual int GetMessage();
- virtual void Communicate(boost::shared_ptr<Communicatable> destination);
- virtual void Listen(boost::shared_ptr<Communicatable> originator);
- };
- class CImplementation : public Communicatable, public boost::enable_shared_from_this<CImplementation>
- {
- protected:
- int message;
- public:
- CImplementation(int message);
- virtual int GetMessage();
- virtual void Communicate(boost::shared_ptr<Communicatable> destination);
- virtual void Listen(boost::shared_ptr<Communicatable> originator);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement