Ophidian
 All Classes Namespaces Functions
cells.h
1 /*
2  * Copyright 2016 Ophidian
3 Licensed to the Apache Software Foundation (ASF) under one
4 or more contributor license agreements. See the NOTICE file
5 distributed with this work for additional information
6 regarding copyright ownership. The ASF licenses this file
7 to you under the Apache License, Version 2.0 (the
8 "License"); you may not use this file except in compliance
9 with the License. You may obtain a copy of the License at
10 
11  http://www.apache.org/licenses/LICENSE-2.0
12 
13 Unless required by applicable law or agreed to in writing,
14 software distributed under the License is distributed on an
15 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 KIND, either express or implied. See the License for the
17 specific language governing permissions and limitations
18 under the License.
19  */
20 
21 #ifndef OPHIDIAN_ABACUS_CELLS_H
22 #define OPHIDIAN_ABACUS_CELLS_H
23 
24 #include <vector_property.h>
25 #include "entity_system.h"
26 #include "../../../geometry/geometry.h"
27 
28 namespace ophidian {
29  namespace placement {
30  namespace legalization {
31  namespace abacus {
32  class cells {
33  using point = geometry::point<double>;
34 
36 
42 
43  public:
45 
46  entity_system::entity netlist_cell(entity_system::entity cell) const {
47  return m_netlist_cells[m_system.lookup(cell)];
48  }
49  void netlist_cell(entity_system::entity cell, entity_system::entity netlist_cell);
50 
51  unsigned order_id(entity_system::entity cell) const {
52  return m_order_ids[m_system.lookup(cell)];
53  }
54  void order_id(entity_system::entity cell, unsigned order_id);
55 
56  point position(entity_system::entity cell) const {
57  return m_positions[m_system.lookup(cell)];
58  }
59  void position(entity_system::entity cell, point position);
60 
61  double width(entity_system::entity cell) const {
62  return m_widths[m_system.lookup(cell)];
63  }
64  void width(entity_system::entity cell, double width);
65 
66  double weight(entity_system::entity cell) const {
67  return m_weights[m_system.lookup(cell)];
68  }
69  void weight(entity_system::entity cell, double weight);
70  };
71  }
72  }
73  }
74 }
75 
76 
77 #endif //OPHIDIAN_CELLS_H
entity_system class.
Definition: entity_system.h:40
Definition: abacus.h:92
entity_index lookup(entity e) const
Gets the index of an entity.
Definition: entity_system.h:149