remove cif directory which is not in src

This commit is contained in:
Damien Dupuis 2010-06-03 14:03:08 +00:00
parent ff40851987
commit be609e2e75
5 changed files with 0 additions and 135 deletions

View File

@ -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)

View File

@ -1,54 +0,0 @@
#include <iostream>
#include <fstream>
#include <ctime>
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<CifPolygon*>::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

View File

@ -1,23 +0,0 @@
#ifndef __CIF_CIRCUIT_H
#define __CIF_CIRCUIT_H
#include <vector>
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<CifPolygon*> _polygons;
};
} // namespace
#endif

View File

@ -1,29 +0,0 @@
#include <iostream>
#include <fstream>
#include <ctime>
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<long,long>(x,y));
}
void CifPolygon::write(ofstream& file) {
file << "L " << _layer << "; P";
// For each point : write point.
for ( vector<pair<long,long> >::iterator it = _points.begin() ; it < _points.end() ; it++ ) {
file << " " << (*it).first << "," << (*it).second;
}
file << ";" << endl;
}
} // namespace

View File

@ -1,20 +0,0 @@
#ifndef __CIF_POLYGON_H
#define __CIF_POLYGON_H
#include <vector>
#include <fstream>
namespace vlsisapd {
class CifPolygon {
public:
CifPolygon(long);
void addPoint (long, long);
void write ( ofstream& );
private:
long _layer;
std::vector<std::pair<long,long> > _points;
};
} // namespace
#endif