NSVD Reader  0.0.1
nodamushi::svd::EnumeratedNumber Struct Reference

Decode and represent enemeratedValue.value. More...

#include <EnumeratedNumber.hpp>

Public Member Functions

 operator uint64_t () const
 get value More...
 
uint64_t get_dont_care () const
 get don't care More...
 
uint64_t get_value () const
 get value More...
 
uint64_t get_masked_value () const
 value & don't care More...
 
int get_base () const
 radix. 10 / 16 / 2 More...
 
bool operator== (const EnumeratedNumber &e) const
 compare with value and don't care. More...
 
bool operator== (uint64_t e) const
 compare with value and don't care More...
 
bool operator!= (const EnumeratedNumber &e) const
 compare with value & don't care More...
 
bool operator!= (uint64_t e) const
 compare with value & don't care More...
 
int compare (const EnumeratedNumber &e) const
 compare without don't care bits More...
 
int compare (uint64_t e) const
 compare without don't care bits More...
 
bool operator< (const EnumeratedNumber &e) const
 
bool operator<= (const EnumeratedNumber &e) const
 
bool operator> (const EnumeratedNumber &e) const
 
bool operator>= (const EnumeratedNumber &e) const
 
bool operator< (uint64_t e) const
 
bool operator<= (uint64_t e) const
 
bool operator> (uint64_t e) const
 
bool operator>= (uint64_t e) const
 
 EnumeratedNumber ()
 
 EnumeratedNumber (const EnumeratedNumber &)=default
 
 EnumeratedNumber (EnumeratedNumber &&)=default
 
EnumeratedNumberoperator= (const EnumeratedNumber &)=default
 
EnumeratedNumberoperator= (EnumeratedNumber &&)=default
 
 EnumeratedNumber (uint64_t v)
 
 EnumeratedNumber (const std::string &str)
 
void operator= (const std::string &str)
 
EnumeratedNumberoperator= (uint64_t v) noexcept
 update value only More...
 
void set (uint64_t v, uint64_t dont_care, int base=10) noexcept
 update contents. More...
 
void print (std::ostream &o) const noexcept
 

Detailed Description

Decode and represent enemeratedValue.value.

format:

Definition at line 35 of file EnumeratedNumber.hpp.

Constructor & Destructor Documentation

◆ EnumeratedNumber() [1/5]

nodamushi::svd::EnumeratedNumber::EnumeratedNumber ( )
inline

Definition at line 139 of file EnumeratedNumber.hpp.

◆ EnumeratedNumber() [2/5]

nodamushi::svd::EnumeratedNumber::EnumeratedNumber ( const EnumeratedNumber )
default

◆ EnumeratedNumber() [3/5]

nodamushi::svd::EnumeratedNumber::EnumeratedNumber ( EnumeratedNumber &&  )
default

◆ EnumeratedNumber() [4/5]

nodamushi::svd::EnumeratedNumber::EnumeratedNumber ( uint64_t  v)
inline

Definition at line 145 of file EnumeratedNumber.hpp.

◆ EnumeratedNumber() [5/5]

nodamushi::svd::EnumeratedNumber::EnumeratedNumber ( const std::string &  str)
inline

Definition at line 149 of file EnumeratedNumber.hpp.

Member Function Documentation

◆ compare() [1/2]

int nodamushi::svd::EnumeratedNumber::compare ( const EnumeratedNumber e) const
inline

compare without don't care bits

Parameters
ecompare target
Returns
  • minus : less than e
  • 0 : same
  • plus : greater than e

Definition at line 110 of file EnumeratedNumber.hpp.

◆ compare() [2/2]

int nodamushi::svd::EnumeratedNumber::compare ( uint64_t  e) const
inline

compare without don't care bits

Parameters
ecompare target
Returns
  • minus : less than e
  • 0 : same
  • plus : greater than e

Definition at line 123 of file EnumeratedNumber.hpp.

◆ get_base()

int nodamushi::svd::EnumeratedNumber::get_base ( ) const
inline

radix. 10 / 16 / 2

Returns
radix. 10 / 16 / 2

Definition at line 71 of file EnumeratedNumber.hpp.

◆ get_dont_care()

uint64_t nodamushi::svd::EnumeratedNumber::get_dont_care ( ) const
inline

get don't care

Returns
don't care bit information.
get_dont_care() &(1 << y) != 0 : bit y is don't care

Definition at line 55 of file EnumeratedNumber.hpp.

