From: eduardo.davila@creatis.insa-lyon.fr Date: Fri, 3 Nov 2023 13:01:40 +0000 (+0100) Subject: Clean Code X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0864b46768b25800120d16758b65abbf6f1412ff;p=bbtk.git Clean Code --- diff --git a/kernel/appli/bbs2cpp/bbs2.cxx b/kernel/appli/bbs2cpp/bbs2.cxx index 305efbf..180e8da 100644 --- a/kernel/appli/bbs2cpp/bbs2.cxx +++ b/kernel/appli/bbs2cpp/bbs2.cxx @@ -92,7 +92,7 @@ int main(int argc, char* argv[]) fprintf(ff,"class %s:\n",fileBase.c_str() ); fprintf(ff,"\n" ); fprintf(ff," def __init__(self):\n" ); - fprintf(ff," self.mCBpy = ComplexBlackBox('appliTest03')\n" ); + fprintf(ff," self.mCBpy = ComplexBlackBox('%s')\n",file.c_str() ); fprintf(ff,"\n" ); fprintf(ff," def Run(self):\n" ); int i,size=pythonBBTK.size(); diff --git a/packages/std/src/bbstdConcatStrings.h b/packages/std/src/bbstdConcatStrings.h index ad0ac83..df510f3 100644 --- a/packages/std/src/bbstdConcatStrings.h +++ b/packages/std/src/bbstdConcatStrings.h @@ -67,7 +67,7 @@ namespace bbstd BBTK_NAME("ConcatStrings"); BBTK_AUTHOR("jean-pierre.roux@creatis.insa-lyon.fr"); BBTK_CATEGORY("misc"); - BBTK_DESCRIPTION("String concatenation (C++,Python,JavaScript)"); + BBTK_DESCRIPTION("(C++,Python,JavaScript) String concatenation"); BBTK_INPUT(ConcatStrings,In1, "String 1", std::string,""); BBTK_INPUT(ConcatStrings,In2, "String 2", std::string,""); BBTK_INPUT(ConcatStrings,In3, "String 3", std::string,""); diff --git a/packages/std/src/bbstdDiv.xml b/packages/std/src/bbstdDiv.xml index ab02f2c..6bc651c 100644 --- a/packages/std/src/bbstdDiv.xml +++ b/packages/std/src/bbstdDiv.xml @@ -3,7 +3,7 @@ laurent.guigues@creatis.insa-lyon.fr - Divides its inputs (C++,Python) + (C++,Python) Divides its inputs math diff --git a/packages/std/src/bbstdFilesFromDirectory.h b/packages/std/src/bbstdFilesFromDirectory.h index 3ba18ea..6c6baf4 100644 --- a/packages/std/src/bbstdFilesFromDirectory.h +++ b/packages/std/src/bbstdFilesFromDirectory.h @@ -67,7 +67,7 @@ namespace bbstd BBTK_BEGIN_DESCRIBE_BLACK_BOX(FilesFromDirectory,bbtk::AtomicBlackBox); BBTK_NAME("FilesFromDirectory"); BBTK_AUTHOR("jpr@creatis.univ-lyon1.fr"); - BBTK_DESCRIPTION("returns the fullPathNames of the files in a Directory (C++,Python)"); + BBTK_DESCRIPTION("(C++,Python) Returns the fullPathNames of the files in a Directory"); BBTK_CATEGORY(""); BBTK_INPUT(FilesFromDirectory,Active,"(default true) Active true/false ",bool,""); diff --git a/packages/std/src/bbstdGetVectorElement.h b/packages/std/src/bbstdGetVectorElement.h index 8cc11ce..64353a6 100644 --- a/packages/std/src/bbstdGetVectorElement.h +++ b/packages/std/src/bbstdGetVectorElement.h @@ -63,7 +63,7 @@ namespace bbstd BBTK_NAME("Get"+bbtk::HumanTypeName >()+"Element"); BBTK_AUTHOR("info-dev@creatis.insa-lyon.fr"); // BBTK_DEFAULT_ADAPTOR(); - BBTK_DESCRIPTION("Gets the i-th element from the input vector ("+bbtk::TypeName >()); + BBTK_DESCRIPTION("(C++,Python) Gets the i-th element from the input vector ("+bbtk::TypeName >()); typedef std::vector Tvector; BBTK_TEMPLATE_INPUT(GetVectorElement, In,"Input",Tvector); BBTK_TEMPLATE_INPUT(GetVectorElement, I, "iElement (default 0)",int); diff --git a/packages/vtk/src/bbvtkMarchingCubes.h b/packages/vtk/src/bbvtkMarchingCubes.h index c94d76f..2b6ad65 100644 --- a/packages/vtk/src/bbvtkMarchingCubes.h +++ b/packages/vtk/src/bbvtkMarchingCubes.h @@ -111,7 +111,7 @@ namespace bbvtk BBTK_BEGIN_DESCRIBE_BLACK_BOX(MarchingCubes,bbtk::AtomicBlackBox); BBTK_NAME("MarchingCubes"); BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr"); - BBTK_DESCRIPTION("Extracts an iso-surface of an image using the marching cubes algorithm (bbfication of vtkMarchingCubes) (C++,Python)"); + BBTK_DESCRIPTION("(C++,Python) Extracts an iso-surface of an image using the marching cubes algorithm (bbfication of vtkMarchingCubes)"); BBTK_CATEGORY("image;mesh"); BBTK_INPUT(MarchingCubes,Active,"Active true/false (default true)",bool,""); diff --git a/packages/vtk/src/bbvtkMetaImageReader.h b/packages/vtk/src/bbvtkMetaImageReader.h index f00867c..10b81b5 100644 --- a/packages/vtk/src/bbvtkMetaImageReader.h +++ b/packages/vtk/src/bbvtkMetaImageReader.h @@ -34,7 +34,7 @@ class bbvtk_EXPORT MetaImageReader BBTK_BEGIN_DESCRIBE_BLACK_BOX(MetaImageReader,bbtk::AtomicBlackBox); BBTK_NAME("MetaImageReader"); BBTK_AUTHOR("Info-Dev"); - BBTK_DESCRIPTION("No Description. (C++,Python)"); + BBTK_DESCRIPTION("(C++,Python) No Description."); BBTK_CATEGORY("empty"); BBTK_INPUT(MetaImageReader,In,"File Name",std::string,""); diff --git a/packages/vtk/src/bbvtkPolyDataToActor.h b/packages/vtk/src/bbvtkPolyDataToActor.h index f0c9beb..ee07da7 100644 --- a/packages/vtk/src/bbvtkPolyDataToActor.h +++ b/packages/vtk/src/bbvtkPolyDataToActor.h @@ -107,7 +107,7 @@ namespace bbvtk BBTK_BEGIN_DESCRIBE_BLACK_BOX(PolyDataToActor,bbtk::AtomicBlackBox); BBTK_NAME("PolyDataToActor"); BBTK_AUTHOR("eduardo.davila at creatis.insa-lyon.fr"); - BBTK_DESCRIPTION("takes a vtkPolyData object to insert into a 3D scene (e.g. a Viewer3D) (C++,Python,JavaScript)"); + BBTK_DESCRIPTION("(C++,Python,JavaScript) Takes a vtkPolyData object to insert into a 3D scene (e.g. a Viewer3D)"); typedef std::vector vectorcolour; BBTK_CATEGORY("3D object creator"); BBTK_INPUT(PolyDataToActor,In,"Input image",vtkPolyData*,""); diff --git a/packages/wx/src/bbwxComboBox.h b/packages/wx/src/bbwxComboBox.h index 3a02e05..68ea71c 100644 --- a/packages/wx/src/bbwxComboBox.h +++ b/packages/wx/src/bbwxComboBox.h @@ -40,7 +40,7 @@ class bbwx_EXPORT ComboBox BBTK_BEGIN_DESCRIBE_BLACK_BOX(ComboBox,bbtk::WxBlackBox); BBTK_NAME("ComboBox"); BBTK_AUTHOR("Info-Dev"); - BBTK_DESCRIPTION("No Description."); + BBTK_DESCRIPTION("(C++,Python) wxComboBox"); BBTK_CATEGORY("__CategoryBlackBox__"); BBTK_INPUT(ComboBox,Title,"Title prepended to the text",std::string,""); diff --git a/packages/wx/src/bbwxLayoutLine.h b/packages/wx/src/bbwxLayoutLine.h index 7b602e0..e4889b4 100644 --- a/packages/wx/src/bbwxLayoutLine.h +++ b/packages/wx/src/bbwxLayoutLine.h @@ -100,7 +100,7 @@ namespace bbwx BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutLine,bbtk::WxBlackBox); BBTK_NAME("LayoutLine"); BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr"); - BBTK_DESCRIPTION("LayoutLine widget (wxBoxSizer)"); + BBTK_DESCRIPTION("(C++,Python) LayoutLine widget (wxBoxSizer)"); // Already inserted for any WxBlackBox BBTK_CATEGORY("widget"); BBTK_INPUT(LayoutLine,Widget1,"widget 1",wxWindow*,""); BBTK_INPUT(LayoutLine,Widget2,"widget 2",wxWindow*,""); diff --git a/packages/wx/src/bbwxOutputText.xml b/packages/wx/src/bbwxOutputText.xml index ea5e5d9..97c4704 100644 --- a/packages/wx/src/bbwxOutputText.xml +++ b/packages/wx/src/bbwxOutputText.xml @@ -3,7 +3,7 @@ laurent.guigues at creatis.insa-lyon.fr - Text zone to be inserted into a window (wxStaticText) + (C++,Python) Text zone to be inserted into a window (wxStaticText) diff --git a/packages/wx/src/bbwxSlider.h b/packages/wx/src/bbwxSlider.h index 82fdeea..d5cc04d 100644 --- a/packages/wx/src/bbwxSlider.h +++ b/packages/wx/src/bbwxSlider.h @@ -99,7 +99,7 @@ namespace bbwx BBTK_NAME("Slider"); BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr"); // Already inserted for any WxBlackBox BBTK_CATEGORY("widget"); - BBTK_DESCRIPTION("Slider widget (wxSlider) (C++,Python)"); + BBTK_DESCRIPTION("(C++,Python) Slider widget (wxSlider)"); BBTK_INPUT(Slider,In, "Initial position of the slider (default 0)", int, ""); BBTK_INPUT(Slider,Min, "Minimum value of the slider (default 0)", int, ""); BBTK_INPUT(Slider,Max, "Maximum value of the slider (default 500)", int, "");