Hurricane VLSI Database


Library.h
1// ****************************************************************************************************
2// File: ./hurricane/Library.h
3// Authors: R. Escassut
4// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
5//
6// This file is part of Hurricane.
7//
8// Hurricane is free software: you can redistribute it and/or modify it under the terms of the GNU
9// Lesser General Public License as published by the Free Software Foundation, either version 3 of the
10// License, or (at your option) any later version.
11//
12// Hurricane is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
13// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU
14// General Public License for more details.
15//
16// You should have received a copy of the Lesser GNU General Public License along with Hurricane. If
17// not, see <http://www.gnu.org/licenses/>.
18// ****************************************************************************************************
19
20#ifndef HURRICANE_LIBRARY
21#define HURRICANE_LIBRARY
22
23#include "hurricane/DBo.h"
24#include "hurricane/Libraries.h"
25#include "hurricane/Cell.h"
26#include "hurricane/IntrusiveMap.h"
27
28namespace Hurricane {
29
30class DataBase;
31
32
33
34// ****************************************************************************************************
35// Library declaration
36// ****************************************************************************************************
37
38class Library : public DBo {
39// ***********************
40
41// Types
42// *****
43
44 public: typedef DBo Inherit;
45
46 public: class LibraryMap : public IntrusiveMap<Name, Library> {
47 // **********************************************************
48
49 public: typedef IntrusiveMap<Name, Library> Inherit;
50
51 public: LibraryMap();
52
53 public: virtual Name _getKey(Library* library) const;
54 public: virtual unsigned _getHashValue(Name name) const;
55 public: virtual Library* _getNextElement(Library* library) const;
56 public: virtual void _setNextElement(Library* library, Library* nextLibrary) const;
57
58 };
59
60 public: class CellMap : public IntrusiveMap<Name, Cell> {
61 // ****************************************************
62
63 public: typedef IntrusiveMap<Name, Cell> Inherit;
64
65 public: CellMap();
66
67 public: virtual Name _getKey(Cell* cell) const;
68 public: virtual unsigned _getHashValue(Name name) const;
69 public: virtual Cell* _getNextElement(Cell* cell) const;
70 public: virtual void _setNextElement(Cell* cell, Cell* nextCell) const;
71
72 };
73
74// Attributes
75// **********
76
77 private: DataBase* _dataBase;
78 private: Library* _library;
79 private: Name _name;
80 private: LibraryMap _libraryMap;
81 private: CellMap _cellMap;
82 private: Library* _nextOfLibraryLibraryMap;
83
84// Constructors
85// ************
86
87 protected: Library(DataBase* dataBase, Library* library, const Name& name);
88
89 public: static Library* create(DataBase* dataBase, const Name& name);
90 public: static Library* create(Library* library, const Name& name);
91
92// Accessors
93// *********
94
95 public: DataBase* getDataBase() const {return _dataBase;};
96 public: Library* getLibrary() const {return _library;};
97 public: const Name& getName() const {return _name;};
98 public: string getHierarchicalName () const;
99 public: Library* getLibrary(const Name& name) const {return _libraryMap.getElement(name);};
100 public: Libraries getLibraries() const {return _libraryMap.getElements();};
101 public: Cell* getCell(const Name& name) const {return _cellMap.getElement(name);};
102 public: Cells getCells() const {return _cellMap.getElements();};
103
104// Updators
105// ********
106
107 public: void setName(const Name& name);
108
109// Others
110// ******
111
112 protected: virtual void _postCreate();
113
114 protected: virtual void _preDestroy();
115
116 public: virtual string _getTypeName() const {return _TName("Library");};
117 public: virtual string _getString() const;
118 public: virtual Record* _getRecord() const;
119 public: virtual void _toJson( JsonWriter* ) const;
120 public: LibraryMap& _getLibraryMap() {return _libraryMap;};
121 public: CellMap& _getCellMap() {return _cellMap;};
122 public: Library* _getNextOfLibraryLibraryMap() const {return _nextOfLibraryLibraryMap;};
123
124 public: void _setNextOfLibraryLibraryMap(Library* library) {_nextOfLibraryLibraryMap = library;};
125
126};
127
128
129class JsonLibrary : public JsonDBo {
130// *******************************
131
132 public: static void initialize();
133 public: JsonLibrary(unsigned long flags);
134 public: virtual string getTypeName() const;
135 public: virtual JsonLibrary* clone(unsigned long) const;
136 public: virtual void toData(JsonStack&);
137};
138
139
140} // End of Hurricane namespace.
141
142
143INSPECTOR_P_SUPPORT(Hurricane::Library);
144INSPECTOR_P_SUPPORT(Hurricane::Library::LibraryMap);
145INSPECTOR_P_SUPPORT(Hurricane::Library::CellMap);
146
147#endif // HURRICANE_LIBRARY
148
149
150// ****************************************************************************************************
151// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
152// ****************************************************************************************************
The model (API).
Definition Cell.h:64
The whole DataBase (API).
Definition DataBase.h:40
virtual std::string getTypeName() const =0
Library description (API).
Definition Library.h:38
void setName(const Name &name)
const Name & getName() const
Definition Library.h:97
Cell * getCell(const Name &name) const
Definition Library.h:101
DBo Inherit
Definition Library.h:44
Libraries getLibraries() const
Definition Library.h:100
Library * getLibrary() const
Definition Library.h:96
DataBase * getDataBase() const
Definition Library.h:95
Library * getLibrary(const Name &name) const
Definition Library.h:99
static Library * create(DataBase *dataBase, const Name &name)
Cells getCells() const
Definition Library.h:102
static Library * create(Library *library, const Name &name)
Name description (API).
Definition Name.h:35
Contains Almost Everything.
Definition BasicLayer.h:39
GenericCollection< Cell * > Cells
Definition Cells.h:35
GenericCollection< Library * > Libraries
Definition Libraries.h:35


Generated by doxygen 1.16.1 on Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved