void write_shape(shape const & s, std::ostream &streamToWriteTo) { streamToWriteTo << s.size() << "\n"; for (constShapeIterator shapeIter = s.begin(); shapeIter != s.end(); ++shapeIter) { send_to (*shapeIter, streamToWriteTo); streamToWriteTo << "\n"; } }
shape shape::operator=( shape & s ) { shapetype = s.shapetype; topLeft = s.topLeft; bottomRight = s.bottomRight; allPoints.clear(); for( int i = 0; i < s.size(); i++ ) allPoints.push_back( s[i] ); for( int j = 0; j < s.shapeRecord.size(); j++ ) shapeRecord.push_back( s.shapeRecord[j] ); return *this; }