#include <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 クラスは Signal と Slot の間の接続を表す。 これはシグナルとスロットが現在接続されているかを問い合わせ、またシグナルとスロットを切断する能力を有する軽量オブジェクトである。 問い合わせと 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 クラスメンバ
 コンストラクタ
- 作用: 現在の接続を NULL 接続に設定する。
 - 事後条件: 
!this->connected() - 例外: なし。
 
connection(const connection& other);
- 作用: 
otherによって参照されていた接続をthisが参照する。 - 例外: なし。
 
デストラクタ
- 作用: なし。
 
接続管理
- 作用: 
this->is_connected()が真であればthisによって参照されているシグナルとスロットの接続を切断する; そうでなければ何もしない。 - 事後条件: 
!this->is_connected() 
- 戻り値: 
thisがアクティブな (接続されている) 非 NULL 接続を参照していればtrue、そうでなければfalse。 - 例外: なし。
 
代入と交換
connection& operator=(const connection& other);
- 作用: 
connection(other).swap(*this); - 戻り値: 
*this 
- 作用: 
thisとotherが参照している接続を交換する。 - 例外: なし。
 
比較
bool operator==(const connection& other) const;
- 戻り値: 
thisとotherが同一の接続を参照しているか、両方とも NULL 接続を参照している場合true、そうでなければfalse。 - 例外: なし。
 
bool operator<(const connection& other) const;
- 戻り値: 実装定義の順序づけによって、
thisによって参照されている接続がotherによって参照されている接続に先行する場合true、そうでなければfalse。 - 例外: なし。
 
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 クラスメンバ
 コンストラクタ
- 作用: 現在の接続を NULL 接続に設定する。
 - 事後条件: 
!this->connected() - 例外: なし。
 
scoped_connection(const scoped_connection& other);
- 作用: 
otherによって参照されていた接続をthisが参照する。 - 例外: なし。
 
scoped_connection(const connection& other);
- 作用: 
otherによって参照されていた接続をthisが参照する。 - 例外: なし。
 
デストラクタ
- 作用: 
this->disconnect() 
代入と交換
scoped_connection& operator=(const scoped_connection& other);
- 作用: 
scoped_connection(other).swap(*this); - 戻り値: 
*this 
scoped_connection& operator=(const connection& other);
- 作用: 
scoped_connection(other).swap(*this); - 戻り値: 
*this 
void swap(scoped_connection& other);
- 作用: 
thisとotherが参照する接続を交換する。 - 例外: なし。
 
フリー関数
void swap(connection& c1, connection& c2);
- 作用: 
c1.swap(c2) - 例外: なし。
 
void swap(scoped_connection& c1, scoped_connection& c2);
- 作用: 
c1.swap(c2) - 例外: なし。
 
Last modified: Fri Oct 11 05:42:05 EDT 2002