comet::cp_throw Struct Reference

#include <comet/cptraits.h>

List of all members.

Public Member Functions

 cp_throw ()
 Constructor - called before iterating over the connection-points.
 ~cp_throw ()
 Destructor - called after iterating over all the connection-points.
bool check_fail (HRESULT hr)

Static Public Member Functions

template<typename CONNECTIONS> bool on_fail (CONNECTIONS &par_connects, const typename CONNECTIONS::iterator &par_it)

Protected Attributes

HRESULT _hr_


Detailed Description

Default 'throw' traits for connection-points.
 Usage
      connection_point_for<IMySourceInterface>::connection_point.Fire_MyEvent( arg1, comet::cp_throw());


Member Function Documentation

bool comet::cp_throw::check_fail HRESULT  hr  )  [inline]
 

Called when a connection point fails. Can also be used to remember the hresult for the destructor.

Return values:
true Cause the on_fail method to be called.
false Ignore the failure.

template<typename CONNECTIONS>
bool comet::cp_throw::on_fail CONNECTIONS &  par_connects,
const typename CONNECTIONS::iterator &  par_it
[inline, static]
 

Called when check_fail returns true.

Parameters:
par_connects Reference to the STL container containing the connection-points.
par_it The iterator of the failed connection-point.


The documentation for this struct was generated from the following file: