- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Interfaces/Task.h

    00001
    00002 //
    00003 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00009 // Organization:        Model-based Embedded and Robotic Systems Group
    00010 //                                      Massachusetts Institute of Technology
    00011 //
    00013
    00014 #ifndef MERS_INTERFACES_TASK_HEADERFILE
    00015 #define MERS_INTERFACES_TASK_HEADERFILE
    00016
    00017 #ifdef _MSC_VER
    00018 #pragma warning(disable:4786)
    00019 #endif
    00020
    00021 #include <Mers/Utils/Lang/String.h>
    00022 #include <Mers/Utils/Lang/ReferencedObject.h>
    00023
    00024 // time class
    00025 #include <Mers/Utils/Lang/Time.h>
    00026
    00027 // c++ headers
    00028 #include <vector>
    00029
    00030 namespace Mers {
    00031   namespace Interfaces {
    00032
    00054     class Task
    00055     {
    00056     public:
    00058
    00064       Task( const Mers::Utils::Lang::String &taskName );
    00065
    00073       Task( const Mers::Utils::Lang::String &taskName,
    00074             std::vector< const Mers::Utils::Lang::String * > const &parameters );
    00075
    00082       explicit Task( Task const &other );
    00083
    00093       Task& operator=( Task const &other );
    00094
    00098       virtual ~Task();
    00099
    00101
    00106       const Mers::Utils::Lang::String &getName() const;
    00107
    00113       std::vector< const Mers::Utils::Lang::String * > const &
    00114                         getParameters() const;
    00115
    00116
    00117       void setControllable( bool value );
    00118
    00119       bool isControllable();
    00120
    00122
    00129       virtual Mers::Utils::Lang::String toString() const;
    00130
    00132
    00140       bool operator == ( Task const & task );
    00141
    00143
    00144                         // Start the task
    00145                         virtual bool Start( void ) = 0;
    00146
    00147                         // Stop the task
    00148                         virtual bool Stop( void ) = 0;
    00149
    00150                         // Test if the task is done
    00151                         virtual bool Completed( void ) = 0;
    00152
    00153                         // Test if the task has failed
    00154                         virtual bool Failed( void ) = 0;
    00155
    00157
    00158
    00159     protected:
    00161
    00163       Mers::Utils::Lang::String mName;
    00164
    00166       std::vector< const Mers::Utils::Lang::String * > mParameters;
    00167
    00168       // Is the task controllable?
    00169       bool mControllable;
    00170
    00171     private:
    00173
    00177       Task();
    00178     };
    00179
    00180   } // Interfaces
    00181 } // Mers
    00182
    00183 #endif  // MERS_INTERFACES_TASK_HEADERFILE