/*========================================================================= Program: bbtk Module: $RCSfile: bbtkUserBlackBox.cxx,v $ Language: C++ Date: $Date: 2008/01/22 15:02:00 $ Version: $Revision: 1.1.1.1 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ /** * \file * \brief class bbtk::UserBlackBox : abstract user defined black boxes */ #include "bbtkUserBlackBox.h" namespace bbtk { //========================================================================= UserBlackBox::UserBlackBox(const std::string &name, bool alloc) : BlackBox(name) { bbtkDebugMessageInc("Core",7, "UserBlackBox::UserBlackBox(\"" < UserBlackBox::bbBackwardUpdate() [" < UserBlackBox::bbForwardUpdate() [" <GetOutputDescriptor(name))->GetGetFunctor()->Get(this); bbtkDebugDecTab("Data",7); return p; } //========================================================================= //========================================================================= /// Gets the input Data of a given name Data UserBlackBox::bbGetInput( const std::string &name ) { bbtkDebugMessageInc("Data",7, "UserBlackBox::bbGetInput(\""<GetInputDescriptor(name))->GetGetFunctor()->Get(this); bbtkDebugDecTab("Data",7); return p; } //========================================================================= //========================================================================= /// Sets the data of the output called void UserBlackBox::bbSetOutput( const std::string &name, Data data) { bbtkDebugMessageInc("Data",7, "UserBlackBox::bbSetOutput(\""<GetOutputDescriptor(name))->GetSetFunctor()->Set(this,data); bbtkDebugDecTab("Data",7); } //========================================================================= //========================================================================= /// Sets the data of the input called void UserBlackBox::bbSetInput( const std::string &name, Data data, bool setModified ) { bbtkDebugMessageInc("Data",7, "UserBlackBox::bbSetInput(\""<GetInputDescriptor(name))->GetSetFunctor()->Set(this,data); if (setModified) { bbSetModifiedStatus(); } bbtkDebugDecTab("Data",7); } //========================================================================= //========================================================================= /// Sets the data of the input called void UserBlackBox::bbBruteForceSetInputPointer( const std::string &name, void* data, bool setModified ) { bbtkDebugMessageInc("Data",7, "UserBlackBox::bbBruteForceSetInputPointer(\"" <GetInputDescriptor(name))->GetSetFunctor()->BruteForceSetPointer(this,data); if (setModified) { bbSetModifiedStatus(); } bbtkDebugDecTab("Data",7); } //========================================================================= } // EO namespace bbtk