# Hurricane VLSI Database

Name.h
1 // ****************************************************************************************************
2 // File: ./hurricane/Name.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_NAME
21 #define HURRICANE_NAME
22
23 #include "hurricane/Commons.h"
24 #include "hurricane/Names.h"
25
26 namespace Hurricane {
27
28 class SharedName;
29
30
31
32 // ****************************************************************************************************
33 // Name declaration
34 // ****************************************************************************************************
35
36 class Name {
37 // *******
38
39 private: static const Name _emptyName;
40 public: static const Name& emptyName () { return _emptyName; };
41
42 // Attributes
43 // **********
44
45 private: SharedName* _sharedName;
46
47 // Constructors
48 // ************
49
50 public: Name();
51
52 public: Name(const char* c);
53 public: Name(const string& s);
54
55 public: Name(const Name& name);
56
57 // Destructor
58 // **********
59
60 public: ~Name();
61
62 // Operators
63 // *********
64
65 public: Name& operator=(const Name& name);
66
67 public: bool operator==(const Name& name) const;
68 public: bool operator!=(const Name& name) const;
69 public: bool operator<(const Name& name) const;
70 public: bool operator<=(const Name& name) const;
71 public: bool operator>(const Name& name) const;
72 public: bool operator>=(const Name& name) const;
73
74 public: char operator[](unsigned index) const;
75
76 // Predicates
77 // **********
78
79 public: bool isEmpty() const;
80 public: size_t size() const;
81
82 // Others
83 // ******
84
85 public: string _getTypeName() const { return _TName("Name"); };
86 public: string _getString() const;
87 public: Record* _getRecord() const;
88 public: SharedName* _getSharedName() const {return _sharedName;};
89
90 };
91
92
93 } // End of Hurricane namespace.
94
95
96 INSPECTOR_PV_SUPPORT(Hurricane::Name);
97
98 inline void jsonWrite ( JsonWriter* w, Hurricane::Name name )
99 { w->write( getString(name).c_str() ); }
100
101 inline void jsonWrite ( JsonWriter* w, const std::string& key, Hurricane::Name name )
102 { w->key( key ); w->write( getString(name).c_str() ); }
103
104
105 #endif // HURRICANE_NAME
106
107
108 // ****************************************************************************************************
109 // Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
110 // ****************************************************************************************************
Hurricane::Name::operator==
bool operator==(const Name &name) const
Hurricane::Name::operator!=
bool operator!=(const Name &name) const
Hurricane::Name::operator<
bool operator<(const Name &name) const
Hurricane::Name::~Name
~Name()
Hurricane::Name
Name description (API)
Definition: Name.h:36
Hurricane::Name::operator[]
char operator[](unsigned index) const
Hurricane::Name::operator=
Name & operator=(const Name &name)
Hurricane::Name::isEmpty
bool isEmpty() const
Hurricane::Name::operator>
bool operator>(const Name &name) const
Hurricane::Name::Name
Name()
Hurricane::Name::operator>=
bool operator>=(const Name &name) const
Hurricane
The namespace dedicated to Hurricane.
Definition: Generalities.dox:5
Hurricane::Name::operator<=
bool operator<=(const Name &name) const

Generated by doxygen 1.8.14 on Sun Mar 8 2020 | Return to top of page

Hurricane VLSI Database | Copyright © 2000-2016 Bull S.A. All rights reserved