00001 00002 /*************************************************************************** 00003 * blackboard.h - BlackBoard aspect for Fawkes 00004 * 00005 * Created: Thu Jan 11 16:28:58 2007 00006 * Copyright 2006-2007 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 #include <aspect/blackboard.h> 00025 00026 namespace fawkes { 00027 00028 /** @class BlackBoardAspect <aspect/blackboard.h> 00029 * Thread aspect to access to BlackBoard. 00030 * Give this aspect to your thread to gain access to the BlackBoard. 00031 * It is guaranteed that if used properly from within plugins that the 00032 * blackboard member has been initialized properly. 00033 * @ingroup Aspects 00034 * @author Tim Niemueller 00035 */ 00036 00037 00038 /** @var BlackBoard * BlackBoardAspect::blackboard 00039 * This is the BlackBoard instance you can use to interact with the 00040 * BlackBoard. It is set when the thread starts. 00041 */ 00042 00043 /** Virtual empty destructor. */ 00044 BlackBoardAspect::~BlackBoardAspect() 00045 { 00046 } 00047 00048 00049 /** Init BlackBoard aspect. 00050 * This set the BlackBoard interface manager that can be used to access the 00051 * BB. 00052 * It is guaranteed that this is called for a BlackBoardThread before start 00053 * is called (when running regularly inside Fawkes). 00054 * @param bb BlackBoard to use 00055 */ 00056 void 00057 BlackBoardAspect::init_BlackBoardAspect(BlackBoard *bb) 00058 { 00059 blackboard = bb; 00060 } 00061 00062 } // end namespace fawkes