MCPcopy Create free account
hub / github.com/KLayout/klayout / array

Class array

src/db/db/dbArray.h:1611–2722  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1609
1610template <class Obj, class Trans>
1611struct array
1612{
1613 typedef typename Trans::coord_type coord_type;
1614 typedef db::box <coord_type> box_type;
1615 typedef db::point <coord_type> point_type;
1616 typedef db::vector <coord_type> vector_type;
1617 typedef db::complex_trans <coord_type, coord_type> complex_trans_type;
1618 typedef db::simple_trans <coord_type> simple_trans_type;
1619 typedef db::disp_trans <coord_type> disp_trans_type;
1620 typedef db::unit_trans <coord_type> unit_trans_type;
1621 typedef Trans trans_type;
1622 typedef db::array_iterator <coord_type, Trans> iterator;
1623 typedef Obj object_type;
1624 typedef db::object_tag< array<Obj, Trans> > tag;
1625 typedef db::iterated_array<coord_type> iterated_array_type;
1626 typedef db::iterated_complex_array<coord_type> iterated_complex_array_type;
1627
1628 /**
1629 * @brief The default constructor
1630 */
1631 array ()
1632 : m_obj (), m_trans (), mp_base (0)
1633 {
1634 // .. nothing yet ..
1635 }
1636
1637 /**
1638 * @brief The array constructor
1639 *
1640 * The array object takes over the ownership over the
1641 * basic_array object.
1642 *
1643 * @param obj The object to put into an array
1644 * @param base The basic_array object that describes the array further
1645 */
1646 array (const Obj &obj, const trans_type &trans, basic_array <coord_type> *base)
1647 : m_obj (obj), m_trans (trans), mp_base (base)
1648 {
1649 // .. nothing yet ..
1650 }
1651
1652 /**
1653 * @brief The regular array constructor
1654 *
1655 * This is basically a convenience function that creates
1656 * an appropriate basic_array object.
1657 */
1658 array (const Obj &obj, const trans_type &trans, const vector_type &a, const vector_type &b, unsigned long amax, unsigned long bmax)
1659 : m_obj (obj), m_trans (trans), mp_base (new regular_array <coord_type> (a, b, amax, bmax))
1660 {
1661 // .. nothing yet ..
1662 }
1663
1664 /**
1665 * @brief The regular array constructor using an array repository
1666 *
1667 * This is basically a convenience function that creates
1668 * an appropriate basic_array object.

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected