diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index b39150f1..65cb4f36 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -13,7 +13,7 @@ set_cmake_policies() set_lib_link_mode() - setup_boost(regex filesystem) + setup_boost(regex) set(QT_USE_QTXML "true") find_package(LibXml2 REQUIRED) diff --git a/hurricane/src/hurricane/Occurrence.cpp b/hurricane/src/hurricane/Occurrence.cpp index 65b9863b..8a0e67d6 100644 --- a/hurricane/src/hurricane/Occurrence.cpp +++ b/hurricane/src/hurricane/Occurrence.cpp @@ -225,10 +225,16 @@ string Occurrence::getCompactString() const s += ":"; if (_sharedPath) s += getString(_sharedPath->getName()) + ":"; Instance* instance = dynamic_cast(_entity); - if (instance) - s += getString(instance->getName()); - else - s += getString(_entity); + if (instance) { + s += "I."+getString(instance->getName()); + } else { + Net* net = dynamic_cast(_entity); + if (net) { + s += "N."+getString(net->getName()); + } else { + s += getString(_entity); + } + } } s += ">"; return s; diff --git a/hurricane/src/hurricane/hurricane/NetExternalComponents.h b/hurricane/src/hurricane/hurricane/NetExternalComponents.h index 905210eb..2e3c04e5 100644 --- a/hurricane/src/hurricane/hurricane/NetExternalComponents.h +++ b/hurricane/src/hurricane/hurricane/NetExternalComponents.h @@ -1,7 +1,7 @@ // -*- C++ -*- // -// Copyright (c) BULL S.A. 2000-2009, All Rights Reserved +// Copyright (c) BULL S.A. 2000-2013, All Rights Reserved // // This file is part of Hurricane. // @@ -19,27 +19,19 @@ // License along with Hurricane. If not, see // . // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | H U R R I C A N E | // | V L S I B a c k e n d D a t a - B a s e | // | | // | Author : Christophe Alexandre | // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | -// | C++ Header : "./hurricane/NetExternalComponents.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./hurricane/NetExternalComponents.h" | +// +-----------------------------------------------------------------+ -#ifndef __HURRICANE_NET_EXTERNAL_COMPONENTS__ -#define __HURRICANE_NET_EXTERNAL_COMPONENTS__ +#ifndef HURRICANE_NET_EXTERNAL_COMPONENTS_H +#define HURRICANE_NET_EXTERNAL_COMPONENTS_H #include "hurricane/Component.h" #include "hurricane/Relation.h" @@ -60,7 +52,6 @@ namespace Hurricane { }; -} // End of Hurricane namespace. +} // Hurricane namespace. - -#endif // __HURRICANE_NET_EXTERNAL_COMPONENTS__ +#endif // HURRICANE_NET_EXTERNAL_COMPONENTS_H diff --git a/hurricane/src/viewer/ExceptionWidget.cpp b/hurricane/src/viewer/ExceptionWidget.cpp index 2a707dc3..010b183d 100644 --- a/hurricane/src/viewer/ExceptionWidget.cpp +++ b/hurricane/src/viewer/ExceptionWidget.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | V L S I B a c k e n d D a t a - B a s e | // | | @@ -17,10 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./ExceptionWidget.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #include diff --git a/hurricane/src/viewer/HApplication.cpp b/hurricane/src/viewer/HApplication.cpp index 1605a85e..ba2bcde8 100644 --- a/hurricane/src/viewer/HApplication.cpp +++ b/hurricane/src/viewer/HApplication.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | U n i c o r n - M a i n G U I | // | | @@ -17,10 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./HApplication.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #include diff --git a/hurricane/src/viewer/ScriptWidget.cpp b/hurricane/src/viewer/ScriptWidget.cpp index d5758e87..b3020563 100644 --- a/hurricane/src/viewer/ScriptWidget.cpp +++ b/hurricane/src/viewer/ScriptWidget.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | V L S I B a c k e n d D a t a - B a s e | // | | @@ -17,10 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./ScriptWidget.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #include @@ -28,12 +20,6 @@ #include using namespace std; -#include -namespace bfs = boost::filesystem; - -#include "hurricane/Warning.h" -#include "hurricane/viewer/Script.h" - #include #include #include @@ -42,7 +28,9 @@ namespace bfs = boost::filesystem; #include #include #include - +#include "vlsisapd/utilities/Path.h" +#include "hurricane/Warning.h" +#include "hurricane/viewer/Script.h" #include "hurricane/viewer/Graphics.h" #include "hurricane/viewer/ScriptWidget.h" #include "hurricane/viewer/CellViewer.h" @@ -119,16 +107,15 @@ namespace Hurricane { if ( scriptName.endsWith(".py",Qt::CaseInsensitive) ) scriptName.truncate ( scriptName.size()-3 ); - bfs::path userScript = scriptName.toStdString(); - bfs::path userDirectory = userScript.branch_path(); + Utilities::Path userScript ( scriptName.toStdString() ); + Utilities::Path userDirectory ( userScript.dirname() ); - if ( not userDirectory.is_complete() ) - userDirectory = bfs::current_path() / userDirectory; - userDirectory.normalize(); + if ( not userDirectory.absolute() ) + userDirectory = Utilities::Path::cwd() / userDirectory; Isobar::Script::addPath ( userDirectory.string() ); - dbo_ptr script = Isobar::Script::create(userScript.leaf()); + dbo_ptr script = Isobar::Script::create(userScript.basename().string()); script->setEditor ( qobject_cast(parent) ); bool returnCode = script->runFunction ( "ScriptMain", cell ); diff --git a/hurricane/src/viewer/StratusScript.cpp b/hurricane/src/viewer/StratusScript.cpp index 6700fa87..8f7aec6b 100644 --- a/hurricane/src/viewer/StratusScript.cpp +++ b/hurricane/src/viewer/StratusScript.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -19,9 +19,7 @@ #include using namespace std; -#include -namespace bfs = boost::filesystem; - +#include "vlsisapd/utilities/Path.h" #include "hurricane/Warning.h" #include "hurricane/viewer/StratusScript.h" @@ -38,17 +36,16 @@ namespace Hurricane { , _scriptDirectory() , _script (NULL) { - bfs::path userStratus = _scriptName; - bfs::path userDirectory = userStratus.branch_path(); + Utilities::Path userStratus ( _scriptName ); + Utilities::Path userDirectory ( userStratus.dirname() ); - if ( not userDirectory.is_complete() ) - userDirectory = bfs::current_path() / userDirectory; - userDirectory.normalize(); + if ( not userDirectory.absolute() ) + userDirectory = Utilities::Path::cwd() / userDirectory; _scriptDirectory = userDirectory.string(); Isobar::Script::addPath ( _scriptDirectory ); - _script = Isobar::Script::create ( userStratus.leaf() ); + _script = Isobar::Script::create ( userStratus.basename().string() ); _script->setEditor ( editor ); } diff --git a/hurricane/src/viewer/StratusWidget.cpp b/hurricane/src/viewer/StratusWidget.cpp index 58d72102..f95ea55d 100644 --- a/hurricane/src/viewer/StratusWidget.cpp +++ b/hurricane/src/viewer/StratusWidget.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | V L S I B a c k e n d D a t a - B a s e | // | | @@ -17,10 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./StratusWidget.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #include @@ -28,12 +20,6 @@ #include using namespace std; -#include -namespace bfs = boost::filesystem; - -#include "hurricane/Warning.h" -#include "hurricane/viewer/Script.h" - #include #include #include @@ -42,7 +28,9 @@ namespace bfs = boost::filesystem; #include #include #include - +#include "vlsisapd/utilities/Path.h" +#include "hurricane/Warning.h" +#include "hurricane/viewer/Script.h" #include "hurricane/viewer/Graphics.h" #include "hurricane/viewer/StratusScript.h" #include "hurricane/viewer/StratusWidget.h" @@ -126,12 +114,11 @@ namespace Hurricane { if ( scriptName.endsWith(".py",Qt::CaseInsensitive) ) scriptName.truncate ( scriptName.size()-3 ); - bfs::path userStratus = scriptName.toStdString(); - bfs::path userDirectory = userStratus.branch_path(); + Utilities::Path userStratus ( scriptName.toStdString() ); + Utilities::Path userDirectory ( userStratus.branch_path() ); - if ( not userDirectory.is_complete() ) - userDirectory = bfs::current_path() / userDirectory; - userDirectory.normalize(); + if ( not userDirectory.absolute() ) + userDirectory = Utilities::Path:cwd() / userDirectory; Isobar::Script::addPath ( userDirectory.string() );