ilang
1.1.4
ILAng: A Modeling and Verification Platform for SoCs
|
The symbol is the name and ID of an object. Every object has an unique symbol. More...
#include <symbol.h>
Public Member Functions | |
Symbol () | |
Default constructor (empty name). | |
Symbol (const char *str) | |
Constructor with cstring name. | |
Symbol (const std::string &str) | |
Constructor with string name. | |
Symbol (const Symbol &rhs) | |
Copy constructor. | |
~Symbol () | |
Default destructor. | |
const std::string & | str () const |
Get the name as basic string. | |
const char * | c_str () const |
Get the name as c-type string. | |
const std::string | format_str (const std::string &prefix="", const std::string &suffix="") const |
Get the symbol as cpp string. | |
int | to_int () const |
Convert the name to integer and return. | |
const size_t & | id () const |
Get the id. | |
void | set_name (const std::string &name) |
Update the name (should not be initialized before). | |
std::ostream & | Print (std::ostream &out) const |
Output function. | |
Symbol & | operator= (const Symbol &rhs) |
Overload assignment. | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Symbol &s) |
Overload output stream. | |
bool | operator== (const Symbol &lhs, const Symbol &rhs) |
Overload comparison ==. | |
bool | operator< (const Symbol &lhs, const Symbol &rhs) |
Overload comparison <. | |
The symbol is the name and ID of an object. Every object has an unique symbol.