CERN -> IPT Group -> FrameMaker at CERN
Information Service User's Guide

15.1 ISCallbackEvent


Synopsis
#include <is/callbackevent.h>
void user_callback(ISCallbackEvent * isc) { ... }


Description

This class is used to pass the information about changes in the IS repository to user's callback function. If callback function with the ISCallbackEvent parameter is used for the information subscription (see Chapter "ISInfoReceiver" class), the modified information object values are not transferred from the IS repository to the subscribing applications. Instead the subscriber receives only name, type and modification time of the affected information. In order to receive the information value, one has to use another callback function which has Chapter "ISCallbackInfo" as parameter type.

This class has no public constructors and can't be created by a user. The pointer to an instance of this class is passed as an argument of the user callback function.


Example
1: void user_callback(ISCallbackInfo * isc){
2: ISInfoInt isi;
3:
4: if ( isc->type() == isi.type() ){
5: isc->value(isi);
6: cout << isc->name() << " : " << isi << endl;
7: }
8: else
9: cout << isc->name() << " has unknown type " << isc->type() << endl;
10: }


Public Member Functions
const char * 
name();
Returns name of the changed information.
void * 
parameter();
Returns user's parameter that has been provided via the subscribe method of the ISInfoReceiver method.
ISInfo::Reason 
reason();
Returns the reason of notification.
int 
tag();
Returns tag of the changed information object.
const OWLTime &
time();
Returns time of the last modification of the information object. In fact that's the time of the event which has caused the callback function invocation.
ISType 
type();
Returns type of the changed information object.


2 July 1998 - WebMaster
Copyright © CERN 1998