[sigc] looking for SigC::ScopedConnection



Hi!

I was wondering why SigC (yes, I'm still using 1.2 for reasons of legacy 
compilers) didn't have this, it would be as simple as

class LIBSIGC_API ScopedConnection: Connection
{
    // not copyable
    ScopedConnection( ScopedConnection const&)
public:
    ScopedConnection(){}
    explicit ScopedConnection( Connection const& c): Connection(c){}
    void operator=( Connection const& c)
    {
        this->disconnect();
        Connection::operator=(c);
    }
    ~ScopedConnection(){ this->disconnect(); }
};

Maybe this (and a few other additions/fixes) would merit a 1.3?

Uli



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]