INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

gbxutilacfr::Stoppable Class Reference

An abstract interface class representing an stoppable activity. More...

#include <stoppable.h>

Inherited by gbxiceutilacfr::Thread.

List of all members.


Detailed Description

An abstract interface class representing an stoppable activity.

Inherit from this and other classes will know how to ask if your class was stopped (interrupted).

function doBigJob( gbxutilacfr::Stoppable* parent )
{
    // check periodically that the parent activity is not stopping
    while( !parent->isStopping() )
    {
        // perform many steps
    }
}

class MyActivity : public gbxutilacfr::Stoppable
{
public:
    virtual bool isStopping()
    {
        // return TRUE if we are interrupted
    };

    void run()
    {
        doBigJob( this );
    };
};

Author:
Alex Makarenko

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

Generated for GearBox by  doxygen 1.4.5