* ./hurricane/src/viewer:

- Change: Switch from boost::filestem to VLSISAPD path.
This commit is contained in:
Jean-Paul Chaput 2013-04-21 15:35:44 +00:00
parent 9a12f43e6b
commit dcc3084884
8 changed files with 53 additions and 101 deletions

View File

@ -13,7 +13,7 @@
set_cmake_policies() set_cmake_policies()
set_lib_link_mode() set_lib_link_mode()
setup_boost(regex filesystem) setup_boost(regex)
set(QT_USE_QTXML "true") set(QT_USE_QTXML "true")
find_package(LibXml2 REQUIRED) find_package(LibXml2 REQUIRED)

View File

@ -225,10 +225,16 @@ string Occurrence::getCompactString() const
s += ":"; s += ":";
if (_sharedPath) s += getString(_sharedPath->getName()) + ":"; if (_sharedPath) s += getString(_sharedPath->getName()) + ":";
Instance* instance = dynamic_cast<Instance*>(_entity); Instance* instance = dynamic_cast<Instance*>(_entity);
if (instance) if (instance) {
s += getString(instance->getName()); s += "I."+getString(instance->getName());
else } else {
s += getString(_entity); Net* net = dynamic_cast<Net*>(_entity);
if (net) {
s += "N."+getString(net->getName());
} else {
s += getString(_entity);
}
}
} }
s += ">"; s += ">";
return s; return s;

View File

@ -1,7 +1,7 @@
// -*- C++ -*- // -*- 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. // This file is part of Hurricane.
// //
@ -19,27 +19,19 @@
// License along with Hurricane. If not, see // License along with Hurricane. If not, see
// <http://www.gnu.org/licenses/>. // <http://www.gnu.org/licenses/>.
// //
// =================================================================== // +-----------------------------------------------------------------+
//
// $Id$
//
// x-----------------------------------------------------------------x
// | |
// | H U R R I C A N E | // | 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 | // | V L S I B a c k e n d D a t a - B a s e |
// | | // | |
// | Author : Christophe Alexandre | // | Author : Christophe Alexandre |
// | E-mail : Jean-Paul.Chaput@lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Header : "./hurricane/NetExternalComponents.h" | // | C++ Header : "./hurricane/NetExternalComponents.h" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#ifndef __HURRICANE_NET_EXTERNAL_COMPONENTS__ #ifndef HURRICANE_NET_EXTERNAL_COMPONENTS_H
#define __HURRICANE_NET_EXTERNAL_COMPONENTS__ #define HURRICANE_NET_EXTERNAL_COMPONENTS_H
#include "hurricane/Component.h" #include "hurricane/Component.h"
#include "hurricane/Relation.h" #include "hurricane/Relation.h"
@ -60,7 +52,6 @@ namespace Hurricane {
}; };
} // End of Hurricane namespace. } // Hurricane namespace.
#endif // HURRICANE_NET_EXTERNAL_COMPONENTS_H
#endif // __HURRICANE_NET_EXTERNAL_COMPONENTS__

View File

@ -2,14 +2,9 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // 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 | // | 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 | // | 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 | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./ExceptionWidget.cpp" | // | C++ Module : "./ExceptionWidget.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include <csignal> #include <csignal>

View File

@ -2,14 +2,9 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // 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 | // | C O R I O L I S |
// | U n i c o r n - M a i n G U I | // | 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 | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./HApplication.cpp" | // | C++ Module : "./HApplication.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include <iostream> #include <iostream>

View File

