From 380f9470e4bf3535ce140e0c02e865d2a5efb044 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 18 May 2010 15:10:35 +0000 Subject: [PATCH] File & namespace renaming. --- vlsisapd/CMakeLists.txt | 4 +- vlsisapd/agds/CMakeLists.txt | 2 +- vlsisapd/agds/GdsElement.h | 2 +- vlsisapd/agds/GdsLibrary.cpp | 2 +- vlsisapd/agds/GdsLibrary.h | 2 +- vlsisapd/agds/GdsRectangle.cpp | 2 +- vlsisapd/agds/GdsRectangle.h | 2 +- vlsisapd/agds/GdsStructure.cpp | 2 +- vlsisapd/agds/GdsStructure.h | 2 +- vlsisapd/cif/CMakeLists.txt | 2 +- vlsisapd/cif/CifCircuit.cpp | 4 +- vlsisapd/cif/CifCircuit.h | 2 +- vlsisapd/cif/CifPolygon.cpp | 2 +- vlsisapd/cif/CifPolygon.h | 2 +- vlsisapd/cmake_modules/CMakeLists.txt | 2 +- vlsisapd/cmake_modules/FindVLSISAPD.cmake | 74 +++++++++---------- vlsisapd/dtr/src/CMakeLists.txt | 12 +-- vlsisapd/dtr/src/Name.cpp | 2 +- vlsisapd/dtr/src/PyTechno.cpp | 6 +- vlsisapd/dtr/src/Techno.cpp | 6 +- .../src/{io => vlsisapd}/dtr/DTRException.h | 0 vlsisapd/dtr/src/{io => vlsisapd}/dtr/Name.h | 2 +- vlsisapd/dtr/src/{io => vlsisapd}/dtr/Rules.h | 0 .../dtr/src/{io => vlsisapd}/dtr/Techno.h | 2 +- vlsisapd/openChams/CMakeLists.txt | 2 +- vlsisapd/openChams/Circuit.h | 2 +- 26 files changed, 71 insertions(+), 71 deletions(-) rename vlsisapd/dtr/src/{io => vlsisapd}/dtr/DTRException.h (100%) rename vlsisapd/dtr/src/{io => vlsisapd}/dtr/Name.h (95%) rename vlsisapd/dtr/src/{io => vlsisapd}/dtr/Rules.h (100%) rename vlsisapd/dtr/src/{io => vlsisapd}/dtr/Techno.h (97%) diff --git a/vlsisapd/CMakeLists.txt b/vlsisapd/CMakeLists.txt index 1c7e9d58..7d00322d 100644 --- a/vlsisapd/CMakeLists.txt +++ b/vlsisapd/CMakeLists.txt @@ -1,8 +1,8 @@ -PROJECT(IO) +PROJECT(VLSISAPD) CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0) -LIST(INSERT CMAKE_MODULE_PATH 0 "${IO_SOURCE_DIR}/cmake/Modules/") +LIST(INSERT CMAKE_MODULE_PATH 0 "${VLSISAPD_SOURCE_DIR}/cmake/Modules/") FIND_PACKAGE(LibXml2 REQUIRED) diff --git a/vlsisapd/agds/CMakeLists.txt b/vlsisapd/agds/CMakeLists.txt index a5f3e9a7..4a6a9323 100644 --- a/vlsisapd/agds/CMakeLists.txt +++ b/vlsisapd/agds/CMakeLists.txt @@ -6,4 +6,4 @@ SET ( cpps GdsLibrary.cpp GdsStructure.cpp GdsRectangle.cpp ) ADD_LIBRARY(agds ${cpps}) INSTALL(TARGETS agds DESTINATION lib${LIB_SUFFIX}) -INSTALL(FILES ${includes} DESTINATION include/io/agds) +INSTALL(FILES ${includes} DESTINATION include/vlsisapd/agds) diff --git a/vlsisapd/agds/GdsElement.h b/vlsisapd/agds/GdsElement.h index 38253bd8..a69c63fe 100644 --- a/vlsisapd/agds/GdsElement.h +++ b/vlsisapd/agds/GdsElement.h @@ -1,7 +1,7 @@ #ifndef __GDS_ELEMENT_H #define __GDS_ELEMENT_H -namespace IO { +namespace vlsisapd { class GdsElement { protected: inline GdsElement (int layer); diff --git a/vlsisapd/agds/GdsLibrary.cpp b/vlsisapd/agds/GdsLibrary.cpp index 1808a06b..5908ad53 100644 --- a/vlsisapd/agds/GdsLibrary.cpp +++ b/vlsisapd/agds/GdsLibrary.cpp @@ -5,7 +5,7 @@ using namespace std; #include "GdsLibrary.h" -namespace IO { +namespace vlsisapd { GdsLibrary::GdsLibrary(string libName) : _libName(libName) diff --git a/vlsisapd/agds/GdsLibrary.h b/vlsisapd/agds/GdsLibrary.h index 1254c54e..51d491da 100644 --- a/vlsisapd/agds/GdsLibrary.h +++ b/vlsisapd/agds/GdsLibrary.h @@ -6,7 +6,7 @@ using namespace std; #include "GdsStructure.h" -namespace IO { +namespace vlsisapd { class GdsLibrary { public: GdsLibrary(string libName); diff --git a/vlsisapd/agds/GdsRectangle.cpp b/vlsisapd/agds/GdsRectangle.cpp index 49478889..6f371b0c 100644 --- a/vlsisapd/agds/GdsRectangle.cpp +++ b/vlsisapd/agds/GdsRectangle.cpp @@ -4,7 +4,7 @@ using namespace std; #include "GdsRectangle.h" -namespace IO { +namespace vlsisapd { GdsElement::~GdsElement () { } GdsRectangle::GdsRectangle(int layer, double xmin, double ymin, double xmax, double ymax) diff --git a/vlsisapd/agds/GdsRectangle.h b/vlsisapd/agds/GdsRectangle.h index f2563128..c656aaea 100644 --- a/vlsisapd/agds/GdsRectangle.h +++ b/vlsisapd/agds/GdsRectangle.h @@ -5,7 +5,7 @@ #include "GdsElement.h" -namespace IO { +namespace vlsisapd { class GdsRectangle : public GdsElement { public: GdsRectangle (int layer, double xmin, double ymin, double xmax, double ymax); diff --git a/vlsisapd/agds/GdsStructure.cpp b/vlsisapd/agds/GdsStructure.cpp index ad287420..16e1c6b9 100644 --- a/vlsisapd/agds/GdsStructure.cpp +++ b/vlsisapd/agds/GdsStructure.cpp @@ -4,7 +4,7 @@ using namespace std; #include "GdsStructure.h" -namespace IO { +namespace vlsisapd { GdsStructure::GdsStructure(string strName) : _strName(strName) {} diff --git a/vlsisapd/agds/GdsStructure.h b/vlsisapd/agds/GdsStructure.h index 85db0221..70c0d1bc 100644 --- a/vlsisapd/agds/GdsStructure.h +++ b/vlsisapd/agds/GdsStructure.h @@ -8,7 +8,7 @@ using namespace std; #include "GdsElement.h" -namespace IO { +namespace vlsisapd { class GdsStructure { public: GdsStructure(string strName); diff --git a/vlsisapd/cif/CMakeLists.txt b/vlsisapd/cif/CMakeLists.txt index b17298b7..0b6489ef 100644 --- a/vlsisapd/cif/CMakeLists.txt +++ b/vlsisapd/cif/CMakeLists.txt @@ -6,4 +6,4 @@ SET ( cpps CifCircuit.cpp CifPolygon.cpp ) ADD_LIBRARY(cif ${cpps}) INSTALL(TARGETS cif DESTINATION lib${LIB_SUFFIX}) -INSTALL(FILES ${includes} DESTINATION include/io/cif) +INSTALL(FILES ${includes} DESTINATION include/vlsisapd/cif) diff --git a/vlsisapd/cif/CifCircuit.cpp b/vlsisapd/cif/CifCircuit.cpp index e5da9268..0024edfb 100644 --- a/vlsisapd/cif/CifCircuit.cpp +++ b/vlsisapd/cif/CifCircuit.cpp @@ -6,7 +6,7 @@ using namespace std; #include "CifCircuit.h" #include "CifPolygon.h" -namespace IO { +namespace vlsisapd { CifCircuit::CifCircuit(string name, string unit, double scale) : _name(name), _unit(unit), _scale(scale) {} @@ -32,7 +32,7 @@ bool CifCircuit::write(string filename) { ofstream file; file.open(filename.c_str(), ios::out); // Header - file << "(CIF file written on " << date << " by IO_CIF_DRIVER);" << endl + file << "(CIF file written on " << date << " by VLSISAPD_CIF_DRIVER);" << endl << "(Units: " << _unit << " - UU/DB Scale: " << _scale << ");" << endl << "DS 1 1 1;" << endl << "9 " << _name << ";" << endl; diff --git a/vlsisapd/cif/CifCircuit.h b/vlsisapd/cif/CifCircuit.h index 011d53ac..3ffaef7b 100644 --- a/vlsisapd/cif/CifCircuit.h +++ b/vlsisapd/cif/CifCircuit.h @@ -3,7 +3,7 @@ #include -namespace IO { +namespace vlsisapd { class CifPolygon; class CifCircuit { public: diff --git a/vlsisapd/cif/CifPolygon.cpp b/vlsisapd/cif/CifPolygon.cpp index 7474e540..8fc63e1c 100644 --- a/vlsisapd/cif/CifPolygon.cpp +++ b/vlsisapd/cif/CifPolygon.cpp @@ -5,7 +5,7 @@ using namespace std; #include "CifPolygon.h" -namespace IO { +namespace vlsisapd { CifPolygon::CifPolygon(long layer) : _layer(layer) {} diff --git a/vlsisapd/cif/CifPolygon.h b/vlsisapd/cif/CifPolygon.h index 94b14e09..4dc82981 100644 --- a/vlsisapd/cif/CifPolygon.h +++ b/vlsisapd/cif/CifPolygon.h @@ -4,7 +4,7 @@ #include #include -namespace IO { +namespace vlsisapd { class CifPolygon { public: CifPolygon(long); diff --git a/vlsisapd/cmake_modules/CMakeLists.txt b/vlsisapd/cmake_modules/CMakeLists.txt index 32a1e191..9a8e8cfb 100644 --- a/vlsisapd/cmake_modules/CMakeLists.txt +++ b/vlsisapd/cmake_modules/CMakeLists.txt @@ -1 +1 @@ -install(FILES FindIO.cmake DESTINATION share/cmake/Modules) +install(FILES FindVLSISAPD.cmake DESTINATION share/cmake/Modules) diff --git a/vlsisapd/cmake_modules/FindVLSISAPD.cmake b/vlsisapd/cmake_modules/FindVLSISAPD.cmake index 602a57f3..bed2785b 100644 --- a/vlsisapd/cmake_modules/FindVLSISAPD.cmake +++ b/vlsisapd/cmake_modules/FindVLSISAPD.cmake @@ -1,11 +1,11 @@ -# - Try to find the IO libraries +# - Try to find the VLSISAPD libraries # Once done this will define # -# IO_FOUND - system has the IO library -# IO_INCLUDE_DIR - the IO include directory -# IO_LIBRARIES - The libraries needed to use IO +# VLSISAPD_FOUND - system has the VLSISAPD library +# VLSISAPD_INCLUDE_DIR - the VLSISAPD include directory +# VLSISAPD_LIBRARIES - The libraries needed to use VLSISAPD -SET(IO_FOUND FALSE) +SET(VLSISAPD_FOUND FALSE) # Setup the DIR_SEARCH_PATH. MACRO(SETUP_SEARCH_DIR project) @@ -30,49 +30,49 @@ MACRO(SET_FOUND project) ENDIF(${project}_INCLUDE_DIR AND ${project}_LIBRARY) ENDMACRO(SET_FOUND project) -SETUP_SEARCH_DIR(IO) +SETUP_SEARCH_DIR(VLSISAPD) -IF(IO_DIR_SEARCH) +IF(VLSISAPD_DIR_SEARCH) # AGDS - FIND_PATH (AGDS_INCLUDE_DIR NAMES io/agds/GdsLibrary.h PATHS ${IO_DIR_SEARCH} PATH_SUFFIXES include) - FIND_LIBRARY(AGDS_LIBRARY NAMES agds PATHS ${IO_DIR_SEARCH} PATH_SUFFIXES lib) - SET_FOUND(AGDS) + FIND_PATH (AGDS_INCLUDE_DIR NAMES vlsisapd/agds/GdsLibrary.h PATHS ${VLSISAPD_DIR_SEARCH} PATH_SUFFIXES include) + FIND_LIBRARY(AGDS_LIBRARY NAMES agds PATHS ${VLSISAPD_DIR_SEARCH} PATH_SUFFIXES lib) + SET_FOUND (AGDS) # CIF - FIND_PATH (CIF_INCLUDE_DIR NAMES io/cif/CifCircuit.h PATHS ${IO_DIR_SEARCH} PATH_SUFFIXES include) - FIND_LIBRARY(CIF_LIBRARY NAMES cif PATHS ${IO_DIR_SEARCH} PATH_SUFFIXES lib) - SET_FOUND(CIF) + FIND_PATH (CIF_INCLUDE_DIR NAMES vlsisapd/cif/CifCircuit.h PATHS ${VLSISAPD_DIR_SEARCH} PATH_SUFFIXES include) + FIND_LIBRARY(CIF_LIBRARY NAMES cif PATHS ${VLSISAPD_DIR_SEARCH} PATH_SUFFIXES lib) + SET_FOUND (CIF) # OPENCHAMS - FIND_PATH (OPENCHAMS_INCLUDE_DIR NAMES io/openChams/Circuit.h PATHS ${IO_DIR_SEARCH} PATH_SUFFIXES include) - FIND_LIBRARY(OPENCHAMS_LIBRARY NAMES openChams PATHS ${IO_DIR_SEARCH} PATH_SUFFIXES lib) - SET_FOUND(OPENCHAMS) + FIND_PATH (OPENCHAMS_INCLUDE_DIR NAMES vlsisapd/openChams/Circuit.h PATHS ${VLSISAPD_DIR_SEARCH} PATH_SUFFIXES include) + FIND_LIBRARY(OPENCHAMS_LIBRARY NAMES openChams PATHS ${VLSISAPD_DIR_SEARCH} PATH_SUFFIXES lib) + SET_FOUND (OPENCHAMS) # DTR - FIND_PATH (DTR_INCLUDE_DIR NAMES io/dtr/Techno.h PATHS ${IO_DIR_SEARCH} PATH_SUFFIXES include) - FIND_LIBRARY(DTR_LIBRARY NAMES dtr PATHS ${IO_DIR_SEARCH} PATH_SUFFIXES lib) - SET_FOUND(DTR) + FIND_PATH (DTR_INCLUDE_DIR NAMES vlsisapd/dtr/Techno.h PATHS ${VLSISAPD_DIR_SEARCH} PATH_SUFFIXES include) + FIND_LIBRARY(DTR_LIBRARY NAMES dtr PATHS ${VLSISAPD_DIR_SEARCH} PATH_SUFFIXES lib) + SET_FOUND (DTR) IF(AGDS_FOUND AND CIF_FOUND AND OPENCHAMS_FOUND AND DTR_FOUND) - SET(IO_FOUND TRUE) + SET(VLSISAPD_FOUND TRUE) ELSE(AGDS_FOUND AND CIF_FOUND AND OPENCHAMS_FOUND AND DTR_FOUND) - SET(IO_FOUND FALSE) + SET(VLSISAPD_FOUND FALSE) ENDIF(AGDS_FOUND AND CIF_FOUND AND OPENCHAMS_FOUND AND DTR_FOUND) -ELSE(IO_DIR_SEARCH) - MESSAGE("-- Cannot find IO_LIBRARIES since IO_DIR_SEARCH is not defined.") -ENDIF(IO_DIR_SEARCH) +ELSE(VLSISAPD_DIR_SEARCH) + MESSAGE("-- Cannot find VLSISAPD_LIBRARIES since VLSISAPD_DIR_SEARCH is not defined.") +ENDIF(VLSISAPD_DIR_SEARCH) -IF (NOT IO_FOUND) - SET(IO_MESSAGE - "IO libraries were not found. Make sure IO_TOP env variable is set.") - IF (NOT IO_FIND_QUIETLY) - MESSAGE(STATUS "${IO_MESSAGE}") - ELSE(NOT IO_FIND_QUIETLY) - IF(IO_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "${IO_MESSAGE}") - ENDIF(IO_FIND_REQUIRED) - ENDIF(NOT IO_FIND_QUIETLY) -ELSE (NOT IO_FOUND) - MESSAGE(STATUS "IO library was found in ${IO_DIR_SEARCH}") -ENDIF (NOT IO_FOUND) +IF (NOT VLSISAPD_FOUND) + SET(VLSISAPD_MESSAGE + "VLSISAPD libraries were not found. Make sure VLSISAPD_TOP env variable is set.") + IF (NOT VLSISAPD_FIND_QUIETLY) + MESSAGE(STATUS "${VLSISAPD_MESSAGE}") + ELSE(NOT VLSISAPD_FIND_QUIETLY) + IF(VLSISAPD_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "${VLSISAPD_MESSAGE}") + ENDIF(VLSISAPD_FIND_REQUIRED) + ENDIF(NOT VLSISAPD_FIND_QUIETLY) +ELSE (NOT VLSISAPD_FOUND) + MESSAGE(STATUS "VLSISAPD library was found in ${VLSISAPD_DIR_SEARCH}") +ENDIF (NOT VLSISAPD_FOUND) diff --git a/vlsisapd/dtr/src/CMakeLists.txt b/vlsisapd/dtr/src/CMakeLists.txt index 96a2e3b6..0b552f6d 100644 --- a/vlsisapd/dtr/src/CMakeLists.txt +++ b/vlsisapd/dtr/src/CMakeLists.txt @@ -7,12 +7,12 @@ ELSE (Boost_FOUND) ENDIF (Boost_FOUND) -INCLUDE_DIRECTORIES(${IO_SOURCE_DIR}/dtr/src ${LIBXML2_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH}) +INCLUDE_DIRECTORIES(${VLSISAPD_SOURCE_DIR}/dtr/src ${LIBXML2_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH}) -SET ( hpps io/dtr/Techno.h - io/dtr/Rules.h - io/dtr/Name.h - io/dtr/DTRException.h ) +SET ( hpps vlsisapd/dtr/Techno.h + vlsisapd/dtr/Rules.h + vlsisapd/dtr/Name.h + vlsisapd/dtr/DTRException.h ) SET ( cpps Techno.cpp Name.cpp ) @@ -33,4 +33,4 @@ TARGET_LINK_LIBRARIES(pyDTR dtr ${LIBXML2_LIBRARIES} ${Boost_LIBRARIES} ${PYTHON INSTALL(TARGETS pyDTR DESTINATION lib${LIB_SUFFIX}/python) ENDIF(Boost_FOUND) -INSTALL(FILES ${hpps} DESTINATION include/io/dtr) +INSTALL(FILES ${hpps} DESTINATION include/vlsisapd/dtr) diff --git a/vlsisapd/dtr/src/Name.cpp b/vlsisapd/dtr/src/Name.cpp index 1353865f..cee517b5 100644 --- a/vlsisapd/dtr/src/Name.cpp +++ b/vlsisapd/dtr/src/Name.cpp @@ -9,7 +9,7 @@ using namespace std; -#include "io/dtr/Name.h" +#include "vlsisapd/dtr/Name.h" namespace DTR { unsigned long Name::_globalId = 0; diff --git a/vlsisapd/dtr/src/PyTechno.cpp b/vlsisapd/dtr/src/PyTechno.cpp index 650a3f67..c6fe5d78 100644 --- a/vlsisapd/dtr/src/PyTechno.cpp +++ b/vlsisapd/dtr/src/PyTechno.cpp @@ -1,9 +1,9 @@ #include using namespace boost::python; -#include "io/dtr/Techno.h" -#include "io/dtr/Rules.h" -#include "io/dtr/DTRException.h" +#include "vlsisapd/dtr/Techno.h" +#include "vlsisapd/dtr/Rules.h" +#include "vlsisapd/dtr/DTRException.h" namespace DTR { void translator(DTRException const& e) { diff --git a/vlsisapd/dtr/src/Techno.cpp b/vlsisapd/dtr/src/Techno.cpp index 7cecc0b2..5f80d5e7 100644 --- a/vlsisapd/dtr/src/Techno.cpp +++ b/vlsisapd/dtr/src/Techno.cpp @@ -17,9 +17,9 @@ using namespace std; #include #include -#include "io/dtr/Techno.h" -#include "io/dtr/Rules.h" -#include "io/dtr/DTRException.h" +#include "vlsisapd/dtr/Techno.h" +#include "vlsisapd/dtr/Rules.h" +#include "vlsisapd/dtr/DTRException.h" namespace { template T getValue(xmlChar* str) { diff --git a/vlsisapd/dtr/src/io/dtr/DTRException.h b/vlsisapd/dtr/src/vlsisapd/dtr/DTRException.h similarity index 100% rename from vlsisapd/dtr/src/io/dtr/DTRException.h rename to vlsisapd/dtr/src/vlsisapd/dtr/DTRException.h diff --git a/vlsisapd/dtr/src/io/dtr/Name.h b/vlsisapd/dtr/src/vlsisapd/dtr/Name.h similarity index 95% rename from vlsisapd/dtr/src/io/dtr/Name.h rename to vlsisapd/dtr/src/vlsisapd/dtr/Name.h index 30e2bc7f..e8c78446 100644 --- a/vlsisapd/dtr/src/io/dtr/Name.h +++ b/vlsisapd/dtr/src/vlsisapd/dtr/Name.h @@ -13,7 +13,7 @@ #include #include -#include "io/dtr/DTRException.h" +#include "vlsisapd/dtr/DTRException.h" namespace DTR { class Name { diff --git a/vlsisapd/dtr/src/io/dtr/Rules.h b/vlsisapd/dtr/src/vlsisapd/dtr/Rules.h similarity index 100% rename from vlsisapd/dtr/src/io/dtr/Rules.h rename to vlsisapd/dtr/src/vlsisapd/dtr/Rules.h diff --git a/vlsisapd/dtr/src/io/dtr/Techno.h b/vlsisapd/dtr/src/vlsisapd/dtr/Techno.h similarity index 97% rename from vlsisapd/dtr/src/io/dtr/Techno.h rename to vlsisapd/dtr/src/vlsisapd/dtr/Techno.h index 82eae78f..8c676807 100644 --- a/vlsisapd/dtr/src/io/dtr/Techno.h +++ b/vlsisapd/dtr/src/vlsisapd/dtr/Techno.h @@ -15,7 +15,7 @@ #include #include -#include "io/dtr/Name.h" +#include "vlsisapd/dtr/Name.h" namespace DTR { class Rule; diff --git a/vlsisapd/openChams/CMakeLists.txt b/vlsisapd/openChams/CMakeLists.txt index 70e0f95f..5466cd29 100644 --- a/vlsisapd/openChams/CMakeLists.txt +++ b/vlsisapd/openChams/CMakeLists.txt @@ -30,4 +30,4 @@ TARGET_LINK_LIBRARIES(openChams ${LIBXML2_LIBRARIES}) INSTALL(TARGETS openChams DESTINATION lib${LIB_SUFFIX} ) -INSTALL(FILES ${includes} DESTINATION include/io/openChams) +INSTALL(FILES ${includes} DESTINATION include/vlsisapd/openChams) diff --git a/vlsisapd/openChams/Circuit.h b/vlsisapd/openChams/Circuit.h index 01c1da4b..bcf6a5ef 100644 --- a/vlsisapd/openChams/Circuit.h +++ b/vlsisapd/openChams/Circuit.h @@ -94,6 +94,6 @@ inline void Circuit::setSchematic(Schematic* schem) { _schematic = schem; inline void Circuit::setSizing(Sizing* sizing) { _sizing = sizing; }; -} // namespace IO +} // namespace OpenChams #endif