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 SRC_STANDARD_CELL_CELLS_H_
22 #define SRC_STANDARD_CELL_CELLS_H_
23 
24 #include "../entity_system/entity_system.h"
25 #include "../entity_system/vector_property.h"
26 
27 namespace ophidian {
28 namespace standard_cell {
29 
30 class cells {
35 public:
37  virtual ~cells();
38  const entity_system::vector_property<std::string>& names() const {
39  return m_names;
40  }
41  std::string name(entity_system::entity e) const {
42  return m_names[m_system.lookup(e)];
43  }
44  const std::vector<entity_system::entity> & pins(entity_system::entity cell) const {
45  return m_pins[m_system.lookup(cell)];
46  }
47  bool sequential(entity_system::entity cell) const {
48  return m_sequential[m_system.lookup(cell)];
49  }
50  void name(entity_system::entity e, std::string name);
51  void insert_pin(entity_system::entity cell, entity_system::entity pin);
52  void pins(entity_system::entity cell, std::vector<entity_system::entity> pins);
53  void sequential(entity_system::entity cell, bool sequential);
54 };
55 
56 } /* namespace standard_cell */
57 } /* namespace ophidian */
58 
59 #endif /* SRC_STANDARD_CELL_CELLS_H_ */
Definition: cells.h:30
entity_system class.
Definition: entity_system.h:40
Definition: pins.h:35
Definition: vector_property.h:160
entity_index lookup(entity e) const
Gets the index of an entity.
Definition: entity_system.h:149