Fawkes API
Fawkes Development Version
|
00001 00002 /*************************************************************************** 00003 * blackboard.h - BlackBoard plugin 00004 * 00005 * Generated: Sat Sep 16 17:09:15 2006 (on train to Cologne) 00006 * Copyright 2006 Tim Niemueller [www.niemueller.de] 00007 * 00008 ****************************************************************************/ 00009 00010 /* This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. A runtime exception applies to 00014 * this software (see LICENSE.GPL_WRE file mentioned below for details). 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Library General Public License for more details. 00020 * 00021 * Read the full text in the LICENSE.GPL_WRE file in the doc directory. 00022 */ 00023 00024 #ifndef __BLACKBOARD_LOCAL_H_ 00025 #define __BLACKBOARD_LOCAL_H_ 00026 00027 #include <blackboard/blackboard.h> 00028 #include <core/exceptions/software.h> 00029 00030 #include <list> 00031 00032 namespace fawkes { 00033 00034 class BlackBoardInterfaceManager; 00035 class BlackBoardMemoryManager; 00036 class BlackBoardMessageManager; 00037 class BlackBoardNetworkHandler; 00038 class BlackBoardNotifier; 00039 class Interface; 00040 class InterfaceInfoList; 00041 class BlackBoardInterfaceListener; 00042 class BlackBoardInterfaceObserver; 00043 class FawkesNetworkHub; 00044 00045 class LocalBlackBoard : public BlackBoard 00046 { 00047 public: 00048 LocalBlackBoard(size_t memsize); 00049 LocalBlackBoard(size_t memsize, const char *magic_token, 00050 bool master = true); 00051 virtual ~LocalBlackBoard(); 00052 00053 virtual Interface * open_for_reading(const char *interface_type, 00054 const char *identifier); 00055 virtual Interface * open_for_writing(const char *interface_type, 00056 const char *identifier); 00057 virtual void close(Interface *interface); 00058 00059 virtual InterfaceInfoList * list_all(); 00060 virtual InterfaceInfoList * list(const char *type_pattern, 00061 const char *id_pattern); 00062 virtual bool is_alive() const throw(); 00063 virtual bool try_aliveness_restore() throw(); 00064 00065 virtual std::list<Interface *> 00066 open_multiple_for_reading(const char *type_pattern, 00067 const char *id_pattern = "*"); 00068 00069 virtual void start_nethandler(FawkesNetworkHub *hub); 00070 00071 static void cleanup(const char *magic_token, bool use_lister = false); 00072 00073 /* for debugging only */ 00074 const BlackBoardMemoryManager * memory_manager() const; 00075 00076 private: /* members */ 00077 BlackBoardInterfaceManager *__im; 00078 BlackBoardMemoryManager *__memmgr; 00079 BlackBoardMessageManager *__msgmgr; 00080 BlackBoardNetworkHandler *__nethandler; 00081 }; 00082 00083 00084 } // end namespace fawkes 00085 00086 #endif