openModeller  Version 1.5.0
CallbackWrapper Class Reference

#include <CallbackWrapper.hh>

Collaboration diagram for CallbackWrapper:
Collaboration graph

Public Member Functions

 CallbackWrapper ()
 
 ~CallbackWrapper ()
 
void setModelCreationCallback (ModelCreationCallback func, void *param)
 
void setModelProjectionCallback (ModelProjectionCallback func, void *param)
 
void setAbortionCallback (AbortionCallback func, void *param)
 
void notifyModelCreationProgress (float progress)
 
void notifyModelProjectionProgress (float progress)
 
bool abortionRequested ()
 

Private Attributes

ModelCreationCallback _model_creation_callback
 
void * _model_creation_arg
 
ModelProjectionCallback _model_projection_callback
 
void * _model_projection_arg
 
AbortionCallback _abortion_callback
 
void * _abortion_arg
 

Detailed Description

Declaration of CallbackWrapper class

Author
Renato De Giovanni
Id:
CallbackWrapper.hh 4347 2008-06-10 20:24:27Z rdg

LICENSE INFORMATION

Copyright(c) 2008 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/copyleft/gpl.htmlThis class is used to wrap openModeller callbacks since they may need to be called with an extra custom parameter. This class stores the extra parameter and passes it whenever the callback needs to be called.

Definition at line 36 of file CallbackWrapper.hh.

Constructor & Destructor Documentation

CallbackWrapper::CallbackWrapper ( )

Default constructor

Definition of CallbackWrapper class

Author
Renato De Giovanni
Id:
CallbackWrapper.cpp 4347 2008-06-10 20:24:27Z rdg

LICENSE INFORMATION

Copyright(c) 2008 by CRIA - Centro de Referencia em Informacao Ambiental

http://www.cria.org.br

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:

http://www.gnu.org/copyleft/gpl.html

Definition at line 30 of file CallbackWrapper.cpp.

CallbackWrapper::~CallbackWrapper ( )
inline

Destructor

Definition at line 44 of file CallbackWrapper.hh.

Member Function Documentation

bool CallbackWrapper::abortionRequested ( )

Method used only by abortion callbacks to indicate that the current job needs to be aborted.

Returns
True to indicate that abortion was requested, false otherwise.

Definition at line 79 of file CallbackWrapper.cpp.

References _abortion_arg, and _abortion_callback.

Referenced by Projector::createMap(), and AlgorithmImpl::createModel().

void CallbackWrapper::notifyModelCreationProgress ( float  progress)

Method used only by model creation callbacks to indicate job progress.

Parameters
progressModel creation progress.

Definition at line 61 of file CallbackWrapper.cpp.

References _model_creation_arg, and _model_creation_callback.

Referenced by AlgorithmImpl::createModel().

void CallbackWrapper::notifyModelProjectionProgress ( float  progress)

Method used only by model projection callbacks to indicate job progress.

Parameters
progressModel projection progress.

Definition at line 70 of file CallbackWrapper.cpp.

References _model_projection_arg, and _model_projection_callback.

Referenced by Projector::createMap().

void CallbackWrapper::setAbortionCallback ( AbortionCallback  func,
void *  param 
)

Set a job abortion callback with an optional additional parameter.

Parameters
funcJob abortion callback.
paramExtra parameter to be passed to the callback.

Definition at line 54 of file CallbackWrapper.cpp.

References _abortion_arg, and _abortion_callback.

Referenced by OpenModeller::setAbortionCallback().

void CallbackWrapper::setModelCreationCallback ( ModelCreationCallback  func,
void *  param 
)

Set a model creation callback with an optional additional parameter.

Parameters
funcModel creation callback.
paramExtra parameter to be passed to the callback.

Definition at line 40 of file CallbackWrapper.cpp.

References _model_creation_arg, and _model_creation_callback.

Referenced by OpenModeller::setModelCallback().

void CallbackWrapper::setModelProjectionCallback ( ModelProjectionCallback  func,
void *  param 
)

Set a model projection callback with an optional additional parameter.

Parameters
funcModel projection callback.
paramExtra parameter to be passed to the callback.

Definition at line 47 of file CallbackWrapper.cpp.

References _model_projection_arg, and _model_projection_callback.

Referenced by OpenModeller::setMapCallback().

Member Data Documentation

void* CallbackWrapper::_abortion_arg
private

Definition at line 98 of file CallbackWrapper.hh.

Referenced by abortionRequested(), and setAbortionCallback().

AbortionCallback CallbackWrapper::_abortion_callback
private

Definition at line 95 of file CallbackWrapper.hh.

Referenced by abortionRequested(), and setAbortionCallback().

void* CallbackWrapper::_model_creation_arg
private

Definition at line 86 of file CallbackWrapper.hh.

Referenced by notifyModelCreationProgress(), and setModelCreationCallback().

ModelCreationCallback CallbackWrapper::_model_creation_callback
private

Definition at line 83 of file CallbackWrapper.hh.

Referenced by notifyModelCreationProgress(), and setModelCreationCallback().

void* CallbackWrapper::_model_projection_arg
private

Definition at line 92 of file CallbackWrapper.hh.

Referenced by notifyModelProjectionProgress(), and setModelProjectionCallback().

ModelProjectionCallback CallbackWrapper::_model_projection_callback
private

Definition at line 89 of file CallbackWrapper.hh.

Referenced by notifyModelProjectionProgress(), and setModelProjectionCallback().


The documentation for this class was generated from the following files: