/*
 * Jakelib2 - General purpose C++ library
 * Copyright (C) 2001 Florian Wolff  (florian@donuz.de)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * $Id: Runnable.h,v 1.5 2003/01/25 16:16:23 florian Exp $
 */

#ifndef INCLUDE_JAKELIB2_LANG_RUNNABLE_H
# define INCLUDE_JAKELIB2_LANG_RUNNABLE_H


namespace jakelib {
  namespace lang {
    /**
     * @brief Runnable is an interface you implement to indicate that your class can be
     * executed as the main part of a Thread, among other places.
     *
     * When you want an entry point to run a piece of code, implement this interface and
     * override run.
     *
     * @class Runnable
     * @version $Id: Runnable.h,v 1.5 2003/01/25 16:16:23 florian Exp $
     * @author Florian 'Overflo' Wolff (florian@donuz.de)
     */
    class Runnable : public Interface
      {
      public:
        /**
         * @brief This method will be called by whoever wishes to run your class
         * implementing Runnable.
         *
         * Note that there are no restrictions on what
         * you are allowed to do in the run method, except that you cannot
         * throw a checked exception.
         */
        virtual void run() = 0;

        JAKELIB_DECLARE_INTERFACE(Runnable);
      };

  }
}
#endif