@ -2,14 +2,9 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // 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 | // | 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 | // | 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 | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./ScriptWidget.cpp" | // | C++ Module : "./ScriptWidget.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include <Python.h> #include <Python.h>
@ -28,12 +20,6 @@
#include <memory> #include <memory>
using namespace std; using namespace std;
#include <boost/filesystem/operations.hpp>
namespace bfs = boost::filesystem;
#include "hurricane/Warning.h"
#include "hurricane/viewer/Script.h"
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>
#include <QPushButton> #include <QPushButton>
@ -42,7 +28,9 @@ namespace bfs = boost::filesystem;
#include <QCheckBox> #include <QCheckBox>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QVBoxLayout> #include <QVBoxLayout>
#include "vlsisapd/utilities/Path.h"
#include "hurricane/Warning.h"
#include "hurricane/viewer/Script.h"
#include "hurricane/viewer/Graphics.h" #include "hurricane/viewer/Graphics.h"
#include "hurricane/viewer/ScriptWidget.h" #include "hurricane/viewer/ScriptWidget.h"
#include "hurricane/viewer/CellViewer.h" #include "hurricane/viewer/CellViewer.h"
@ -119,16 +107,15 @@ namespace Hurricane {
if ( scriptName.endsWith(".py",Qt::CaseInsensitive) ) if ( scriptName.endsWith(".py",Qt::CaseInsensitive) )
scriptName.truncate ( scriptName.size()-3 ); scriptName.truncate ( scriptName.size()-3 );
bfs::path userScript = scriptName.toStdString(); Utilities::Path userScript ( scriptName.toStdString() );
bfs::path userDirectory = userScript.branch_path(); Utilities::Path userDirectory ( userScript.dirname() );
if ( not userDirectory.is_complete() ) if ( not userDirectory.absolute() )
userDirectory = bfs::current_path() / userDirectory; userDirectory = Utilities::Path::cwd() / userDirectory;
userDirectory.normalize();
Isobar::Script::addPath ( userDirectory.string() ); Isobar::Script::addPath ( userDirectory.string() );
dbo_ptr<Isobar::Script> script = Isobar::Script::create(userScript.leaf()); dbo_ptr<Isobar::Script> script = Isobar::Script::create(userScript.basename().string());
script->setEditor ( qobject_cast<CellViewer*>(parent) ); script->setEditor ( qobject_cast<CellViewer*>(parent) );
bool returnCode = script->runFunction ( "ScriptMain", cell ); bool returnCode = script->runFunction ( "ScriptMain", cell );

View File

@ -2,7 +2,7 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // 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 | // | C O R I O L I S |
@ -19,9 +19,7 @@
#include <iostream> #include <iostream>
using namespace std; using namespace std;
#include <boost/filesystem/operations.hpp> #include "vlsisapd/utilities/Path.h"
namespace bfs = boost::filesystem;
#include "hurricane/Warning.h" #include "hurricane/Warning.h"
#include "hurricane/viewer/StratusScript.h" #include "hurricane/viewer/StratusScript.h"
@ -38,17 +36,16 @@ namespace Hurricane {
, _scriptDirectory() , _scriptDirectory()
, _script (NULL) , _script (NULL)
{ {
bfs::path userStratus = _scriptName; Utilities::Path userStratus ( _scriptName );
bfs::path userDirectory = userStratus.branch_path(); Utilities::Path userDirectory ( userStratus.dirname() );
if ( not userDirectory.is_complete() ) if ( not userDirectory.absolute() )
userDirectory = bfs::current_path() / userDirectory; userDirectory = Utilities::Path::cwd() / userDirectory;
userDirectory.normalize();
_scriptDirectory = userDirectory.string(); _scriptDirectory = userDirectory.string();
Isobar::Script::addPath ( _scriptDirectory ); Isobar::Script::addPath ( _scriptDirectory );
_script = Isobar::Script::create ( userStratus.leaf() ); _script = Isobar::Script::create ( userStratus.basename().string() );
_script->setEditor ( editor ); _script->setEditor ( editor );
} }

View File

@ -2,14 +2,9 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // 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 | // | 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 | // | 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 | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./StratusWidget.cpp" | // | C++ Module : "./StratusWidget.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include <Python.h> #include <Python.h>
@ -28,12 +20,6 @@
#include <memory> #include <memory>
using namespace std; using namespace std;
#include <boost/filesystem/operations.hpp>
namespace bfs = boost::filesystem;
#include "hurricane/Warning.h"
#include "hurricane/viewer/Script.h"
#include <QLabel> #include <QLabel>
#include <QLineEdit> #include <QLineEdit>
#include <QPushButton> #include <QPushButton>
@ -42,7 +28,9 @@ namespace bfs = boost::filesystem;
#include <QCheckBox> #include <QCheckBox>
#include <QHBoxLayout> #include <QHBoxLayout>
#include <QVBoxLayout> #include <QVBoxLayout>
#include "vlsisapd/utilities/Path.h"
#include "hurricane/Warning.h"
#include "hurricane/viewer/Script.h"
#include "hurricane/viewer/Graphics.h" #include "hurricane/viewer/Graphics.h"
#include "hurricane/viewer/StratusScript.h" #include "hurricane/viewer/StratusScript.h"
#include "hurricane/viewer/StratusWidget.h" #include "hurricane/viewer/StratusWidget.h"
@ -126,12 +114,11 @@ namespace Hurricane {
if ( scriptName.endsWith(".py",Qt::CaseInsensitive) ) if ( scriptName.endsWith(".py",Qt::CaseInsensitive) )
scriptName.truncate ( scriptName.size()-3 ); scriptName.truncate ( scriptName.size()-3 );
bfs::path userStratus = scriptName.toStdString(); Utilities::Path userStratus ( scriptName.toStdString() );
bfs::path userDirectory = userStratus.branch_path(); Utilities::Path userDirectory ( userStratus.branch_path() );
if ( not userDirectory.is_complete() ) if ( not userDirectory.absolute() )
userDirectory = bfs::current_path() / userDirectory; userDirectory = Utilities::Path:cwd() / userDirectory;
userDirectory.normalize();
Isobar::Script::addPath ( userDirectory.string() ); Isobar::Script::addPath ( userDirectory.string() );