Program: bbtk
Module: $RCSfile: bbtkFactory.cxx,v $
Language: C++
- Date: $Date: 2009/05/28 14:22:10 $
- Version: $Revision: 1.44 $
+ Date: $Date: 2009/06/08 14:50:03 $
+ Version: $Revision: 1.45 $
=========================================================================*/
/* ---------------------------------------------------------------------
//===================================================================
- /// Displays the list of packages loaded
- void Factory::PrintPackages(bool details, bool adaptors) const
+ void Factory::PrintHelpListPackages(bool details, bool adaptors) const
{
bbtkDebugMessageInc("kernel",9,"Factory::PrintPackages"<<std::endl);
{
bbtkMessage("help",1, i->first << std::endl);
if (details) {
- i->second->PrintBlackBoxes(false,adaptors);
+ i->second->PrintHelpListDescriptors(false,adaptors);
}
}
//===================================================================
/// Displays help on a package
- void Factory::HelpPackage(const std::string& name, bool adaptors) const
+ void Factory::PrintHelpPackage(const std::string& name, bool adaptors) const
{
- bbtkDebugMessageInc("kernel",9,"Factory::HelpPackage(\""<<name<<"\")"
+ bbtkDebugMessageInc("kernel",9,"Factory::PrintHelpPackage(\""
+ <<name<<"\")"
<<std::endl);
PackageMapType::const_iterator i = mPackageMap.find(name);
bbtkMessageCont("help",1,std::endl);
bbtkIncTab("help",1);
bbtkMessage("help",1,i->second->GetDescription()<<std::endl);
- if (i->second->GetNumberOfBlackBoxes()>0)
+ if (i->second->GetNumberOfDescriptors()>0)
{
bbtkMessage("help",1, "Black boxes : "<<std::endl);
- i->second->PrintBlackBoxes(true,adaptors);
+ i->second->PrintHelpListDescriptors(true,adaptors);
}
else
{
//===================================================================
/// Prints help on the black box of type <name>
/// Returns the package to which it belongs
- void Factory::HelpBlackBox(const std::string& name,
+ void Factory::PrintHelpDescriptor(const std::string& name,
std::string& package,
bool full) const
{
- bbtkDebugMessageInc("kernel",9,"Factory::HelpBlackBox(\""<<name<<"\")"
+ bbtkDebugMessageInc("kernel",9,"Factory::PrintHelpDescriptor(\""
+ <<name<<"\")"
<<std::endl);
bool found = false;
PackageMapType::const_iterator i;
for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
{
- if (i->second->ContainsBlackBox(name))
+ if (i->second->ContainsDescriptor(name))
{
- i->second->HelpBlackBox(name,full);
+ i->second->PrintHelpDescriptor(name,full);
package = i->second->GetName();
found = true;
}
//===================================================================
- void Factory::CheckPackages() const
+ void Factory::Check() const
{
bbtkMessage("debug",1,"****** Checking Factory "<<(void*)this
<<std::endl);
PackageMapType::const_iterator i;
for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
{
- i->second->CheckBoxes();
+ i->second->Check();
}
bbtkMessage("debug",1,"****** Checking Factory "<<(void*)this
<<" ... OK"<<std::endl);
PackageMapType::const_iterator i;
for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
{
- if (i->second->ContainsBlackBox(name))
- {
+ if (i->second->ContainsDescriptor(name))
+ {
std::string separator = ConfigurationFile::GetInstance().Get_file_separator ();
-
- // Don't pollute the file store with "temp_dir" directories ...
+
+ // Don't pollute the file store with "temp_dir" directories ...
std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
std::string directory = "\"" + default_doc_dir + separator + "temp_dir" +separator + "\"";
std::string filename2 = default_doc_dir + separator + "temp_dir" + separator + "tmp.html";
-
+
#if defined(_WIN32)
- std::string command("start \"Titre\" /D ");
+ std::string command("start \"Titre\" /D ");
#else
- std::string command("gnome-open ");
+ std::string command("gnome-open ");
#endif
- command=command + directory +" tmp.html";
- FILE *ff;
- ff=fopen(filename2.c_str(),"w");
-
- fprintf(ff,"<html><head><title>TMP</title> <script type=\"text/javascript\"> <!--\n");
- fprintf(ff," window.location=\"%s#%s\";\n" , i->second->GetDocURL().c_str(),name.c_str() );
- fprintf(ff,"//--></script></head><body></body></html>\n");
-
-
- //fprintf(ff, "<a href=\"%s#%s\">Link</a>\n", i->second->GetDocURL().c_str(),name.c_str() );
- fclose(ff);
- system( command.c_str() );
- found = true;
- }
+ command=command + directory +" tmp.html";
+ FILE *ff;
+ ff=fopen(filename2.c_str(),"w");
+
+ fprintf(ff,"<html><head><title>TMP</title> <script type=\"text/javascript\"> <!--\n");
+ fprintf(ff," window.location=\"%s#%s\";\n" , i->second->GetDocURL().c_str(),name.c_str() );
+ fprintf(ff,"//--></script></head><body></body></html>\n");
+
+
+ //fprintf(ff, "<a href=\"%s#%s\">Link</a>\n", i->second->GetDocURL().c_str(),name.c_str() );
+ fclose(ff);
+ system( command.c_str() );
+ found = true;
+ }
}
-
+
bbtkDebugDecTab("kernel",9);
if (!found)
{
- bbtkError("No package of the factory contains any black box <"
- <<name<<">");
+ bbtkError("No package of the factory contains any black box <"
+ <<name<<">");
}
}
{
Package::Pointer pack = i->second;
if (pack->GetName()=="user") continue;
- Package::BlackBoxMapType::const_iterator j;
- for (j = pack->GetBlackBoxMap().begin();
- j!= pack->GetBlackBoxMap().end();
+ Package::DescriptorMapType::const_iterator j;
+ for (j = pack->GetDescriptorMap().begin();
+ j!= pack->GetDescriptorMap().end();
++j)
{