/* * * ProLinga-Run * * Copyright (C) 2002-2008 Xobas Software. * All rights reserved. * * This file is part of ProLinga-Run. * * ProLinga-Run 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 3 of the License, or * (at your option) any later version. * * ProLinga-Run 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. * * You should have received a copy of the GNU General Public License * along with ProLinga-Run. If not, see . * * More information is available at the following addresses: * * Website : http://www.prolinga.org * * Email : prolinga-list@prolinga.org * * */ #ifndef __THREAD_HPP #define __THREAD_HPP class Thread { public: Thread(); ~Thread(); pthread_t getThreadId(Thread *threadPtr, const char *name); void putThreadId(Thread **threadPtr, const char *name, const pthread_t tid); char *getLogicName(Thread *threadPtr, const char *name); void putLogicName(Thread **threadPtr, const char *name, const char *logic); bool getExitFlag(Thread *threadPtr, const char *name); bool getExitFlagByTid(Thread *threadPtr, const pthread_t tid); void putExitFlag(Thread **threadPtr, const char *name, bool flag); GtkWidget *getOutputScreen(Thread *threadPtr, const char *name); GtkWidget *getOutputScreenByTid(Thread *threadPtr, const pthread_t tid); void putOutputScreen(Thread **threadPtr, const char *name, GtkWidget *screen); char *getThreadNameByTid(Thread *threadPtr, const pthread_t tid); void deleteOne(Thread **threadPtr, const char *name); void deleteList(Thread **threadPtr); void printList(Thread *threadPtr) const; private: char threadName[32]; char logicName[32]; bool exitFlag; pthread_t threadId; GtkWidget *outputScreen; Thread *nextPtr; }; typedef Thread *ThreadPtr; #endif /* __THREAD_HPP */