BoostBoost.Signals: Header <boost/signals/connection.hpp>

Header <boost/signals/connection.hpp> synopsis

namespace boost {
  namespace signals {
    class connection;
    class scoped_connection;

    void swap(connection&, connection&);
    void swap(scoped_connection&, scoped_connection&);
  }
}

Class connection synopsis

The connection class represents a connection between a Signal and a Slot. It is a lightweight object that has the ability to query whether the signal and slot are currently connected, and to disconnect the signal and slot. It is always safe to query or disconnect a connection.

namespace boost {
  namespace signals {
    class connection : // Class connection is LessThanComparable and EqualityComparable
      private less_than_comparable1<connection>, // Exposition only.
      private equality_comparable1<connection>// Exposition only.
    {
    public:
      connection();
      connection(const connection&);
      ~connection();
  
      void disconnect() const;
      bool connected() const;

      connection& operator=(const connection&);
      void swap(connection&);

      bool operator==(const connection& other) const;
      bool operator<(const connection& other) const;
    };
  }
}

Class connection members


Constructors

connection();

connection(const connection& other);


Destructor

~connection();


Connection Management

void disconnect() const;

bool connected() const;


Assignment and Swap

connection& operator=(const connection& other);

void swap(connection& other);


Comparison

bool operator==(const connection& other) const;

bool operator<(const connection& other) const;

Class scoped_connection synopsis

The scoped_connection class is a connection that will be automatically disconnected when the scoped_connection instance is destructed.

namespace boost {
  namespace signals {
    class scoped_connection : public connection
    {
    public:
      scoped_connection();
      scoped_connection(const scoped_connection&);
      scoped_connection(const connection&);
      ~scoped_connection();

      connection& operator=(const scoped_connection&);
      connection& operator=(const connection&);
      void swap(connection&);
    };
  }
}

Class scoped_connection members


Constructors

scoped_connection();

scoped_connection(const scoped_connection& other);

scoped_connection(const connection& other);


Destructor

~connection();


Assignment and Swap

scoped_connection& operator=(const scoped_connection& other);

scoped_connection& operator=(const connection& other);

void swap(scoped_connection& other);


Free Functions

void swap(connection& c1, connection& c2);

void swap(scoped_connection& c1, scoped_connection& c2);


Doug Gregor
Last modified: Fri Oct 11 05:42:05 EDT 2002