Name description (API) More...
Public Member Functions | |
Name () | |
Name (const char *c) | |
Name (const string &s) | |
Name (const Name &name) | |
~Name () | |
Name & | operator= (const Name &name) |
bool | operator== (const Name &name) const |
bool | operator!= (const Name &name) const |
bool | operator< (const Name &name) const |
bool | operator<= (const Name &name) const |
bool | operator> (const Name &name) const |
bool | operator>= (const Name &name) const |
char | operator[] (unsigned index) const |
bool | isEmpty () const |
Name description (API)
Those objects provide an automatic management of shared name (character strings).
The underlying representation is based on a string shared by the different names. Each shared string is automatically released when the last name referencing it disapears (managed by a reference count technic).
Hurricane::Name::Name | ( | ) |
Default constructor (initialized with an empty string).
Hurricane::Name::Name | ( | const char * | s | ) |
Standard constructor, from a C like character string.
Hurricane::Name::Name | ( | const string & | s | ) |
Standard constructor, from a STL string.
Hurricane::Name::Name | ( | const Name & | name | ) |
Copy constructor.
Hurricane::Name::~Name | ( | ) |
The destructor releases the shared string if it no longer referenced.
Assignment operator. Very fast because there is only an assignement of pointer to the shared string and an incrementation of its reference counter.
bool Hurricane::Name::operator== | ( | const Name & | name | ) | const |
Equality operator. Very fast because it only tests the equality of pointers to the two shared strings (and not the equality of the two strings).
bool Hurricane::Name::operator!= | ( | const Name & | name | ) | const |
Difference operator. Very fast because it only tests the difference of pointers to the two shared strings (and not the difference of the two strings).
bool Hurricane::Name::operator< | ( | const Name & | name | ) | const |
No description.
bool Hurricane::Name::operator<= | ( | const Name & | name | ) | const |
No description.
bool Hurricane::Name::operator> | ( | const Name & | name | ) | const |
No description.
bool Hurricane::Name::operator>= | ( | const Name & | name | ) | const |
Those operators need to process the two shared strings and are not as fast as the previous ones.
char Hurricane::Name::operator[] | ( | unsigned | index | ) | const |
Indexation operator (for reading the character of rank index). Throws an exception if index is out of bounds.
bool Hurricane::Name::isEmpty | ( | ) | const |
Returns: true if the shared string is empty, else false.
Generated by doxygen 1.9.1 on Thu Aug 11 2022 | Return to top of page |
Hurricane VLSI Database | Copyright © 2000-2020 Bull S.A. All rights reserved |