From be609e2e75d68a6bf52590b6d9ab4cd3af1048a1 Mon Sep 17 00:00:00 2001 From: Damien Dupuis Date: Thu, 3 Jun 2010 14:03:08 +0000 Subject: [PATCH] remove cif directory which is not in src --- vlsisapd/cif/CMakeLists.txt | 9 ------- vlsisapd/cif/CifCircuit.cpp | 54 ------------------------------------- vlsisapd/cif/CifCircuit.h | 23 ---------------- vlsisapd/cif/CifPolygon.cpp | 29 -------------------- vlsisapd/cif/CifPolygon.h | 20 -------------- 5 files changed, 135 deletions(-) delete mode 100644 vlsisapd/cif/CMakeLists.txt delete mode 100644 vlsisapd/cif/CifCircuit.cpp delete mode 100644 vlsisapd/cif/CifCircuit.h delete mode 100644 vlsisapd/cif/CifPolygon.cpp delete mode 100644 vlsisapd/cif/CifPolygon.h diff --git a/vlsisapd/cif/CMakeLists.txt b/vlsisapd/cif/CMakeLists.txt deleted file mode 100644 index 0b6489ef..00000000 --- a/vlsisapd/cif/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -INCLUDE_DIRECTORIES(${CHAMS_SOURCE_DIR}/cif) - -SET ( includes CifCircuit.h CifPolygon.h ) -SET ( cpps CifCircuit.cpp CifPolygon.cpp ) - -ADD_LIBRARY(cif ${cpps}) -INSTALL(TARGETS cif DESTINATION lib${LIB_SUFFIX}) - -INSTALL(FILES ${includes} DESTINATION include/vlsisapd/cif) diff --git a/vlsisapd/cif/CifCircuit.cpp b/vlsisapd/cif/CifCircuit.cpp deleted file mode 100644 index 0024edfb..00000000 --- a/vlsisapd/cif/CifCircuit.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include -#include -using namespace std; - -#include "CifCircuit.h" -#include "CifPolygon.h" - -namespace vlsisapd { - -CifCircuit::CifCircuit(string name, string unit, double scale) : _name(name), _unit(unit), _scale(scale) {} - - -bool CifCircuit::addPolygon(CifPolygon* polygon) { - if(polygon) - _polygons.push_back(polygon); - else { - cerr << "[CIF DRIVE ERROR]: cannot add invalid polygon." << endl; - return false; - } - return true; -} - -bool CifCircuit::write(string filename) { - time_t curtime = time(0); - tm now = *localtime(&curtime); - char date[BUFSIZ]={0}; - const char format[]="%d-%b-%Y %H:%M:%S"; - if (!strftime(date, sizeof(date)-1, format, &now)>0) - cerr << "[CIF DRIVE ERROR]: cannot build current date." << endl; - - ofstream file; - file.open(filename.c_str(), ios::out); - // Header - 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; - - // For each Polygon : write polygon. - for ( vector::iterator it = _polygons.begin() ; it < _polygons.end() ; it++ ) { - (*it)->write(file); - } - - // Footer - file << "DF;" << endl - << "C 1;" << endl - << "E" << endl; - - file.close(); - return true; -} -} // namespace - diff --git a/vlsisapd/cif/CifCircuit.h b/vlsisapd/cif/CifCircuit.h deleted file mode 100644 index 3ffaef7b..00000000 --- a/vlsisapd/cif/CifCircuit.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef __CIF_CIRCUIT_H -#define __CIF_CIRCUIT_H - -#include - -namespace vlsisapd { -class CifPolygon; -class CifCircuit { - public: - CifCircuit(string name, string unit, double scale); - - bool addPolygon ( CifPolygon* ); - bool write ( string ); - - private: - string _name; - string _unit; - double _scale; - - std::vector _polygons; -}; -} // namespace -#endif diff --git a/vlsisapd/cif/CifPolygon.cpp b/vlsisapd/cif/CifPolygon.cpp deleted file mode 100644 index 8fc63e1c..00000000 --- a/vlsisapd/cif/CifPolygon.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -#include -using namespace std; - -#include "CifPolygon.h" - -namespace vlsisapd { - -CifPolygon::CifPolygon(long layer) : _layer(layer) {} - - -void CifPolygon::addPoint(long x, long y) { - _points.push_back(pair(x,y)); -} - -void CifPolygon::write(ofstream& file) { - file << "L " << _layer << "; P"; - - // For each point : write point. - for ( vector >::iterator it = _points.begin() ; it < _points.end() ; it++ ) { - file << " " << (*it).first << "," << (*it).second; - } - - file << ";" << endl; -} -} // namespace - - diff --git a/vlsisapd/cif/CifPolygon.h b/vlsisapd/cif/CifPolygon.h deleted file mode 100644 index 4dc82981..00000000 --- a/vlsisapd/cif/CifPolygon.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __CIF_POLYGON_H -#define __CIF_POLYGON_H - -#include -#include - -namespace vlsisapd { -class CifPolygon { - public: - CifPolygon(long); - - void addPoint (long, long); - void write ( ofstream& ); - - private: - long _layer; - std::vector > _points; -}; -} // namespace -#endif