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

12.3 ISCommandListener


Synopsis
#include <is/infoprovider.h>
class MyCommandListener : public ISCommandListener { ... };


Description

This class is an abstract base class for the IS command receivers. It has one pure virtual method, which must be implemented by the user command receiver class.


Example
1: class MyCommandListener : public ISCommandListener
2: {
3: public:
4: void command( const std::string & name, const std::string & cmd )
5: {
6: std::cout << "MyCommandListener:: command '" << cmd
7: << "' received for the '" << name << "' info" << std::endl;
8: }
9: };
10:
11: MyCommandListener lst;
12:
13: ISInfoProvider::instance().addCommandListener( &lst );


Public Virtual Function
void 
command( const std::string & name, const std::string & cmd ) = 0;
Pure virtual function, which must be overridden by the user's class, which want to implement command listener. The name is the name of the information object, to which the cmd command has to be applied.


2 July 1998 - WebMaster
Copyright © CERN 1998