Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $
Language: C++
- Date: $Date: 2008/02/08 07:39:49 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/03/07 10:21:30 $
+ Version: $Revision: 1.12 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//=======================================================================
/// Default ctor
ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(const std::string& name)
- : BlackBoxDescriptor()
+ : BlackBoxDescriptor(),
+ mFactory(0)
{
bbtkDebugMessageInc("Kernel",9,"ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(\""<<name<<"\")"<<std::endl);
SetTypeName(name);
<<type<<"\",\""<<name<<"\") ["
<<GetTypeName()<<"]"<<std::endl);
+ //
+ if (mFactory == 0)
+ {
+ bbtkError("ComplexBlackBoxDescriptor::Add : no factory set");
+ }
// Verify that a box with the same name does not exist already
if ( mPrototype->bbUnsafeGetBlackBox( name ) )
bbtkError("a black box \""<<name<<"\" already exists");
}
// ok : create new one
- mPrototype->bbAddBlackBox ( /*mFactory->Create*/ NewBlackBox(type,name) );
+ mPrototype->bbAddBlackBox ( mFactory->NewBlackBox(type,name) );
bbtkDebugDecTab("Kernel",5);
}
<<to<<"\",\""<<input
<<"\") ["
<<GetTypeName()<<"]"<<std::endl);
+ //
+ if (mFactory == 0)
+ {
+ bbtkError("ComplexBlackBoxDescriptor::Connect : no factory set");
+ }
+
+
// Verify that a box with the same name does not exist already
BlackBox* bbfrom = mPrototype->bbGetBlackBox( from );
if ( !bbfrom )
bbtkError("the black box \""<<to<<"\" does not exist");
}
- Connection* c = /*mFactory->*/ NewConnection( bbfrom, output, bbto, input );
+ Connection* c = mFactory->NewConnection( bbfrom, output, bbto, input );
mPrototype->bbAddConnection(c);
std::string inc = GetScriptFileName();
if (inc.size()>0)
{
- (s) << "<TR><TD style='vertical-align: top;'><b> To use it </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> include "
- << inc << "</TD></TR>\n";
+ s << "<TR><TD style='vertical-align: top;'><b> To use it </b></TD><TD style='vertical-align: top;'> : </TD><TD style='vertical-align: top;'> include ";
+ s << inc << " <a href=\"../../../bbs/"<<inc<<"\">[source]</a>";
+ s << "</TD></TR>\n";
}