MicoleAgentThread.h

Go to the documentation of this file.
00001 /*
00002  * This file is part of Micole Architecture
00003  *
00004  * Copyright (C) 2007 Micole partners
00005  *
00006  * Micole Architecture is free software: you can redistribute it 
00007  * and/or modify it under the terms of the GNU Lesser General 
00008  * Public License as published by the Free Software Foundation, 
00009  * either version 3 of the License, or (at your option) any 
00010  * later version.
00011  *
00012  * Micole Architecture is distributed in the hope that it will be 
00013  * useful, * but WITHOUT ANY WARRANTY; without even the implied 
00014  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00015  * PURPOSE.  See the GNU Lesser General Public License for more 
00016  * details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with Micole Architecture.  If not, see
00020  * <http://www.gnu.org/licenses/>.
00021  */
00022 
00023 #ifndef MICOLEAGENTTHREAD_H
00024 #define MICOLEAGENTTHREAD_H
00025 #include "micolelib.h"
00026 
00027 #include "MicoleAgent.h"
00028 #include "Lo2kThread.h"
00029 
00042 class MICOLELIB_API MicoleAgentThread: public MicoleAgent, public lo2k::Thread
00043 {
00044         public:
00045                 ~MicoleAgentThread();
00046 
00047                 AgentState getState();
00048 
00053                 virtual void run()=0;
00054 
00055                 virtual void start();
00056 
00057                 //void suspendAgent();
00058                 //void activateAgent();
00059                 //void handleQuitMessage(MicoleBus *app, int argc, const char **argv );
00060                 //void handleSuspendMessage(MicoleBus *app, int argc, const char **argv );
00061                 //void handleResumeMessage(MicoleBus *app, int argc, const char **argv );
00062 
00063         protected:
00064                 //virtual void prepareToStop(int argc, const char **argv)=0;
00065                 //virtual void prepareToSuspend(int argc, const char **argv)=0;
00066                 void suspendAgent();
00067                 void resumeAgent();
00068                 virtual void stopAgent();
00069 
00076                 MicoleAgentThread(const string &name, const string &type, const char * domain = "127.255.255.255:2010");
00077 };
00078  //end core
00080 #endif

Generated on Tue Oct 16 17:10:42 2007 for Micole by  doxygen 1.4.7