Exemple #1
0
    // Do-Not-Copy semantics
    void Invoke ( T0 const& t0 ) {
		std::size_t i;
		for ( i = 0; i < invocations.size(); ++i ) {
			invocations[i]( t0 );
		}
	}
Exemple #2
0
    // Forward-Semantics
    void Invoke ( T0&& t0 ) {
		std::size_t i;
		for ( i = 0; i < invocations.size(); ++i ) {
			invocations[i]( std::forward<T0>( t0 ) );
		}
	}
Exemple #3
0
		bool Remove( const Token& token ) {
			invocations.erase( token ); return true;
		}
Exemple #4
0
		std::size_t InvocationCount( ) const {
			return invocations.size( );
		}
Exemple #5
0
		Token Add( TCallback&& c ) {
			invocations.emplace_back( std::move( c ) );
			return --invocations.end( );
		}
Exemple #6
0
		Token Add( const TCallback& c ) {
			invocations.emplace_back( c );
			return --invocations.end( );
		}
Exemple #7
0
		Token Add ( TCallback&& c ) {
			invocations.push_back( c );
			return --invocations.end();
		}