From 85297540fc834bcade5d330f3037da09257ebc86 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 8 Jun 2010 12:02:31 +0000 Subject: [PATCH] * ./crlcore: - Bug: In CMakeLists.txt, local include directories *first*. - New: In Utilities, Dots::asBool() & Dots::asLambda(). - New: In display.xml, new for Mauka Containers. --- crlcore/etc/display.xml | 33 +++++++++++++------------- crlcore/src/ccore/CMakeLists.txt | 4 ++-- crlcore/src/ccore/CellGauge.cpp | 4 ++-- crlcore/src/ccore/Utilities.cpp | 8 +++++++ crlcore/src/ccore/crlcore/CellGauge.h | 2 +- crlcore/src/ccore/crlcore/ToolEngine.h | 2 +- crlcore/src/ccore/crlcore/Utilities.h | 3 +++ crlcore/src/cyclop/CMakeLists.txt | 4 ++-- crlcore/src/x2y/CMakeLists.txt | 4 ++-- 9 files changed, 38 insertions(+), 26 deletions(-) diff --git a/crlcore/etc/display.xml b/crlcore/etc/display.xml index b93b5e41..2bcc8580 100644 --- a/crlcore/etc/display.xml +++ b/crlcore/etc/display.xml @@ -25,22 +25,23 @@ 11110111 --> - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/crlcore/src/ccore/CMakeLists.txt b/crlcore/src/ccore/CMakeLists.txt index 9163ef4a..1ee723fd 100644 --- a/crlcore/src/ccore/CMakeLists.txt +++ b/crlcore/src/ccore/CMakeLists.txt @@ -11,8 +11,6 @@ include ( ${QT_USE_FILE} ) - include_directories ( ${CIF_INCLUDE_DIR} - ${HURRICANE_INCLUDE_DIR} ) include_directories ( ${CRLCORE_SOURCE_DIR}/src/fonts ${CRLCORE_SOURCE_DIR}/src/ccore ${CRLCORE_SOURCE_DIR}/src/ccore/properties @@ -26,6 +24,8 @@ ${CRLCORE_SOURCE_DIR}/src/ccore/spice ${CRLCORE_SOURCE_DIR}/src/ccore/liberty ${CRLCORE_SOURCE_DIR}/src/ccore/toolbox + ${HURRICANE_INCLUDE_DIR} + ${CIF_INCLUDE_DIR} ) add_definitions ( -DCORIOLIS_TOP="${CORIOLIS_TOP}" diff --git a/crlcore/src/ccore/CellGauge.cpp b/crlcore/src/ccore/CellGauge.cpp index 59424d95..7b3f2126 100644 --- a/crlcore/src/ccore/CellGauge.cpp +++ b/crlcore/src/ccore/CellGauge.cpp @@ -3,7 +3,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved // // =================================================================== // @@ -17,7 +17,7 @@ // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./CellGauge.cpp" | +// | C++ Header : "./CellGauge.cpp" | // | *************************************************************** | // | U p d a t e s | // | | diff --git a/crlcore/src/ccore/Utilities.cpp b/crlcore/src/ccore/Utilities.cpp index 1f35158d..cea4766c 100644 --- a/crlcore/src/ccore/Utilities.cpp +++ b/crlcore/src/ccore/Utilities.cpp @@ -57,6 +57,10 @@ Dots Dots::asPercentage ( const std::string& left, float value ) } +Dots Dots::asBool ( const std::string& left, bool value ) +{ std::ostringstream right; right << std::boolalpha << value; return Dots(left,right.str()); } + + Dots Dots::asUInt ( const std::string& left, unsigned int value ) { std::ostringstream right; right << value; return Dots(left,right.str()); } @@ -73,6 +77,10 @@ Dots Dots::asDouble ( const std::string& left, double value ) { std::ostringstream right; right << value; return Dots(left,right.str()); } +Dots Dots::asLambda ( const std::string& left, Hurricane::DbU::Unit value ) +{ std::ostringstream right; right << Hurricane::DbU::getValueString(value); return Dots(left,right.str()); } + + Dots Dots::asIdentifier ( const std::string& left, const std::string& value ) { std::ostringstream right; right << "<" << value << ">"; return Dots(left,right.str()); } diff --git a/crlcore/src/ccore/crlcore/CellGauge.h b/crlcore/src/ccore/crlcore/CellGauge.h index 834f8568..99e42361 100644 --- a/crlcore/src/ccore/crlcore/CellGauge.h +++ b/crlcore/src/ccore/crlcore/CellGauge.h @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved // // =================================================================== // diff --git a/crlcore/src/ccore/crlcore/ToolEngine.h b/crlcore/src/ccore/crlcore/ToolEngine.h index 2ff76614..60aa4e25 100644 --- a/crlcore/src/ccore/crlcore/ToolEngine.h +++ b/crlcore/src/ccore/crlcore/ToolEngine.h @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2008, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved // // =================================================================== // diff --git a/crlcore/src/ccore/crlcore/Utilities.h b/crlcore/src/ccore/crlcore/Utilities.h index 11c0d738..df10650c 100644 --- a/crlcore/src/ccore/crlcore/Utilities.h +++ b/crlcore/src/ccore/crlcore/Utilities.h @@ -36,6 +36,7 @@ #include "hurricane/Commons.h" #include "hurricane/Error.h" #include "hurricane/Slot.h" +#include "hurricane/DbU.h" namespace CRL { @@ -348,10 +349,12 @@ extern mstream cinfo; class Dots { public: static Dots asPercentage ( const std::string& left, float ); + static Dots asBool ( const std::string& left, bool ); static Dots asUInt ( const std::string& left, unsigned int ); static Dots asULong ( const std::string& left, unsigned long ); static Dots asSizet ( const std::string& left, size_t ); static Dots asDouble ( const std::string& left, double ); + static Dots asLambda ( const std::string& left, Hurricane::DbU::Unit ); static Dots asIdentifier ( const std::string& left, const std::string& ); static Dots asString ( const std::string& left, const std::string& ); private: diff --git a/crlcore/src/cyclop/CMakeLists.txt b/crlcore/src/cyclop/CMakeLists.txt index 811fc20c..d7715531 100644 --- a/crlcore/src/cyclop/CMakeLists.txt +++ b/crlcore/src/cyclop/CMakeLists.txt @@ -1,8 +1,8 @@ include ( ${QT_USE_FILE} ) - include_directories ( ${Boost_INCLUDE_DIRS} + include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore ${HURRICANE_INCLUDE_DIR} - ${CRLCORE_SOURCE_DIR}/src/ccore + ${Boost_INCLUDE_DIRS} ) set ( mocincludes Cyclop.h diff --git a/crlcore/src/x2y/CMakeLists.txt b/crlcore/src/x2y/CMakeLists.txt index 6361e5a8..f799a096 100644 --- a/crlcore/src/x2y/CMakeLists.txt +++ b/crlcore/src/x2y/CMakeLists.txt @@ -1,8 +1,8 @@ include ( ${QT_USE_FILE} ) - include_directories ( ${Boost_INCLUDE_DIRS} + include_directories ( ${CRLCORE_SOURCE_DIR}/src/ccore ${HURRICANE_INCLUDE_DIR} - ${CRLCORE_SOURCE_DIR}/src/ccore + ${Boost_INCLUDE_DIRS} ) set ( cpps x2y.cpp