//==========================================================================
void RegenerateDoc ( bbtk::Package::Pointer p, std::string& doc_path )
{
+
std::string pack_name(p->GetName());
std::string pack_path = doc_path + pack_name;
// Creating directory
p->SetDocURL(pack_index);
p->SetDocRelativeURL("index.html");
- p->CreateHtmlPage(pack_index,"bbtk",pack_name,"","",0,0,false); //true);
+
+
+ p->CreateHtmlPage(pack_index,"bbtk",pack_name,"","",0,0,true); //true);
+
+
}
//==========================================================================
int main(int argc, char **argv)
{
+
std::string pack("-a");
if (argc==2)
{
try
{
- std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path();
+ std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path();
doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
doc_path += "bbdoc";
doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
-
+
bbtk::Interpreter::Pointer I = bbtk::Interpreter::New();
I->SetCommandLine(true);
I->SetThrow(false);
- I->InterpretLine( "exec freeze_no_error");
+ I->InterpretLine( "exec freeze_no_error");
if (pack != "-a")
{
- I->InterpretLine( "include "+pack);
- I->InterpretLine( "include "+pack+"-appli");
- RegenerateDoc(I->GetExecuter()->GetFactory()->GetPackage(pack),doc_path);
+ I->InterpretLine( "include "+pack);
+ I->InterpretLine( "include "+pack+"-appli");
+ bbtk::Package::Pointer p = I->GetExecuter()->GetFactory()->GetPackage(pack);
+
+ RegenerateDoc(I->GetExecuter()->GetFactory()->GetPackage(pack),doc_path);
}
else
{
- I->InterpretLine( "include *");
- bbtk::Factory::PackageMapType::const_iterator i;
+I->InterpretLine( "include *");
+ bbtk::Factory::PackageMapType::const_iterator i;
for (i = I->GetExecuter()->GetFactory()->GetPackageMap().begin();
i != I->GetExecuter()->GetFactory()->GetPackageMap().end();
++i)
std::cout << "* ERROR : "<<e.GetErrorMessage()<<std::endl;
return 1;
}
- return 0;
+ return 0;
}
//==========================================================================
ENDIF (BBTK_COMPILE_ERROR_MESSAGES)
#-----------------------------------------------------------------------------
-IF(APPLE)
- CREA_DEFINE(MACOSX)
-ELSE(APPLE)
- IF("${CMAKE_SYSTEM}" MATCHES "Linux")
- CREA_DEFINE(LINUX)
- ELSE("${CMAKE_SYSTEM}" MATCHES "Linux")
- IF(WIN32)
- CREA_DEFINE(WIN32)
- ELSE(WIN32)
- MESSAGE(FATAL_ERROR "${CMAKE_SYSTEM} unsupported ! Build at your own risks ! (remove this line from kernel/cmake/BBTKAddDefinitions.cmake)")
- ENDIF(WIN32)
- ENDIF("${CMAKE_SYSTEM}" MATCHES "Linux")
-ENDIF(APPLE)
-#-----------------------------------------------------------------------------
-
MESSAGE(STATUS "=======================================")
MESSAGE(STATUS "")
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/12/12 12:11:21 $
- Version: $Revision: 1.24 $
+ Date: $Date: 2009/03/30 15:22:51 $
+ Version: $Revision: 1.25 $
=========================================================================*/
/* ---------------------------------------------------------------------
const std::string& output_dir,
bool relative_link )
{
-
std::string directory(output_dir);
if (output_dir.length() == 0)
std::string filename_dot2 ("\"" + filename_dot + "\"");
- std::string command1 ("dot -T png -o "
- + filename_png2 + " " + filename_dot2);
+ std::string command1 ("dot -Tpng:quartz -o "
+ + filename_png2 + " " + filename_dot2 );
std::string command1a("dot -T cmap -o "
- + filename_cmap2 + " " + filename_dot2);
+ + filename_cmap2 + " " + filename_dot2 );
// 1. Generating .dot file
FILE *ff;
FILE *ff2;
char c;
ff2=fopen(filename_cmap.c_str(),"r");
- while (!feof(ff2))
- {
- c=fgetc(ff2);
- if (c!=-1)
- {
- (s) << c;
- }
- }
+ if (ff2!=NULL){
+ while (!feof(ff2))
+ {
+ c=fgetc(ff2);
+ if (c!=-1)
+ {
+ (s) << c;
+ } // if
+ } // while
+ } // if ff2
(s) << "</map>\n\n";
// End
Program: bbtk
Module: $RCSfile: bbtkComplexBlackBoxDescriptor.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:12 $
- Version: $Revision: 1.18 $
+ Date: $Date: 2009/03/30 15:22:51 $
+ Version: $Revision: 1.19 $
=========================================================================*/
/* ---------------------------------------------------------------------
url = p->GetDocRelativeURL();
else
url = p->GetDocURL();
-
+
s << "<a href=\"" <<url<<"#"<<name<<"\">"
<< p->GetName()<<"::"<<name<<"</a>\n";
- }
+ } // for
(s) << "</TD></TR>\n";
- }
+ } // If B.size
(s) << "</TABLE>\n";
Program: bbtk
Module: $RCSfile: bbtkExecuter.cxx,v $
Language: C++
- Date: $Date: 2009/03/30 14:42:16 $
- Version: $Revision: 1.28 $
+ Date: $Date: 2009/03/30 15:22:51 $
+ Version: $Revision: 1.29 $
=========================================================================*/
/* ---------------------------------------------------------------------
{
int detail = atoi(detailStr.c_str());
int level = atoi(levelStr.c_str());
-
- std::string filename_rootHtml (output_html) ;
- std::string simplefilename_rootHtml ( Utilities::get_file_name(output_html));
-
- bool relative_link = true;
-
- // No output provided : automatic generation
- if (output_html.length() == 0)
- {
- // Don't pollute the file store with "temp_dir" directories ...
- std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
-
- char c = default_doc_dir.c_str()[strlen(default_doc_dir.c_str())-1];
-
- std::string directory = default_doc_dir;
- if (c != '/' && c !='\\') directory = directory + "/";
- directory = directory + "temp_dir";
-
- filename_rootHtml = directory + "/" + "User.html";
- simplefilename_rootHtml = "User.html" ;
-
- // Creating directory
- std::string command0("mkdir \"" +directory + "\"");
- system( command0.c_str() );
-
- relative_link = false;
- }
+ bool relative_link = true;
Package::Pointer p;
try
{
p = GetUserPackage();
}
+
+ std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path();
+ doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+ doc_path += "bbdoc";
+ doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+
+ std::string pack_name(p->GetName());
+ std::string pack_path = doc_path + pack_name;
+ // Creating directory
+ if ( ! bbtk::Utilities::FileExists(pack_path) )
+ {
+ std::string command("mkdir \"" +pack_path+ "\"");
+ system( command.c_str() );
+ }
+ std::string pack_index(pack_path);
+ pack_index += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+ pack_index += "index.html";
+
+
// Generating documentation-help of workspace
- p->SetDocURL(filename_rootHtml);
- p->SetDocRelativeURL(simplefilename_rootHtml);
-
- p->CreateHtmlPage(filename_rootHtml,"bbtk","user package",custom_header,custom_title,detail,level,relative_link);
-
- std::string page = filename_rootHtml;
+ p->SetDocURL(pack_index);
+ p->SetDocRelativeURL("index.html");
+ p->CreateHtmlPage(pack_index,"bbtk","user package",custom_header,custom_title,detail,level,relative_link);
+
/*
try
{
page = ShowGraphInstances(nameblackbox,detail,level,system_display);
}
*/
- return page;
+ return pack_index;
}
//=======================================================================
} else {
s << "<center>" << blackbox->bbGetName()<< "</center>";
}
-
blackbox->bbInsertHTMLGraph( s, detail, level, true, directory, false );
s << "</body></html>\n";
}
Program: bbtk
Module: $RCSfile: bbtkFactory.cxx,v $
Language: C++
- Date: $Date: 2009/02/27 11:20:25 $
- Version: $Revision: 1.41 $
+ Date: $Date: 2009/03/30 15:22:51 $
+ Version: $Revision: 1.42 $
=========================================================================*/
/* ---------------------------------------------------------------------
#include "bbtkConnection.h"
#include "bbtkConfigurationFile.h"
#include "bbtkUtilities.h"
+#include "bbtkConfigurationFile.h"
#include <sys/stat.h> // for struct stat stFileInfo
s << " - \n";
s << "<a name=\"doxygen\"></a>\n";
- s << "<a href=..\\doxygen\\" << ii->first << "/main.html>(Doxygen documentation of the source)</a>\n";
+//EED 26Mars2009
+ std::string bin_path = bbtk::ConfigurationFile::GetInstance().Get_bin_path();
+ s << "<a href=" << bin_path <<"/../share/bbtk/doc/doxygen/" << ii->first << "/main.html>(Doxygen documentation of the source)</a>\n";
}
else
{
Program: bbtk
Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
Language: C++
- Date: $Date: 2009/03/24 13:42:59 $
- Version: $Revision: 1.35 $
+ Date: $Date: 2009/03/30 15:22:51 $
+ Version: $Revision: 1.36 $
=========================================================================*/
/* ---------------------------------------------------------------------
//================================================================
void WxGUIScriptingInterface::OnMenuShowImageGraph(wxCommandEvent& WXUNUSED(event))
{
- std::string default_temp_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
+ std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path();
+ doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+ doc_path += "bbdoc";
+ doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
+
+ std::string pack_name("User");
+ std::string pack_path = doc_path + pack_name;
+
+
#if defined(WIN32)
std::string strappli="start ";
#else
- std::string strappli="gnome-open ";
+ #if defined(MACOSX)
+ std::string strappli="open ";
+ #else
+ std::string strappli="gnome-open ";
+ #endif
#endif
- std::string strcommand = strappli +default_temp_dir+"/temp_dir/workspace_workspacePrototype.png";
+
+ std::string strcommand = strappli +pack_path+"/workspace_workspacePrototype.png";
// std::cout << "system: " << strcommand << std::endl;
system ( strcommand.c_str() );