◆ get_masked_value()

uint64_t nodamushi::svd::EnumeratedNumber::get_masked_value ( ) const
inline

value & don't care

Returns
value & don't care

Definition at line 65 of file EnumeratedNumber.hpp.

◆ get_value()

uint64_t nodamushi::svd::EnumeratedNumber::get_value ( ) const
inline

get value

Returns
value

Definition at line 60 of file EnumeratedNumber.hpp.

◆ operator uint64_t()

nodamushi::svd::EnumeratedNumber::operator uint64_t ( ) const
inline

get value

Returns
value

Definition at line 48 of file EnumeratedNumber.hpp.

◆ operator!=() [1/2]

bool nodamushi::svd::EnumeratedNumber::operator!= ( const EnumeratedNumber e) const
inline

compare with value & don't care

Definition at line 91 of file EnumeratedNumber.hpp.

◆ operator!=() [2/2]

bool nodamushi::svd::EnumeratedNumber::operator!= ( uint64_t  e) const
inline

compare with value & don't care

Definition at line 98 of file EnumeratedNumber.hpp.

◆ operator<() [1/2]

bool nodamushi::svd::EnumeratedNumber::operator< ( const EnumeratedNumber e) const
inline

Definition at line 127 of file EnumeratedNumber.hpp.

◆ operator<() [2/2]

bool nodamushi::svd::EnumeratedNumber::operator< ( uint64_t  e) const
inline

Definition at line 131 of file EnumeratedNumber.hpp.

◆ operator<=() [1/2]

bool nodamushi::svd::EnumeratedNumber::operator<= ( const EnumeratedNumber e) const
inline

Definition at line 128 of file EnumeratedNumber.hpp.

◆ operator<=() [2/2]

bool nodamushi::svd::EnumeratedNumber::operator<= ( uint64_t  e) const
inline

Definition at line 132 of file EnumeratedNumber.hpp.

◆ operator=() [1/4]

EnumeratedNumber& nodamushi::svd::EnumeratedNumber::operator= ( const EnumeratedNumber )
default

◆ operator=() [2/4]

EnumeratedNumber& nodamushi::svd::EnumeratedNumber::operator= ( EnumeratedNumber &&  )
default

◆ operator=() [3/4]

void nodamushi::svd::EnumeratedNumber::operator= ( const std::string &  str)
inline

Definition at line 163 of file EnumeratedNumber.hpp.

◆ operator=() [4/4]

EnumeratedNumber& nodamushi::svd::EnumeratedNumber::operator= ( uint64_t  v)
inlinenoexcept

update value only

Definition at line 217 of file EnumeratedNumber.hpp.

◆ operator==() [1/2]

bool nodamushi::svd::EnumeratedNumber::operator== ( const EnumeratedNumber e) const
inline

compare with value and don't care.

#1001 == #xxxx

Definition at line 77 of file EnumeratedNumber.hpp.

◆ operator==() [2/2]

bool nodamushi::svd::EnumeratedNumber::operator== ( uint64_t  e) const
inline

compare with value and don't care

Definition at line 84 of file EnumeratedNumber.hpp.

◆ operator>() [1/2]

bool nodamushi::svd::EnumeratedNumber::operator> ( const EnumeratedNumber e) const
inline

Definition at line 129 of file EnumeratedNumber.hpp.

◆ operator>() [2/2]

bool nodamushi::svd::EnumeratedNumber::operator> ( uint64_t  e) const
inline

Definition at line 133 of file EnumeratedNumber.hpp.

◆ operator>=() [1/2]

bool nodamushi::svd::EnumeratedNumber::operator>= ( const EnumeratedNumber e) const
inline

Definition at line 130 of file EnumeratedNumber.hpp.

◆ operator>=() [2/2]

bool nodamushi::svd::EnumeratedNumber::operator>= ( uint64_t  e) const
inline

Definition at line 134 of file EnumeratedNumber.hpp.

◆ print()

void nodamushi::svd::EnumeratedNumber::print ( std::ostream &  o) const
inlinenoexcept

Definition at line 237 of file EnumeratedNumber.hpp.

◆ set()

void nodamushi::svd::EnumeratedNumber::set ( uint64_t  v,
uint64_t  dont_care,
int  base = 10 
)
inlinenoexcept

update contents.

Parameters
vvalue
dont_caredon't care bit information.(1: don't core, 0: care)
baseradix

Definition at line 227 of file EnumeratedNumber.hpp.


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