Boost logo

Boost :

From: Lorien Dunn (l.dunn_at_[hidden])
Date: 2001-02-08 22:18:55


Hullo,

        I'm getting some errors I cant make sense of. They are happening in a set of
inter-object Midi reception and transmission classes. These are the only
classes affected out of about 75. Attached is a file containing the class
interfaces concerned, and the compiler errors.

        I'm using Mandrake7.2 gcc 2.95.3 (prerelease 1991030) - the default
compiler.

Thanks for any help :)

Lorien Dunn
http://members.tripod.com/~loriend

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1


/////////////////////////////////////////////////////////////////////////////////////////////////
// Reciever classes
/////////////////////////////////////////////////////////////////////////////////////////////////

class Transmitter;

class RecieverPyCallback : public Reciever
{
        PyObject* _self;
        public:
                RecieverPyCallback(PyObject* self);
                virtual ~RecieverPyCallback();
                
                virtual void Parse(const Event& ev);
                static void DefaultParse(Reciever& self, const Event& ev);
                
                virtual void OnEvent(const Event& ev);
                static void DefaultOnEvent(Reciever& self, const Event& ev);
                
                //Connection callbacks
                virtual void ConnectionMade(Transmitter& from);
                static void DefaultConnectionMade(Reciever& self, Transmitter& from);
                
                virtual void ConnectionBroken(Transmitter& from);
                static void DefaultConnectionBroken(Reciever& self, Transmitter& from);
};

struct PyReciever : python::class_builder<Reciever,RecieverPyCallback>
{
        PyReciever(python::module_builder& m) :
                python::class_builder<Reciever,RecieverPyCallback>(m, "Reciever")
        {
                def(python::constructor<>());
                def(&Reciever::Parse,"Parse",&RecieverPyCallback::DefaultParse);
                def(&Reciever::OnEvent,"OnEvent",&RecieverPyCallback::DefaultOnEvent);
                def(&Reciever::ConnectionMade,"ConnectionMade",&RecieverPyCallback::DefaultConnectionMade);
                def(&Reciever::ConnectionBroken,"ConnectionBroken",&RecieverPyCallback::DefaultConnectionBroken);
                def(&Reciever::Parse,"Parse",&RecieverPyCallback::DefaultParse);
                def(&Reciever::OnEvent,"OnEvent",&RecieverPyCallback::DefaultOnEvent);
        };
        virtual ~PyReciever() throw() {};
};

/////////////////////////////////////////////////////////////////////////////////////////////////////
// Transmitter classes
//////////////////////////////////////////////////////////////////////////////////////////////////////

class TransmitterPyCallback : public Transmitter
{
        PyObject* _self;
        public:
                TransmitterPyCallback(PyObject* self);
                virtual ~TransmitterPyCallback();

                virtual void Connect(Reciever& dest);
                static void DefaultConnect(Transmitter& self, Reciever& dest);
                
                virtual void Disconnect(Reciever& dest);
                static void DefaultDisconnect(Transmitter& self, Reciever& dest);
                
                virtual void Emit(const Event& ev));
                static void DefaultEmit(Transmitter& self, const Event& ev);
                
                virtual void ConnectionBroken(Reciever& dest);
                static void DefaultConnectionBroken(Transmitter& self, Reciever& dest);
};
 
struct PyTransmitter : python::class_builder<Transmitter, TransmitterPyCallback>
{
        PyTransmitter(python::module_builder& m) :
                python::class_builder<Transmitter, TransmitterPyCallback>(m, "Transmitter")
        {
                def(python::constructor<>());
                def(&Transmitter::Emit,"Emit",&TransmitterPyCallback::DefaultEmit);
                def(&Transmitter::Connect,"Connect", &TransmitterPyCallback::DefaultConnect);
                def(&Transmitter::Disconnect,"Disconnect", &TransmitterPyCallback::DefaultDisconnect);
                def(&Transmitter::ConnectionBroken,"ConnectionBroken",&TransmitterPyCallback::DefaultConnectionBroken);
        };
        virtual ~PyTransmitter() throw() {};
};

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Error Messages
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

/home/lorien/boost/boost/python/detail/extension_class.hpp: In method `boost::python::detail::instance_value_holder<Burt::Midi::Transmitter,Burt::Midi::TransmitterPyCallback>::instance_value_holder<Burt::Midi::Transmitter>(boost::python::detail::extension_instance *, Burt::Midi::Transmitter)':

/home/lorien/boost/boost/python/detail/extension_class.hpp:178: instantiated from `python_extension_class_converters<Burt::Midi::Transmitter,Burt::Midi::TransmitterPyCallback>::to_python(const Burt::Midi::Transmitter &) const'

/home/lorien/boost/boost/python/detail/extension_class.hpp:299: instantiated from `to_python<Burt::Midi::Transmitter>(const Burt::Midi::Transmitter &)'

/home/lorien/boost/boost/python/callback.hpp:458: instantiated from here

/home/lorien/boost/boost/python/detail/extension_class.hpp:680: no matching function for call to `Burt::Midi::TransmitterPyCallback::TransmitterPyCallback (boost::python::detail::extension_instance *&, Burt::Midi::Transmitter &)'

PyMidi/PySignals.cpp:349: candidates are: Burt::Midi::TransmitterPyCallback::TransmitterPyCallback(PyObject *)

PyMidi/PySignals.h:294: Burt::Midi::TransmitterPyCallback::TransmitterPyCallback(const Burt::Midi::TransmitterPyCallback &)

/home/lorien/boost/boost/python/detail/extension_class.hpp: In method `boost::python::detail::instance_value_holder<Burt::Midi::Reciever,Burt::Midi::RecieverPyCallback>::instance_value_holder<Burt::Midi::Reciever>(boost::python::detail::extension_instance *, Burt::Midi::Reciever)':

/home/lorien/boost/boost/python/detail/extension_class.hpp:178: instantiated from `python_extension_class_converters<Burt::Midi::Reciever,Burt::Midi::RecieverPyCallback>::to_python(const Burt::Midi::Reciever &) const'

/home/lorien/boost/boost/python/detail/extension_class.hpp:299: instantiated from `to_python<Burt::Midi::Reciever>(const Burt::Midi::Reciever &)'

/home/lorien/boost/boost/python/callback.hpp:458: instantiated from here

/home/lorien/boost/boost/python/detail/extension_class.hpp:680: no matching function for call to `Burt::Midi::RecieverPyCallback::RecieverPyCallback (boost::python::detail::extension_instance *&, Burt::Midi::Reciever &)'

PyMidi/PySignals.cpp:6: candidates are: Burt::Midi::RecieverPyCallback::RecieverPyCallback(PyObject *)

PyMidi/PySignals.h:86: Burt::Midi::RecieverPyCallback::RecieverPyCallback(const Burt::Midi::RecieverPyCallback &)

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// EOF
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk