/usr/include/magics/MagicsObserver.h is in libmagics++-dev 2.18.15-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | /*! \file MagicsObserver.h
\brief Definition of the Template class MagicsObserver.
Magics Team - ECMWF 2007
Started: Thu 22-Nov-2007
Changes:
*/
#ifndef MagicsObserver_H
#define MagicsObserver_H
#include "magics.h"
#include "MagLog.h"
namespace magics {
class MagicsCursorEvent;
class MagicsSwapBufferEvent;
class MagicsZoomEvent;
class MagicsAntialiasingEvent;
class MagicsAnimationEvent;
class MagicsMagnifierEvent;
class MagicsRestoreFbEvent;
class MagicsAnimationCurrentStepEvent;
class MagicsAnimationStepsEvent;
class MagicsLayerTreeEvent;
class MagicsLayerUpdateEvent;
class MagicsLayerSwapEvent;
class MagicsZoomUpdateEvent;
class MagicsRenderZoomPreviewEvent;
class MagicsObserver {
public:
MagicsObserver() { MagLog::registerObserver(this); }
virtual ~MagicsObserver() {MagLog::unregisterObserver(this);}
virtual void warningMessage(const string& msg) {cout << msg;} // default behaviour
virtual void errorMessage(const string& msg) {cerr << msg;} // default behaviour
virtual void infoMessage(const string& msg) {cout << msg;} // default behaviour
virtual void progressMessage(const string& msg) {cout << msg;} // default behaviour
virtual void notify(MagicsCursorEvent&) {}
virtual void notify(MagicsSwapBufferEvent&) {}
virtual void notify(MagicsZoomEvent&) {}
virtual void notify(MagicsAntialiasingEvent&) {}
virtual void notify(MagicsMagnifierEvent&) {}
virtual void notify(MagicsRestoreFbEvent&) {}
virtual void notify(MagicsAnimationCurrentStepEvent&) {}
virtual void notify(MagicsAnimationStepsEvent&) {}
virtual void notify(MagicsLayerTreeEvent&) {}
virtual void notify(MagicsLayerUpdateEvent&) {}
virtual void notify(MagicsLayerSwapEvent&) {}
virtual void notify(MagicsZoomUpdateEvent&) {}
virtual void notify(MagicsRenderZoomPreviewEvent&) {}
//virtual void areaCB(const string&, double ll_x, double ll_y, double ur_x, double ur_y) {}
virtual void areaCB(const string&, double, double, double, double) {}
virtual void inputCB(const string&, double , double ) {}
virtual void zoomCB(const string&, int) {}
virtual void zoomControlCB(bool) {}
virtual void animationControlCB(bool) {}
protected:
//! Method to print string about this class on to a stream of type ostream (virtual).
virtual void print(ostream&) const {}
private:
//! Copy constructor - No copy allowed
MagicsObserver(const MagicsObserver&);
//! Overloaded << operator to copy - No copy allowed
MagicsObserver& operator=(const MagicsObserver&);
// -- Friends
//! Overloaded << operator to call print().
friend ostream& operator<<(ostream& s,const MagicsObserver& p)
{ p.print(s); return s; }
};
} // namespace magics
#endif
|