Programming Reference


ODDSSink

   

Class Definition File

ODDSSink.idl

Class C++ Binding

ODDSSink.xh

Class Hierarchy

SOMObject
   ODObject
      ODDSSink

Description

A sink represents the recipient of the event notification.   The sink contains the state information required to map the notification to another environment. ODDSSink is a base class that should be subclassed.

ODDSSink responsibilities include:

  • Maintain environment type and state.
  • Provide a generic method dispatch.
  • Return responses.
  • Maintain unique IDs.
  • Maintain the state of the sink environment.

The ODDSSink class has the following attributes:
eventMgr A reference to the source of the events.
environment Information required for mapping events into OLE or other environment.
guid The unique identifier
object A reference to an object that owns the sink.
type Indicates the type of sink: OLE or Generic.

Constructor

This constructor should be used instead of the default constructor to set the guid.

Signature

ODDSSink (ODGUID guid)

Parameters

 

guid  (ODGUID)  -  input 

An OpenDoc unique identifier

Methods

The methods defined by the ODDSSink class include:

Overridden Methods

There are no methods overridden by the ODDSSink class.

   

EventMgrGone

This method notifies the sink when an event manager is disconnected.

Signature
void EventMgrGone ()

Parameters

None.

Returns

None.

Remarks

This method informs the sink that the event manager connected to this sink has been disconnected. This notification allows the sink to inform its objects that the notification connection has been disrupted.    


FireEvent

This method invokes a method on sink objects.

Signature
long FireEvent (ODDSSinkEnum *sinks,
                string *eventName,
                _IDL_SEQUENCE_any *inputParms,
                void **sourceObject,
                long *result)

Parameters

sinks  (ODDSSinkEnum *)  -  input 

eventName  (string *)  -  input 

A reference to a null-terminated string giving the method name to call for notification of the event. The method's parameter must be placed in inputParms.

inputParms  (_IDL_SEQUENCE_any *)  -  in/out 

A reference to a sequence of anys. Each any contains an input or output parameter for the method named by the eventName parameter.

sourceObject  (void **)  -  input 

A reference to the object that is originating the notification.

result  (long *)  -  output 

A reference to a long where the result is returned from the call of the method named by the eventName parameter.

Returns

None.

Remarks

This method invokes a method on the object represented by this sink. FireEvent repackages the input parameters into a v_arg and uses somDispatch to dispatch the method named by the eventName parameter.

FireEvent returns ODDS_ERROR_EVENT_NOTIMPL_BY_SINK if the sink object attribute is NULL.

Exception Handling

Related Methods


[ Top | Previous | Next | Contents | Index | Documentation Homepage ]