# BBTK version number
SET(BBTK_VERSION_DATE "19/03/2010")
SET(BBTK_MAJOR_VERSION 0)
-SET(BBTK_MINOR_VERSION 9)
-SET(BBTK_BUILD_VERSION 7)
+SET(BBTK_MINOR_VERSION 10)
+SET(BBTK_BUILD_VERSION 1)
SET(BBTK_VERSION
"${BBTK_MAJOR_VERSION}.${BBTK_MINOR_VERSION}.${BBTK_BUILD_VERSION}")
# Now in bbtkConfigure.h file (cf. core/src)
Program: bbtk
Module: $RCSfile: bbtkBlackBoxDescriptor.cxx,v $
Language: C++
- Date: $Date: 2009/12/08 14:10:36 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.23 $
=========================================================================*/
/* ---------------------------------------------------------------------
mAuthor(""),
mCategory(""),
mKind(STANDARD),
+ mTypeOfScript(TS_BINARY),
mPackage()
{
bbtkDDebugMessage("object",4,
/// Default ctor
BlackBoxDescriptor::BlackBoxDescriptor(const BlackBoxDescriptor&)
{
+ mScriptFileName="";
}
//=========================================================================
/// Dtor
}
//=========================================================================
+
+ //==========================================================================
+ void BlackBoxDescriptor::SetTypeOfScript_Application()
+ {
+ SetTypeOfScript(TS_SCRIPT_APPLICATION);
+ }
+ //==========================================================================
+
+
+ //==========================================================================
+ bool BlackBoxDescriptor::IsTypeOfScript_Application()
+ {
+ return (GetTypeOfScript()==TS_SCRIPT_APPLICATION);
+ }
+ //==========================================================================
+
+
+ //==========================================================================
+ bool BlackBoxDescriptor::IsTypeOfScript_ComplexBox()
+ {
+ return (GetTypeOfScript()==TS_SCRIPT_COMPLEXBOX);
+ }
+ //==========================================================================
+
}
Program: bbtk
Module: $RCSfile: bbtkBlackBoxDescriptor.h,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:12 $
- Version: $Revision: 1.11 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.12 $
=========================================================================*/
/* ---------------------------------------------------------------------
}
Kind;
+ typedef enum
+ {
+ TS_BINARY=0,
+ TS_SCRIPT_COMPLEXBOX=1,
+ TS_SCRIPT_APPLICATION=2
+ } TypeOfScript;
+
/// Releases a descriptor
// static void Release(BlackBoxDescriptor::WeakPointer);
///
virtual void Check(bool recursive=true) const;
+
+
+ /// Sets the name of the script file from which it is defined
+ void SetScriptFileName(const std::string& n) { mScriptFileName = n; }
+ /// Gets the name of the script file from which it is defined
+ std::string GetScriptFileName() const { return mScriptFileName; }
+
+
+
+
+ /// Gets the type of script BINARY, SCRIPT_COMPLEXBOX, SCRIPT_APPLICATION
+ TypeOfScript GetTypeOfScript() { return mTypeOfScript; };
+ void SetTypeOfScript(TypeOfScript type) { mTypeOfScript=type; };
+ bool IsTypeOfScript_Application();
+ bool IsTypeOfScript_ComplexBox();
+ void SetTypeOfScript_Application();
+
+
+
+
+ private:
+
+ TypeOfScript mTypeOfScript;
+
+ /// The name of the script file from which it was created
+ std::string mScriptFileName;
+
+
+
protected:
/// Adds an input descriptor
void AddInputDescriptor( BlackBoxInputDescriptor *d )
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $
Language: C++
- Date: $Date: 2009/12/08 14:10:36 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.22 $
=========================================================================*/
/* ---------------------------------------------------------------------
ComplexBlackBoxDescriptor::ComplexBlackBoxDescriptor(const std::string& name)
{
bbtkDDebugMessage("object",2,"==> ComplexBlackBoxDescriptor(\""<<name<<"\")"<<std::endl);
+ SetTypeOfScript(TS_SCRIPT_COMPLEXBOX);
SetTypeName(name);
AddToCategory("complex box");
mPrototype = ComplexBlackBox::New(name+std::string("Prototype"),
}
//==========================================================================
+
}
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxDescriptor.h,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:12 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.7 $
=========================================================================*/
/* ---------------------------------------------------------------------
const std::string& help);
- /// Sets the name of the script file from which it is defined
- void SetScriptFileName(const std::string& n) { mScriptFileName = n; }
- /// Gets the name of the script file from which it is defined
- std::string GetScriptFileName() const { return mScriptFileName; }
///
void AddToExecutionList( const std::string& box );
ComplexBlackBoxDescriptor(const std::string& name);
private:
+
/// The factory used
Factory::WeakPointer mFactory;
/// The complex box in which boxes and connections are stored
ComplexBlackBoxPointer mPrototype;
- /// The name of the script file from which it was created
- std::string mScriptFileName;
-
+
};
// class ComplexBlackBoxDescriptor
//==========================================================================
Program: bbtk
Module: $RCSfile: bbtkExecuter.cxx,v $
Language: C++
- Date: $Date: 2010/06/18 14:43:19 $
- Version: $Revision: 1.32 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.33 $
=========================================================================*/
/* ---------------------------------------------------------------------
}
//=======================================================================
+ void Executer::SetTypeOfScript_Application ()
+ {
+ mOpenDefinition.back().box->SetTypeOfScript_Application();
+ }
+
+
+
//=======================================================================
void Executer::Clear()
{
Program: bbtk
Module: $RCSfile: bbtkExecuter.h,v $
Language: C++
- Date: $Date: 2009/06/08 14:50:03 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.19 $
=========================================================================*/
/* ---------------------------------------------------------------------
/// (Used to set it after the Define command)
void SetCurrentFileName (const std::string &name );
+ //Set type of script
+ void SetTypeOfScript_Application();
+
+
+
/// End the definition of a ComplexBlackBox
void EndDefine ();
Program: bbtk
Module: $RCSfile: bbtkFactory.cxx,v $
Language: C++
- Date: $Date: 2012/10/16 06:31:04 $
- Version: $Revision: 1.53 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.54 $
=========================================================================*/
/* ---------------------------------------------------------------------
iUnload = mPackageMap.find(pkgname);
//EED Debuging message
- std::cout << "EED Factory::LoadPackage " << std::endl;
+// std::cout << "EED Factory::LoadPackage " << std::endl;
// PackageMapType::iterator it;
// for ( it=mPackageMap.begin() ; it != mPackageMap.end(); it++ )
// std::cout << (*it).first << " ";
bbtkDebugMessageInc("kernel",9,"Factory::InsertPackage(\""<<
p->GetName()<<"\")"<<std::endl);
- p->AddFactory(GetThisPointer<Factory>());
-
-printf("EED Factory::InsertPackage %s\n", p->GetName().c_str() );
-
+ p->AddFactory(GetThisPointer<Factory>());
mPackageMap[p->GetName()] = p;
-
bbtkDebugDecTab("kernel",9);
}
//===================================================================
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $
Language: C++
- Date: $Date: 2012/10/16 06:31:04 $
- Version: $Revision: 1.93 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.94 $
=========================================================================*/
/* ---------------------------------------------------------------------
}
//=======================================================================
+
+ void Interpreter::SetTypeOfScript_Application()
+ {
+ GetExecuter()->SetTypeOfScript_Application();
+ }
+
+
+
/*EED Borrame
//=======================================================================
void Interpreter::SwitchToStream( std::stringstream* stream )
Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $
Language: C++
- Date: $Date: 2010/09/18 22:31:40 $
- Version: $Revision: 1.44 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.45 $
=========================================================================*/
/* ---------------------------------------------------------------------
virtual void commandMessage();
virtual void commandMessage(const std::string &kind,const std::string &levelstr);
virtual void SetCurrentFileName(const std::string &fullPathScriptName);
+ virtual void SetTypeOfScript_Application();
+
/// Constructor
Interpreter(const std::string& cpp_file = "");
Interpreter(VirtualExec::Pointer);
//EED printf("EED D. SwitchToFile %s\n", fullPathScriptName.c_str() );
LoadScript(fullPathScriptName,name);
//EED Borrame if (source) GetExecuter()->SetCurrentFileName(fullPathScriptName);
- if (source) SetCurrentFileName(fullPathScriptName);
+ if (source)
+ {
+ // Over writing the fullpath of the bbp file.
+ SetCurrentFileName( fullPathScriptName );
+ SetTypeOfScript_Application();
+ }
}
return;
}
//=======================================================================
+
+ //=======================================================================
+ void InterpreterVirtual::SetTypeOfScript_Application( )
+ {
+ }
+ //=======================================================================
+
+
//=======================================================================
void InterpreterVirtual::SwitchToStream( std::stringstream* stream )
{
#endif
+
+
/*
// For 'break' commands observation
typedef boost::signals::trackable BreakObserverType;
virtual void commandMessage();
virtual void commandMessage(const std::string &kind,const std::string &levelstr);
virtual void SetCurrentFileName(const std::string &fullPathScriptName);
-
+ virtual void SetTypeOfScript_Application();
+
/// Constructor
InterpreterVirtual();
Program: bbtk
Module: $RCSfile: bbtkPackage.cxx,v $
Language: C++
- Date: $Date: 2010/09/12 14:52:25 $
- Version: $Revision: 1.35 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.36 $
=========================================================================*/
/* ---------------------------------------------------------------------
/// to test that a dyn lib is a valid bbtk package lib
/// NB : The BBTK version exported from the library
/// is tested against the current bbtk version
- DynamicLibraryHandler Package::OpenDynamicLibrary
- ( const std::string& libname,
- const std::string& package_name,
- DLGetPackageFunction& getpack,
- DLDeletePackageFunction& delpack)
+ DynamicLibraryHandler Package::OpenDynamicLibrary( const std::string& libname,const std::string& package_name,
+ DLGetPackageFunction& getpack, DLDeletePackageFunction& delpack)
{
bbtkDebugMessage("package",3,"==> Package::OpenDynamicLibrary("
<<libname<<")"<<std::endl);
if (!handler)
{
- bbtkMessage("package",2,
- "Could not open shared library [" <<libname<<"] : "
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. loading could not open shared library [" <<libname<<"] : "
<<dlerror() << std::endl);
return 0;
}
// Loads the Package bbtk version function
std::string getvername(package_name);
- getvername +=
- BBTK_STRINGIFY_SYMBOL(BBTK_GET_PACKAGE_BBTK_VERSION_FUNCTION_NAME);
- DLGetPackageBBTKVersionFunction getbbtkversion
- = (DLGetPackageBBTKVersionFunction)(dlsym(handler,getvername.c_str()));
+ getvername += BBTK_STRINGIFY_SYMBOL(BBTK_GET_PACKAGE_BBTK_VERSION_FUNCTION_NAME);
+ DLGetPackageBBTKVersionFunction getbbtkversion = (DLGetPackageBBTKVersionFunction)(dlsym(handler,getvername.c_str()));
if (!getbbtkversion)
{
bbtkDebugMessage("package",3,"***"<<std::endl);
- bbtkMessage("package",2,
- "Shared library ["<<libname
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. loading shared library ["<<libname
<<"] is not a valid bbtk package."
<<" Symbol ["<<getvername<<"] :"<<dlerror()<< std::endl);
dlclose(handler);
// version matches ?
if (getbbtkversion() != bbtk::GetVersion())
{
- bbtkMessage("package",2,
- "Shared library ["<<libname
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. loading: "<<package_name
+ <<" - Shared library ["<<libname
<<"] was build with bbtk version "
<<getbbtkversion()
<<" but the current program runs with version "
- <<bbtk::GetVersion()<<" : cannot load it"<<std::endl);
+ <<bbtk::GetVersion()<<" : cannot load it. You have to recompile your BBTK-Package."<<std::endl);
dlclose(handler);
return 0;
getpack = (DLGetPackageFunction)(dlsym(handler, getpackname.c_str()));
if (!getpack)
{
- bbtkMessage("package",2,
- "Shared library ["<<libname
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. loading shared library ["<<libname
<<"] is not a valid bbtk package."
<<" Symbol ["<<getpackname<<"] :"<<dlerror()<< std::endl);
dlclose(handler);
delpack = (DLDeletePackageFunction)(dlsym(handler, delpackname.c_str()));
if (!delpack)
{
- bbtkMessage("package",2,
- "Shared library ["<<libname
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. loading shared library ["<<libname
<<"] is not a valid bbtk package."
<<" Symbol ["<<delpackname<<"] :"<<dlerror()<< std::endl);
dlclose(handler);
handler = LoadLibrary(libname.c_str());
if (!handler)
{
- bbtkMessage("package",2,
- "Could not open shared library [" <<libname<<"]"
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. could not open shared library [" <<libname<<"]"
<< std::endl);
DWORD dwErrorCode = 0;
dwErrorCode = GetLastError();
// Loads the Package bbtk version function
std::string getvername(package_name);
- getvername +=
- BBTK_STRINGIFY_SYMBOL(BBTK_GET_PACKAGE_BBTK_VERSION_FUNCTION_NAME);
- DLGetPackageBBTKVersionFunction getbbtkversion
- = (DLGetPackageBBTKVersionFunction)(GetProcAddress(handler,
- getvername.c_str()));
+ getvername += BBTK_STRINGIFY_SYMBOL(BBTK_GET_PACKAGE_BBTK_VERSION_FUNCTION_NAME);
+ DLGetPackageBBTKVersionFunction getbbtkversion = (DLGetPackageBBTKVersionFunction)(GetProcAddress(handler, getvername.c_str()));
+
if (!getbbtkversion)
{
FreeLibrary(handler);
- bbtkMessage("package",2,
- "Shared library ["<<libname
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. loading shared library ["<<libname
<<"] is not a valid bbtk package."
<<" Symbol ["<<getbbtkversion<<"] not found"<< std::endl);
return 0;
// version matches ?
if (getbbtkversion() != bbtk::GetVersion())
{
- FreeLibrary(handler);
- bbtkMessage("package",2,
- "Shared library ["<<libname
- <<"] was build with bbtk version "
- <<getbbtkversion()
- <<" but the current program runs with version "
- <<bbtk::GetVersion()<<" : cannot load it"<<std::endl);
- return 0;
-
+ FreeLibrary(handler);
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. loading: "<<package_name
+ <<" - Shared library ["<<libname
+ <<"] was build with bbtk version "
+ <<getbbtkversion()
+ <<" but the current program runs with version "
+ <<bbtk::GetVersion()<<" : cannot load it. You have to recompile your BBTK-Package."<<std::endl);
+ return 0;
}
// Loads the Package get function
if (!getpack)
{
FreeLibrary(handler);
- bbtkMessage("package",2,
- "Shared library ["<<libname
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. loading shared library ["<<libname
<<"] is not a valid bbtk package."
<<" Symbol ["<<getpackname<<"] not found"<< std::endl);
return 0;
if (!delpack)
{
FreeLibrary(handler);
- bbtkMessage("package",2,
- "Shared library ["<<libname
+ bbtkMessage("package",0,
+ "BBTK ..ERROR.. loading shared library ["<<libname
<<"] is not a valid bbtk package."
<<" Symbol ["<<delpackname<<"] not found"<< std::endl);
return 0;
}
//==========================================================================
-//ups4 EED borrame
bool Package::ifBoxExist( std::string type)
{
bool ok=false;
Program: bbtk
Module: $RCSfile: bbtkPackage.h,v $
Language: C++
- Date: $Date: 2010/09/12 14:52:25 $
- Version: $Revision: 1.16 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.17 $
=========================================================================*/
/* ---------------------------------------------------------------------
return NAME ## GetPackagePointer(); \
} \
BBTK_PACKAGE_EXPORT const std::string& \
- BBTK_CDECL NAME ## GetPackageBBTKVersion () \
- { return bbtk::GetVersion(); } \
+ BBTK_CDECL NAME ## GetPackageBBTKVersion () \
+ { static const std::string v(BBTK_STRINGIFY_SYMBOL(BBTK_VERSION)); return v; } \
class NAME ## PackageAutodestructor \
{ \
public: \
Program: bbtk
Module: $RCSfile: bbtkTranscriptor.cxx,v $
Language: C++
- Date: $Date: 2009/06/08 14:50:04 $
- Version: $Revision: 1.17 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.18 $
=========================================================================*/
/* ---------------------------------------------------------------------
}
//==========================================================================
+
+ //==========================================================================
+ void Transcriptor::SetTypeOfScript_Application()
+ {
+ }
+ //==========================================================================
+
}//namespace
Program: bbtk
Module: $RCSfile: bbtkTranscriptor.h,v $
Language: C++
- Date: $Date: 2009/06/08 14:50:04 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.15 $
=========================================================================*/
/* ---------------------------------------------------------------------
/// (Used to set it after the Define command)
void SetCurrentFileName (const std::string &name );
+ void SetTypeOfScript_Application();
+
/// End the definition of a ComplexBlackBox
void EndDefine ();
Program: bbtk
Module: $RCSfile: bbtkVirtualExec.h,v $
Language: C++
- Date: $Date: 2009/06/08 14:50:04 $
- Version: $Revision: 1.19 $
+ Date: $Date: 2012/11/14 07:12:00 $
+ Version: $Revision: 1.20 $
=========================================================================*/
/* ---------------------------------------------------------------------
/// Sets the file name to use for the current definition
/// (Used to set it after the Define command)
virtual void SetCurrentFileName (const std::string &name ) = 0;
-
+
+ virtual void SetTypeOfScript_Application( ) = 0;
+
/// End the definition of a ComplexBlackBox
virtual void EndDefine () = 0;
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-
- printf("EED RescaleSlopeIntercept::Process start\n");
-
-
double range[2];
double spc[3];
int ext[6];
} else {
bbSetOutputOut( NULL );
- } // if bbGetInputIn
-
- printf("EED RescaleSlopeIntercept::Process end\n");
-
+ } // if bbGetInputIn
}
+
//=====
// Don't edit this file. This file is generated from xml description..
//=====