BoostBoost.Signals: ヘッダ <boost/signals/connection.hpp>

<boost/signals/connection.hpp> ヘッダ概要

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

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

connection クラス概要

connection クラスは SignalSlot の間の接続を表す。 これはシグナルとスロットが現在接続されているかを問い合わせ、またシグナルとスロットを切断する能力を有する軽量オブジェクトである。 問い合わせと connection の切断を行うことは、常に安全である。

namespace boost {
  namespace signals {
    class connection : // connection クラスは LessThanComparable かつ EqualityComparableである
      private less_than_comparable1<connection>, // 開示用
      private equality_comparable1<connection>// 開示用
    {
    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;
    };
  }
}

connection クラスメンバ


コンストラクタ

connection();

connection(const connection& other);


デストラクタ

~connection();


接続管理

void disconnect() const;

bool connected() const;


代入と交換

connection& operator=(const connection& other);

void swap(connection& other);


比較

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

bool operator<(const connection& other) const;

scoped_connection クラス概要

scoped_connection クラスは、 そのインスタンスが破棄されるときに自動的に切断される接続である。

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&);
    };
  }
}

scoped_connection クラスメンバ


コンストラクタ

scoped_connection();

scoped_connection(const scoped_connection& other);

scoped_connection(const connection& other);


デストラクタ

~connection();


代入と交換

scoped_connection& operator=(const scoped_connection& other);

scoped_connection& operator=(const connection& other);

void swap(scoped_connection& other);


フリー関数

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