opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
opyn::Symbol Class Referencefinal

#include <symbol.h>

Public Member Functions

 Symbol ()=default
 
 Symbol (std::string_view sv)
 
 operator std::string () const
 Converts *this into a std::string.
 
 operator std::string_view () const
 Returns a std::string_view of the contents of this Symbol
 
std::string_view name () const
 Returns the name (key, content) of this Symbol.
 

Friends

struct std::hash< Symbol >
 
bool operator== (const Symbol &, const Symbol &)=default
 
bool operator== (std::string_view lhs, const Symbol &rhs)
 
bool operator== (const Symbol &lhs, std::string_view rhs)
 

Detailed Description

Represents an immutable, cheap-to-copy, cheap-to-compare, cheap-to-hash symbol in the global process symbol table.

Used by OPynSim to accelerate associative lookups in larger data structures, such as Model.

Constructor & Destructor Documentation

◆ Symbol() [1/2]

opyn::Symbol::Symbol ( )
default

◆ Symbol() [2/2]

opyn::Symbol::Symbol ( std::string_view  sv)
inlineexplicit

Member Function Documentation

◆ name()

std::string_view opyn::Symbol::name ( ) const
inline

Returns the name (key, content) of this Symbol.

◆ operator std::string()

opyn::Symbol::operator std::string ( ) const
inlineexplicit

Converts *this into a std::string.

◆ operator std::string_view()

opyn::Symbol::operator std::string_view ( ) const
inlineexplicit

Returns a std::string_view of the contents of this Symbol

Friends And Related Symbol Documentation

◆ operator== [1/3]

bool operator== ( const Symbol ,
const Symbol  
)
friend

◆ operator== [2/3]

bool operator== ( const Symbol lhs,
std::string_view  rhs 
)
friend

◆ operator== [3/3]

bool operator== ( std::string_view  lhs,
const Symbol rhs 
)
friend

◆ std::hash< Symbol >

friend struct std::hash< Symbol >
friend

The documentation for this class was generated from the following file: