Program: bbtk
Module: $RCSfile: bbtkFactory.cxx,v $
Language: C++
- Date: $Date: 2012/05/30 17:17:00 $
- Version: $Revision: 1.52 $
+ Date: $Date: 2012/10/16 06:31:04 $
+ Version: $Revision: 1.53 $
=========================================================================*/
/* ---------------------------------------------------------------------
bbtkMessage("output",2,p->GetDescription()<<std::endl);
//===================================================================
p->AddFactory(GetThisPointer<Factory>());
-printf("EED Factory::DoLoadPackage > %s %s %s \n",libname.c_str(), pkgname.c_str(),path.c_str());
mPackageMap[pkgname] = p;
return true;
}
std::string upath;
-
pkgname = Utilities::ExtractPackageName(name,upath);
-
- printf("EED Factory::LoadPackage A. %s\n", name.c_str());
- printf("EED Factory::LoadPackage A. %s\n", upath.c_str());
- printf("EED Factory::LoadPackage A. %s\n", pkgname.c_str());
-
+
bbtkMessage("debug",1,"Package name ["<<pkgname<<"]"<<std::endl);
bbtkMessage("debug",1,"Package path ["<<upath<<"]"<<std::endl);
// no loading package if already loaded
PackageMapType::iterator iUnload;
iUnload = mPackageMap.find(pkgname);
-
- PackageMapType::iterator it;
-std::cout << "EED Factory::LoadPackage PackageMap ";
- for ( it=mPackageMap.begin() ; it != mPackageMap.end(); it++ )
- std::cout << (*it).first << " ";
- std::cout << std::endl;
+//EED Debuging message
+ std::cout << "EED Factory::LoadPackage " << std::endl;
+// PackageMapType::iterator it;
+// for ( it=mPackageMap.begin() ; it != mPackageMap.end(); it++ )
+// std::cout << (*it).first << " ";
+// std::cout << std::endl;
+
+
if (iUnload != mPackageMap.end())
{
bbtkMessage("output",2,"["<< pkgname <<"] already loaded" << std::endl);
// *all* the cases. JP
//==================================================
- printf("\nEED Factory::LoadPackage B. %s\n\n", name.c_str());
- //std::cout << "upath [" << name << "]" << std::endl;
-
bool ok = false;
bool foundFile = false;
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $
Language: C++
- Date: $Date: 2012/05/30 17:17:00 $
- Version: $Revision: 1.92 $
+ Date: $Date: 2012/10/16 06:31:04 $
+ Version: $Revision: 1.93 $
=========================================================================*/
/* ---------------------------------------------------------------------
void Interpreter::commandLoad(const std::string &packageName) //virtual
{
- printf("EED Interpreter::commandLoad %s\n", packageName.c_str());
GetExecuter()->LoadPackage(packageName);
}
std::string fullPathScriptName; // full path script name
std::string pkgname; // e.g. <scriptname>.bbs
std::vector<std::string> Filenames;
-
+ std::string tmpFilenames;
+
// The following is *NOT* a debug time message :
// It's a user intended message.
// Please don't remove it.
//int nbFiles =
Utilities::Explore(*i, false, Filenames);
+ int iFilesnames,jFilesnames,sizeFilenames;
+ sizeFilenames=Filenames.size();
+
+
+ // EEDd 30 sept 2012
+ //Sorting list of files
+ for (iFilesnames=0;iFilesnames<sizeFilenames; iFilesnames++)
+ {
+ for (jFilesnames=iFilesnames;jFilesnames<sizeFilenames; jFilesnames++)
+ {
+ if ( Filenames[iFilesnames] > Filenames[jFilesnames] )
+ {
+ tmpFilenames = Filenames[iFilesnames];
+ Filenames[iFilesnames] = Filenames[jFilesnames];
+ Filenames[jFilesnames] = tmpFilenames;
+ } // if Filesnames
+ } // for iFilesnames
+ } // for iFilesnames
+
+
+
for (std::vector<std::string>::iterator j = Filenames.begin();
j!= Filenames.end(); ++j)
{