layout_rectangle.hpp 776 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. Copyright 2010 Intel Corporation
  3. Use, modification and distribution are subject to the Boost Software License,
  4. Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. */
  7. //layout_rectangle.hpp
  8. #ifndef BOOST_POLYGON_TUTORIAL_LAYOUT_RECTANGLE_HPP
  9. #define BOOST_POLYGON_TUTORIAL_LAYOUT_RECTANGLE_HPP
  10. #include <string>
  11. #include <iostream>
  12. struct layout_rectangle {
  13. int xl, yl, xh, yh;
  14. std::string layer;
  15. };
  16. inline std::ostream& operator << (std::ostream& o, const layout_rectangle& r)
  17. {
  18. o << r.xl << " " << r.xh << " " << r.yl << " " << r.yh << " " << r.layer;
  19. return o;
  20. }
  21. inline std::istream& operator >> (std::istream& i, layout_rectangle& r)
  22. {
  23. i >> r.xl >> r.xh >> r.yl >> r.yh >> r.layer;
  24. return i;
  25. }
  26. #endif