layout_pin.hpp 784 B

123456789101112131415161718192021222324252627282930313233
  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_pin.hpp
  8. #ifndef BOOST_POLYGON_TUTORIAL_LAYOUT_PIN_HPP
  9. #define BOOST_POLYGON_TUTORIAL_LAYOUT_PIN_HPP
  10. #include <string>
  11. #include <iostream>
  12. struct layout_pin {
  13. int xl, yl, xh, yh;
  14. std::string layer;
  15. std::string net;
  16. };
  17. inline std::ostream& operator << (std::ostream& o, const layout_pin& r)
  18. {
  19. o << r.xl << " " << r.xh << " " << r.yl << " " << r.yh << " " << r.layer << " " << r.net;
  20. return o;
  21. }
  22. inline std::istream& operator >> (std::istream& i, layout_pin& r)
  23. {
  24. i >> r.xl >> r.xh >> r.yl >> r.yh >> r.layer >> r.net;
  25. return i;
  26. }
  27. #endif