Hurricane VLSI Database


DataBase.h
1// ****************************************************************************************************
2// File: ./hurricane/DataBase.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_DATA_BASE
21#define HURRICANE_DATA_BASE
22
23#include <functional>
24#include <map>
25#include "hurricane/DBo.h"
26#include "hurricane/DbU.h"
27
28namespace Hurricane {
29
30class Cell;
31class Library;
32class Technology;
33
34
35
36// ****************************************************************************************************
37// DataBase declaration
38// ****************************************************************************************************
39
40class DataBase : public DBo {
41// ************************
42 private:
43 static FastRTTI _fastRTTI;
44 public:
45 static inline const FastRTTI& fastRTTI ();
46 virtual const FastRTTI& vfastRTTI () const;
47
48// Types
49// *****
50
51 public: typedef DBo Inherit;
52 public: enum Flags { NoFlags = 0
53 , CreateLib =(1<<0)
54 , WarnCreateLib=(1<<2) };
55
56// Attributes
57// **********
58
59 private: static DataBase* _db;
60 private: Technology* _technology;
61 private: Library* _rootLibrary;
62 private: function<Hurricane::Cell*(string)> _cellLoader;
63
64// Constructors
65// ************
66
67 protected: DataBase();
68
69// Others
70// ******
71
72 protected: virtual void _postCreate();
73
74 protected: virtual void _preDestroy();
75
76 public: virtual void _toJson(JsonWriter*) const;
77 public: virtual string _getTypeName() const {return _TName("DataBase");};
78 public: virtual string _getString() const;
79 public: virtual Record* _getRecord() const;
80
81 public: void _setTechnology(Technology* technology) {_technology = technology;};
82 public: void _setRootLibrary(Library* rootLibrary) {_rootLibrary = rootLibrary;};
83 public: void _setCellLoader(function<Hurricane::Cell*(string)> loader) { _cellLoader=loader; };
84
85 public: static DataBase* create();
86
87// Accessors
88// *********
89
90 public: Technology* getTechnology() const {return _technology;};
91 public: Library* getRootLibrary() const {return _rootLibrary;};
92 public: Library* getLibrary(string,unsigned int flags);
93 public: Cell* getCell(string, unsigned int flags);
94 public: Cell* getCell(string);
95 public: void clear();
96 public: static DataBase* getDB();
97
98};
99
100
101 inline const FastRTTI& DataBase::fastRTTI () { return _fastRTTI; }
102
103
104
105// ****************************************************************************************************
106// JsonDataBase declaration
107// ****************************************************************************************************
108
109class JsonDataBase : public JsonDBo {
110// ********************************
111
112 public: static void initialize();
113 public: JsonDataBase(unsigned long flags);
114 public: virtual string getTypeName() const;
115 public: virtual JsonDataBase* clone(unsigned long) const;
116 public: virtual void toData(JsonStack&);
117};
118
119
120} // End of Hurricane namespace.
121
122
123INSPECTOR_P_SUPPORT(Hurricane::DataBase);
124
125
126#endif // HURRICANE_DATA_BASE
127
128
129// ****************************************************************************************************
130// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
131// ****************************************************************************************************
The model (API).
Definition Cell.h:64
The whole DataBase (API).
Definition DataBase.h:40
Technology * getTechnology() const
Definition DataBase.h:90
static DataBase * getDB()
Library * getRootLibrary() const
Definition DataBase.h:91
static DataBase * create()
Library description (API)
Definition Library.h:38
Technological rules description (API).
Definition Technology.h:62
Contains Almost Everything.
Definition BasicLayer.h:39


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