bbtk
${${BBTK_PACKAGE_NAME}_LIBS}
)
+SET_TARGET_PROPERTIES(bb${BBTK_PACKAGE_NAME} PROPERTIES COMPILE_FLAGS -Wall)
#----------------------------------------------------------------------------
+SET(CMAKE_SKIP_RPATH ON)
+
+
#-----------------------------------------------------------------------------
SET(BBTK_CMAKE_REL_PATH kernel/cmake)
SET(BBTK_CMAKE_DIR ${PROJECT_SOURCE_DIR}/${BBTK_CMAKE_REL_PATH})
PROGRAMS bbtk-uninstall.sh
DESTINATION bin
)
+
+# rpmbuild
+SUBDIRS(rpmbuild)
--- /dev/null
+# Note that this is NOT a relocatable package
+%define prefix /usr
+Summary: BBTK
+Name: BBTK
+Version: @BBTK_VERSION@
+Release: 1.0.0
+# @BBTK_VERSION@.@BBTK_DATE@
+License: CeCILL-B
+Group: Development/Libraries
+Source: bbtk.tar.gz
+BuildRoot: /tmp/bbtk-%{version}-root
+Prereq: /sbin/install-info
+Docdir: %{prefix}/doc
+#Requires: vtk = 4.5.0-0.cvs.2.fc4
+#Requires: vtk-python = 4.5.0-0.cvs.2.fc4
+#BuildPrereq: vtk-devel = 4.5.0-0.cvs.2.fc4
+BuildRequires: cmake >= 2.4.6
+
+
+%description
+The Black Box ToolKit
+
+%changelog
+* Wed Jul 23 2008 Laurent Guigues <Laurent.Guigues@creatis.insa-lyon.fr> 1.0.0
+- initial packaging with cmake
+
+%prep
+%setup -q -n BBTK
+
+export CC='gcc'
+export CXX='g++'
+export MAKE='make %{?_smp_mflags}'
+export CFLAGS="$RPM_OPT_FLAGS"
+export CXXFLAGS="$RPM_OPT_FLAGS -Wno-deprecated"
+cmake . \
+ -DCMAKE_INSTALL_PREFIX:STRING="%{_prefix}" \
+ -DCMAKE_SKIP_RPATH:BOOL=ON \
+ -DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
+ -DCMAKE_C_COMPILER:FILEPATH=$CC \
+ -D--BUILD_ALL=ON
+
+%build
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
+
+# creating file BBTK.conf in /etc/ld.so.conf.d
+# which contains the path to BBTK dynamic libs
+install -d $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d
+echo "%{_libdir}/BBTK" > $RPM_BUILD_ROOT/%{_sysconfdir}/ld.so.conf.d/BBTK.conf
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-, root, root)
+
+#%doc AUTHORS ChangeLog README TODO DEVELOPPER INSTALL PACKAGER
+%doc ChangeLog README TODO
+%doc Doc
+%{_libdir}/*
+%{_includedir}/*
+%{_datadir}/*
+%{_bindir}/*
+%{_sysconfdir}/ld.so.conf.d/BBTK.conf
#-----------------------------------------------------------------------------
TARGET_LINK_LIBRARIES(bbtk ${BBTK_LINK_LIBRARIES})
#-----------------------------------------------------------------------------
+SET_TARGET_PROPERTIES(bbtk PROPERTIES COMPILE_FLAGS -Wall)
#IF(UNIX)
# for gnu linker : version script used to define exported symbols
Program: bbtk
Module: $RCSfile: bbtkAtomicBlackBoxGetSetFunctor.h,v $
Language: C++
- Date: $Date: 2008/04/24 10:11:27 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/07/23 11:46:10 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
public:
/// Default constructor
AtomicBlackBoxGetFunctor() {}
+ /// Dtor
+ virtual ~AtomicBlackBoxGetFunctor() {}
/// Abstract method which applies the "Get" function of AtomicBlackBox o
virtual Data Get(AtomicBlackBox* o) = 0;
///
public:
/// Default constructor
AtomicBlackBoxSetFunctor() {}
+ /// Dtor
+ virtual ~AtomicBlackBoxSetFunctor() {}
/// Abstract method which applies the "Set" function of AtomicBlackBox o
virtual void Set(AtomicBlackBox* o, const Data&) = 0;
///
Program: bbtk
Module: $RCSfile: bbtkBlackBox.cxx,v $
Language: C++
-Date: $Date: 2008/06/19 09:46:41 $
-Version: $Revision: 1.21 $
+Date: $Date: 2008/07/23 11:46:10 $
+Version: $Revision: 1.22 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
//=========================================================================
BlackBox::BlackBox(const std::string &name)
- : bbmName(name),
- bbmStatus(MODIFIED),
- bbmBoxProcessMode("Pipeline"),
- bbmParent()
-
+ :
+ bbmStatus(MODIFIED),
+ bbmName(name),
+ bbmBoxProcessMode("Pipeline"),
+ bbmParent()
+
{
bbtkDebugMessage("object",4,"==> BlackBox::BlackBox(\""
<<name<<"\")"<<std::endl);
//=========================================================================
BlackBox::BlackBox(BlackBox& from, const std::string &name)
- : bbmName(name),
+ :
bbmStatus(from.bbmStatus),
+ bbmName(name),
bbmBoxProcessMode(from.bbmBoxProcessMode),
bbmParent()
this->bbSetStatus(MODIFIED);
bbGlobalAddToExecutionList( GetThisPointer<BlackBox>() );
}
+ /*
else if ( bbGetStatus() == MODIFIED ) //! this->bbIsUptodate())
{
bbtkDebugMessage("modified",2,"-> Already modified"<<std::endl);
return;
}
+ */
else
{
bbtkDebugMessage("modified",2,"-> Status set to modified"<<std::endl);
InputConnectorMapType::iterator i;
unsigned int namelmax = 0;
unsigned int valuelmax = 0;
- unsigned int connlmax = 0;
+ // unsigned int connlmax = 0;
for ( i = mInputConnectorMap.begin(); i != mInputConnectorMap.end(); ++i )
{
iname.push_back(i->first);
Program: bbtk
Module: $RCSfile: bbtkBlackBoxInputOutputDescriptor.h,v $
Language: C++
- Date: $Date: 2008/07/03 18:20:57 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
mNature(nature),
mCopyConstruct(copy_construct)
{}
-
+ /// Dtor
+ virtual ~BlackBoxInputOutputDescriptor() {}
+
/// Returns the TypeInfo of the BlackBoxDescriptor which created this descriptor
TypeInfo GetCreatorTypeInfo() const { return mCreatorTypeInfo; }
/// Returns the name of the in/output
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/07/03 13:59:32 $
- Version: $Revision: 1.68 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.69 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Filenames.clear();
- int nbFiles = Utilities::Explore(*i, false, Filenames);
+ //int nbFiles =
+ Utilities::Explore(*i, false, Filenames);
nbBssFiles = 0;
for (std::vector<std::string>::iterator j = Filenames.begin();
}
// tests the number of args
- if ( ( words.size()-1 < c->second.argmin ) ||
- ( words.size()-1 > c->second.argmax ) )
+ if ( ( ((int)words.size())-1 < c->second.argmin ) ||
+ ( ((int)words.size())-1 > c->second.argmax ) )
{
HelpCommand(words[0]);
bbtkError(words[0]<<" : wrong number of arguments");
void Interpreter::GetLineFromPrompt(std::string& s)
{
int c;
- int ind=0;
+ unsigned int ind=0;
- int MAX_LINE_SIZE = 160;
- int MAX_HISTORY_SIZE = 100;
+ unsigned int MAX_LINE_SIZE = 160;
+ unsigned int MAX_HISTORY_SIZE = 100;
char* newline = new char[MAX_LINE_SIZE];
memset(newline,0,MAX_LINE_SIZE);
memset(histline,0,MAX_LINE_SIZE);
char* line = newline;
- int hist = mHistory.size();
+ unsigned int hist = mHistory.size();
write(1,"> ",2);
while(1)
BlackBox::Pointer box = workspace->GetPrototype()->bbGetBlackBox(boxname);
// BlackBox::InputConnectorMapType incm = box->bbGetInputConnectorMap();
- int nb = 0;
+ // int nb = 0;
BlackBox::InputConnectorMapType::iterator i;
for (i=box->bbGetInputConnectorMap().begin();
i!=box->bbGetInputConnectorMap().end();
Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $ $
Language: C++
- Date: $Date: 2008/05/15 08:02:36 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.32 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
public:
InterpreterUser() {}
- ~InterpreterUser() {}
+ virtual ~InterpreterUser() {}
virtual bool InterpreterUserHasOwnHtmlPageViewer() { return false; }
virtual void InterpreterUserViewHtmlPage(const std::string&) {}
Program: bbtk
Module: $RCSfile: bbtkObject.h,v $
Language: C++
- Date: $Date: 2008/05/06 13:45:12 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
struct BBTK_EXPORT Deleter
{
Deleter() : mPointer() {}
+ virtual ~Deleter() {}
virtual void operator() (Object* p);
virtual void Delete(Object* p) { delete p; }
WeakPointer mPointer;
Program: bbtk
Module: $RCSfile: bbtkWxBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/06/27 08:12:46 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.24 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
wxString title,
wxSize size)
:
- WxBlackBoxWindow(box),
wxDialog( parent,
-1,
title,
wxMAXIMIZE_BOX |
wxMINIMIZE_BOX |
wxCAPTION
- )
+ ),
+ WxBlackBoxWindow(box)
{
bbtkDebugMessage("wx",9,"WxBlackBoxDialog::WxBlackBoxDialog("<<
bbGetBlackBox()->bbGetFullName()<<","<<parent<<","
wxWindow *parent,
wxString title,
wxSize size)
- : WxBlackBoxWindow(box),
- wxFrame( parent,
+ : wxFrame( parent,
-1,
title,
wxDefaultPosition,
wxMAXIMIZE_BOX |
wxMINIMIZE_BOX |
wxCAPTION
- )
+ ),
+ WxBlackBoxWindow(box)
{
bbtkDebugMessage("wx",9,"WxBlackBoxFrame::WxBlackBoxFrame("<<
bbGetBlackBox()->bbGetFullName()<<","<<parent<<","
Program: bbtk
Module: $RCSfile: bbtkWxGUICommand.h,v $
Language: C++
- Date: $Date: 2008/06/26 06:50:05 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
public:
WxGUICommandUser() {}
- ~WxGUICommandUser() {}
+ virtual ~WxGUICommandUser() {}
/// Callback invoked when a command is entered in the WxGUICommand
virtual void WxGUICommandEnter(const std::string& command) {}
};
Program: bbtk
Module: $RCSfile: bbtkWxGUIHtmlBrowser.h,v $
Language: C++
- Date: $Date: 2008/06/10 19:19:42 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
public :
WxGUIHtmlBrowserUser() {}
- ~WxGUIHtmlBrowserUser() {}
+ virtual ~WxGUIHtmlBrowserUser() {}
virtual bool WxGUIHtmlBrowserUserOnLinkClicked(const std::string& target)
{ return true; }
Program: bbtk
Module: $RCSfile: bbtkWxGUIOutputMessages.h,v $
Language: C++
- Date: $Date: 2008/03/20 09:51:29 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.2 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
public:
WxGUIOutputMessagesUser() {}
- ~WxGUIOutputMessagesUser() {}
+ virtual ~WxGUIOutputMessagesUser() {}
/// Callback invoked when a command is entered in the WxGUIOutputMessages
virtual void WxGUIOutputMessagesEnter(const std::string& command) {}
};
Program: bbtk
Module: $RCSfile: bbtkWxGUIPackageBrowser2.cxx,v $
Language: C++
-Date: $Date: 2008/06/10 19:19:42 $
-Version: $Revision: 1.9 $
+Date: $Date: 2008/07/23 11:46:11 $
+Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void WxGUIBlackBoxList::LogColEvent(const wxListEvent& event, const wxChar *name)
{
- const int col = event.GetColumn();
+ // const int col = event.GetColumn();
/*
wxLogMessage(wxT("%s: column %d (width = %d or %d)."),
void WxGUIBlackBoxList::OnBeginDrag(wxListEvent& event)
{
- const wxPoint& pt = event.m_pointDrag;
+ // const wxPoint& pt = event.m_pointDrag;
//wxLogMessage( wxT("OnBeginDrag at (%d, %d), item %ld."),
// pt.x, pt.y, HitTest(pt, flags) );
int flags;
long subitem;
- long item = HitTest(event.GetPosition(), flags, &subitem);
+ // long item =
+ HitTest(event.GetPosition(), flags, &subitem);
wxString where;
switch ( flags )
Program: bbtk
Module: $RCSfile: bbtkWxGUIPackageBrowser2.h,v $
Language: C++
- Date: $Date: 2008/04/23 09:31:23 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.5 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
public:
WxGUIPackageBrowser2User() {}
- ~WxGUIPackageBrowser2User() {}
+ virtual ~WxGUIPackageBrowser2User() {}
/// Callback invoked when the 'run' button is pressed
virtual void WxGUIPackageBrowser2Run() {}
};
Program: bbtk
Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
Language: C++
- Date: $Date: 2008/07/01 07:58:28 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "bbtkWxStreamRedirector.h"
-#include "icons/cc_run.xpm"
+//#include "icons/cc_run.xpm"
namespace bbtk
{
(*buf) << mWxGUITextEditor->GetCurrentPage()->GetText();
try
{
- std::cout << "RUN"<<std::endl;
+ // std::cout << "RUN"<<std::endl;
if (mwxMenuItemReset->IsChecked()) WxGUICommandEnter("reset");
mInterpreter->InterpretBuffer(buf);
- std::cout << "EO RUN"<<std::endl;
+ // std::cout << "EO RUN"<<std::endl;
}
CATCH_MACRO;
- std::cout << "EO RUN 3"<<std::endl;
+ // std::cout << "EO RUN 3"<<std::endl;
}
//================================================================
Program: bbtk
Module: $RCSfile: bbtkWxGUITextEditor.cxx,v $
Language: C++
- Date: $Date: 2008/06/26 07:37:05 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "bbtkConfigurationFile.h"
#include "bbtkUtilities.h"
-#include "icons/cc_new.xpm"
-#include "icons/cc_open.xpm"
-#include "icons/cc_stop.xpm"
-#include "icons/cc_save.xpm"
-#include "icons/cc_save_as.xpm"
-#include "icons/cc_run.xpm"
-#include "icons/cc_exit.xpm"
+//#include "icons/cc_new.xpm"
+//#include "icons/cc_open.xpm"
+//#include "icons/cc_stop.xpm"
+//#include "icons/cc_save.xpm"
+//#include "icons/cc_save_as.xpm"
+//#include "icons/cc_run.xpm"
+//#include "icons/cc_exit.xpm"
#include "../data/icons/wxart_new.xpm"
#include "../data/icons/wxart_fileopen.xpm"
#include "../data/icons/wxart_filesave.xpm"
#include "../data/icons/wxart_filesaveas.xpm"
-#include "../data/icons/wxart_exefile.xpm"
-#include "../data/icons/wxart_delete.xpm"
+//#include "../data/icons/wxart_exefile.xpm"
+//#include "../data/icons/wxart_delete.xpm"
#include "../data/icons/wxart_down.xpm"
#include "../data/icons/wxart_eldel.xpm"
Program: bbtk
Module: $RCSfile: bbtkWxGUITextEditor.h,v $
Language: C++
- Date: $Date: 2008/05/14 12:32:26 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/07/23 11:46:11 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
public:
WxGUITextEditorUser() {}
- ~WxGUITextEditorUser() {}
+ virtual ~WxGUITextEditorUser() {}
/// Callback invoked when the 'run' button is pressed
virtual void WxGUITextEditorRun() {}
};