coriolis/vlsisapd/agds/GdsRectangle.cpp

35 lines
945 B
C++
Raw Normal View History

2009-12-11 06:48:37 -06:00
#include <iostream>
#include <iomanip>
using namespace std;
#include "GdsRectangle.h"
2010-05-18 10:10:35 -05:00
namespace vlsisapd {
GdsElement::~GdsElement () { }
2009-12-11 06:48:37 -06:00
GdsRectangle::GdsRectangle(int layer, double xmin, double ymin, double xmax, double ymax)
: GdsElement(layer)
, _xmin(xmin)
, _ymin(ymin)
, _xmax(xmax)
, _ymax(ymax) {}
GdsRectangle::~GdsRectangle () { }
2009-12-11 06:48:37 -06:00
bool GdsRectangle::write(ofstream &file) {
file << "BOUNDARY;" << endl
<< "LAYER " << _layer << ";" << endl
<< "DATATYPE 0;" << endl
<< "XY 5;" << endl
<< " X: " << _xmin << ";\tY: " << _ymin << ";" << endl
<< " X: " << _xmin << ";\tY: " << _ymax << ";" << endl
<< " X: " << _xmax << ";\tY: " << _ymax << ";" << endl
<< " X: " << _xmax << ";\tY: " << _ymin << ";" << endl
<< " X: " << _xmin << ";\tY: " << _ymin << ";" << endl
<< "ENDEL;" << endl
<< endl;
return true;
}
}