#include "bbtkConfigurationFile.h"
namespace bbstd
{
- BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,Configuration)
- BBTK_USER_BLACK_BOX_IMPLEMENTATION(Configuration,bbtk::AtomicBlackBox);
-
- void Configuration::bbUserConstructor()
- {
-
- }
-
- void Configuration::DoProcess()
- {
- bbSetOutputDataPath( bbtk::ConfigurationFile::GetInstance().Get_data_path() );
- bbSetOutputDocPath( bbtk::ConfigurationFile::GetInstance().Get_doc_path() );
- bbSetOutputFileSeparator( bbtk::ConfigurationFile::GetInstance().Get_file_separator() );
-
+ BBTK_ADD_BLACK_BOX_TO_PACKAGE(std,Configuration)
+ BBTK_USER_BLACK_BOX_IMPLEMENTATION(Configuration,bbtk::AtomicBlackBox);
+
+ void Configuration::bbUserConstructor()
+ {
+
+ }
+
+ void Configuration::DoProcess()
+ {
+ bbSetOutputBinPath( bbtk::ConfigurationFile::GetInstance().Get_bin_path() );
+ bbSetOutputDataPath( bbtk::ConfigurationFile::GetInstance().Get_data_path() );
+ bbSetOutputDocPath( bbtk::ConfigurationFile::GetInstance().Get_doc_path() );
+ bbSetOutputFileSeparator( bbtk::ConfigurationFile::GetInstance().Get_file_separator() );
+
#if defined(__GNUC__)
- bbSetOutputSystemType( 0 );
+ bbSetOutputSystemType( 0 );
#elif defined(_WIN32)
- bbSetOutputSystemType( 1 );
+ bbSetOutputSystemType( 1 );
#else
- bbSetOutputSystemType( -1 );
+ bbSetOutputSystemType( -1 );
#endif
-
- }
+
+ }
}
// EO namespace bbstd
public bbtk::AtomicBlackBox
{
BBTK_USER_BLACK_BOX_INTERFACE(Configuration,bbtk::AtomicBlackBox);
- BBTK_DECLARE_OUTPUT(DataPath,std::string);
- BBTK_DECLARE_OUTPUT(DocPath,std::string);
- BBTK_DECLARE_OUTPUT(FileSeparator,std::string);
- BBTK_DECLARE_OUTPUT(SystemType,int);
+ BBTK_DECLARE_OUTPUT(BinPath,std::string);
+ BBTK_DECLARE_OUTPUT(DataPath,std::string);
+ BBTK_DECLARE_OUTPUT(DocPath,std::string);
+ BBTK_DECLARE_OUTPUT(FileSeparator,std::string);
+ BBTK_DECLARE_OUTPUT(SystemType,int);
BBTK_PROCESS(DoProcess);
void DoProcess();
BBTK_AUTHOR("jpr@creatis.insa-lyon.fr");
BBTK_CATEGORY("misc");
BBTK_DESCRIPTION("Gets configuration informations");
- BBTK_OUTPUT(Configuration,DataPath,"Data Path",std::string);
- BBTK_OUTPUT(Configuration,DocPath,"Documentation Path",std::string);
+ BBTK_OUTPUT(Configuration,BinPath,"Binaries path",std::string);
+ BBTK_OUTPUT(Configuration,DataPath,"Data path",std::string);
+ BBTK_OUTPUT(Configuration,DocPath,"Documentation path",std::string);
BBTK_OUTPUT(Configuration,FileSeparator,"/ or \\",std::string);
BBTK_OUTPUT(Configuration,SystemType,"0=Linux 1=Windows",int);
BBTK_END_DESCRIBE_BLACK_BOX(Configuration);
load wx
new OutputText windowTitle
- set windowTitle.In "- - - - - - - - - - - - - - Create Blackbox - - - - - - - - - - - - - -"
+ set windowTitle.In "Black box informations"
new DirectorySelector dir
- set dir.Title "Select the location of your new package"
+ set dir.Message "Select the location of your new black box"
new InputText nameBlackbox
set nameBlackbox.Title "Blackbox name (1 word)"
connect typeBlackbox.Widget layoutHor.Widget1
connect formatBlackbox.Widget layoutHor.Widget2
-new LayoutLine info
- connect windowTitle.Widget info.Widget1
- connect nameBlackbox.Widget info.Widget2
- connect namePackage.Widget info.Widget3
- connect author.Widget info.Widget4
- connect description.Widget info.Widget5
- connect layoutHor.Widget info.Widget6
- set info.WinDialog true
- set info.WinWidth 350
- set info.WinHeight 500
-exec info
-
+new CommandButton createButton
+ set createButton.In "exec command; quit"
+ set createButton.Label "Go"
+
+new LayoutLine main
+ connect windowTitle.Widget main.Widget1
+ connect nameBlackbox.Widget main.Widget2
+ connect namePackage.Widget main.Widget3
+ connect author.Widget main.Widget4
+ connect description.Widget main.Widget5
+ connect layoutHor.Widget main.Widget6
+ connect createButton.Widget main.Widget7
+ set main.WinTitle "Create new black box"
+ set main.WinDialog true
+ set main.WinWidth 350
+ set main.WinHeight 500
#---------------------------------------------------------------------
new Configuration conf
new ConcatStrings commandStr
- set commandStr.In1 "."
+ connect conf.BinPath commandStr.In1
connect conf.FileSeparator commandStr.In2
set commandStr.In3 "bbCreateBlackBox "
connect concatStr.Out command.In
print $concatStr.Out$
-exec command
+exec main
-#seg fault :
-#quit
\ No newline at end of file
load std
new OutputText windowTitle
- set windowTitle.In "- - - - - - - - - - - - - - Create Blackbox - - - - - - - - - - - - - -"
+ set windowTitle.In "Package informations"
new DirectorySelector dir
- set dir.Title "Select the location of your new package"
+ set dir.Message "Select the location of your new package"
new InputText name
set name.Title "Name (1 word)"
set description.Title "Description (caracters '<', '>' not accepted...)"
set description.In "_description_"
-new LayoutLine info
- connect windowTitle.Widget info.Widget1
- connect name.Widget info.Widget2
- connect author.Widget info.Widget3
- connect description.Widget info.Widget4
- set info.WinDialog true
- set info.WinWidth 400
- set info.WinHeight 250
-exec info
+new CommandButton createButton
+ set createButton.In "exec command; quit"
+ set createButton.Label "Go"
+
+new LayoutLine main
+ connect windowTitle.Widget main.Widget1
+ connect name.Widget main.Widget2
+ connect author.Widget main.Widget3
+ connect description.Widget main.Widget4
+ connect createButton.Widget main.Widget5
+ set main.WinTitle "Create new black box package"
+ set main.WinDialog true
+ set main.WinWidth 400
+ set main.WinHeight 250
new Configuration conf
new ConcatStrings concatStrCommand
- set concatStrCommand.In1 "."
+# set concatStrCommand.In1 "."
+ connect conf.BinPath concatStrCommand.In1
connect conf.FileSeparator concatStrCommand.In2
set concatStrCommand.In3 "bbCreatePackage "
new ConcatStrings concatStr
connect concatStr.Out command.In
print $concatStr.Out$
-exec command
+exec main
-#seg fault :
-#quit