/usr/include/ossim/base/ossimCallback1wRet.h is in libossim-dev 1.8.16-4ubuntu1.
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 | //----------------------------------------------------------------------------
//
// File: ossimCallback1wRet.h
//
// License: LGPL
//
// See LICENSE.txt file in the top level directory for more details.
//
// Author: David Burken
//
// Description:
//
// Simple templated callback class that takes a single parameter(argument) "P1"
// and has a return "RT".
//
// See link for more detail description:
// http://www.tutok.sk/fastgl/callback.html
//
//----------------------------------------------------------------------------
// $Id$
#ifndef ossimCallback1wRet_HEADER
#define ossimCallback1wRet_HEADER 1
/**
* @class ossimCallback1wRet
*
* Usage example, note template params can be anything:
*
* Caller interface to register callback:
*
* @code
* void registerCallback(ossimCallback1wRet<const ossimFilename&, bool>* cb);
* @endcode
*
* Callee creation of call back mechanism:
*
* @code
* class ProcessFileCB: public ossimCallback1wRet<const ossimFilename&, bool>
* {
* public:
* ProcessFileCB(
* ossimImageElevationDatabase* obj,
* bool (ossimImageElevationDatabase::*func)(const ossimFilename&))
* :
* m_obj(obj),
* m_func(func)
* {}
*
* virtual bool operator()(const ossimFilename& file) const
* {
* return ( m_obj->*m_func)(file);
* }
*
* private:
* ossimImageElevationDatabase* m_obj;
* bool (ossimImageElevationDatabase::*m_func)(const ossimFilename& file);
* };
* @endcode
*
* Making/registering a callback.
*
* @code
* ossimFileWalker* fw = new ossimFileWalker();
*
* ossimCallback1wRet<const ossimFilename&, bool>* cb =
* new ProcessFileCB(this, &ossimImageElevationDatabase::processFile);
*
* fw->registerProcessFileCallback(cb);
*
* @endcode
*/
template <class P1, class RT> class ossimCallback1wRet
{
public:
ossimCallback1wRet(){}
virtual ~ossimCallback1wRet(){}
virtual RT operator()(P1 p1) const = 0;
};
#endif /* #ifndef ossimCallback1wRet_HEADER */
|