openModeller
Version 1.5.0
|
#include <CallbackWrapper.hh>
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 |
Declaration of CallbackWrapper class
LICENSE INFORMATION
Copyright(c) 2008 by CRIA - Centro de Referencia em Informacao Ambiental
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.
CallbackWrapper::CallbackWrapper | ( | ) |
Default constructor
Definition of CallbackWrapper class
LICENSE INFORMATION
Copyright(c) 2008 by CRIA - Centro de Referencia em Informacao Ambiental
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.
|
inline |
Destructor
Definition at line 44 of file CallbackWrapper.hh.
bool CallbackWrapper::abortionRequested | ( | ) |
Method used only by abortion callbacks to indicate that the current job needs to be aborted.
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.
progress | Model 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.
progress | Model 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.
func | Job abortion callback. |
param | Extra 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.
func | Model creation callback. |
param | Extra 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.
func | Model projection callback. |
param | Extra 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().
|
private |
Definition at line 98 of file CallbackWrapper.hh.
Referenced by abortionRequested(), and setAbortionCallback().
|
private |
Definition at line 95 of file CallbackWrapper.hh.
Referenced by abortionRequested(), and setAbortionCallback().
|
private |
Definition at line 86 of file CallbackWrapper.hh.
Referenced by notifyModelCreationProgress(), and setModelCreationCallback().
|
private |
Definition at line 83 of file CallbackWrapper.hh.
Referenced by notifyModelCreationProgress(), and setModelCreationCallback().
|
private |
Definition at line 92 of file CallbackWrapper.hh.
Referenced by notifyModelProjectionProgress(), and setModelProjectionCallback().
|
private |
Definition at line 89 of file CallbackWrapper.hh.
Referenced by notifyModelProjectionProgress(), and setModelProjectionCallback().