openModeller  Version 1.4.0
CallbackWrapper Class Reference

#include <CallbackWrapper.hh>

List of all members.

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.html This 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

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.

Destructor

Definition at line 44 of file CallbackWrapper.hh.


Member Function Documentation

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().

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().

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().

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().

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

Definition at line 98 of file CallbackWrapper.hh.

Referenced by abortionRequested(), and setAbortionCallback().


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