@ -68,14 +68,12 @@ namespace sockcanpp {
public : // +++ Operators +++
public : // +++ Operators +++
# pragma region "Implicit Cast Operators"
operator int16_t ( ) const { return isStandardFrameId ( ) ? ( int16_t ) _identifier : throw system_error ( error_code ( 0xbad1d , generic_category ( ) ) , " INVALID CAST: ID is extended or invalid! " ) ; }
operator int16_t ( ) const { return isStandardFrameId ( ) ? ( int16_t ) _identifier : throw system_error ( error_code ( 0xbad1d , generic_category ( ) ) , " INVALID CAST: ID is extended or invalid! " ) ; }
operator uint16_t ( ) const { return isStandardFrameId ( ) ? ( uint16_t ) _identifier : throw system_error ( error_code ( 0xbad1d , generic_category ( ) ) , " INVALID CAST: ID is extended or invalid! " ) ; }
operator uint16_t ( ) const { return isStandardFrameId ( ) ? ( uint16_t ) _identifier : throw system_error ( error_code ( 0xbad1d , generic_category ( ) ) , " INVALID CAST: ID is extended or invalid! " ) ; }
operator int32_t ( ) const { return _identifier ; }
operator int32_t ( ) const { return _identifier ; }
operator uint32_t ( ) const { return _identifier ; }
operator uint32_t ( ) const { return _identifier ; }
# pragma endregion
# pragma region "Bitwise Operators"
CanId operator & ( CanId & x ) const { return _identifier & x . _identifier ; }
CanId operator & ( CanId & x ) const { return _identifier & x . _identifier ; }
CanId operator & ( const CanId x ) const { return _identifier & x . _identifier ; }
CanId operator & ( const CanId x ) const { return _identifier & x . _identifier ; }
CanId operator & ( const int16_t x ) const { return _identifier & x ; }
CanId operator & ( const int16_t x ) const { return _identifier & x ; }
@ -93,45 +91,41 @@ namespace sockcanpp {
CanId operator | ( const uint32_t x ) const { return _identifier | x ; }
CanId operator | ( const uint32_t x ) const { return _identifier | x ; }
CanId operator | ( const int64_t x ) const { return _identifier | x ; }
CanId operator | ( const int64_t x ) const { return _identifier | x ; }
CanId operator | ( const uint64_t x ) const { return _identifier | x ; }
CanId operator | ( const uint64_t x ) const { return _identifier | x ; }
# pragma endregion
# pragma region "Comparison Operators"
bool operator = = ( CanId & x ) const { return _identifier = = x . _identifier ; }
bool operator = = ( CanId & x ) const { return _identifier = = x . _identifier ; }
bool operator = = ( const CanId & x ) const { return _identifier = = x . _identifier ; }
bool operator = = ( const CanId & x ) const { return _identifier = = x . _identifier ; }
bool operator = = ( const int16_t x ) const { return _identifier = = x ; }
bool operator = = ( const uint16_t x ) const { return _identifier = = x ; }
bool operator = = ( const int32_t x ) const { return _identifier = = x ; }
bool operator = = ( const uint32_t x ) const { return _identifier = = x ; }
bool operator = = ( const int64_t x ) const { return ( x > UINT32_MAX | | x < INT32_MIN ) ? false : x = = _identifier ; }
bool operator = = ( const uint64_t x ) const { return x > UINT32_MAX ? false : x = = _identifier ; }
bool operator = = ( const int16_t x ) const { return int16_t ( _identifier ) = = x ; }
bool operator = = ( const uint16_t x ) const { return uint16_t ( _identifier ) = = x ; }
bool operator = = ( const int32_t x ) const { return int32_t ( _identifier ) = = x ; }
bool operator = = ( const uint32_t x ) const { return uint32_t ( _identifier ) = = x ; }
bool operator = = ( const int64_t x ) const { return ( x > UINT32_MAX | | x < INT32_MIN ) ? false : x = = int64_t ( _identifier ) ; }
bool operator = = ( const uint64_t x ) const { return x > UINT32_MAX ? false : x = = uint64_t ( _identifier ) ; }
bool operator ! = ( CanId & x ) const { return _identifier ! = x . _identifier ; }
bool operator ! = ( CanId & x ) const { return _identifier ! = x . _identifier ; }
bool operator ! = ( const CanId & x ) const { return _identifier ! = x . _identifier ; }
bool operator ! = ( const CanId & x ) const { return _identifier ! = x . _identifier ; }
bool operator ! = ( const int16_t x ) const { return _identifier ! = x ; }
bool operator ! = ( const uint16_t x ) const { return _identifier ! = x ; }
bool operator ! = ( const int32_t x ) const { return _identifier ! = x ; }
bool operator ! = ( const uint32_t x ) const { return _identifier ! = x ; }
bool operator ! = ( const int16_t x ) const { return int16_t ( _identifier ) ! = x ; }
bool operator ! = ( const uint16_t x ) const { return uint16_t ( _identifier ) ! = x ; }
bool operator ! = ( const int32_t x ) const { return int32_t ( _identifier ) ! = x ; }
bool operator ! = ( const uint32_t x ) const { return uint32_t ( _identifier ) ! = x ; }
bool operator ! = ( const int64_t x ) const { return ( x > UINT32_MAX | | x < INT32_MIN ) ? false : x ! = _identifier ; }
bool operator ! = ( const int64_t x ) const { return ( x > UINT32_MAX | | x < INT32_MIN ) ? false : x ! = _identifier ; }
bool operator ! = ( const uint64_t x ) const { return x > UINT32_MAX ? false : x ! = _identifier ; }
bool operator ! = ( const uint64_t x ) const { return x > UINT32_MAX ? false : x ! = _identifier ; }
bool operator < ( CanId & x ) const { return x . _identifier < _identifier ; }
bool operator < ( CanId & x ) const { return x . _identifier < _identifier ; }
bool operator < ( int32_t x ) const { return x < _identifier ; }
bool operator < ( uint32_t x ) const { return x < _identifier ; }
bool operator < ( int16_t x ) const { return x < _identifier ; }
bool operator < ( uint16_t x ) const { return x < _identifier ; }
bool operator < ( int32_t x ) const { return x < int32_t ( _identifier ) ; }
bool operator < ( uint32_t x ) const { return x < uint32_t ( _identifier ) ; }
bool operator < ( int16_t x ) const { return x < int16_t ( _identifier ) ; }
bool operator < ( uint16_t x ) const { return x < uint16_t ( _identifier ) ; }
bool operator < = ( CanId & x ) const { return x . _identifier < = _identifier ; }
bool operator < = ( CanId & x ) const { return x . _identifier < = _identifier ; }
bool operator > ( CanId & x ) const { return x . _identifier > _identifier ; }
bool operator > ( CanId & x ) const { return x . _identifier > _identifier ; }
bool operator > ( int32_t x ) const { return x > _identifier ; }
bool operator > ( uint32_t x ) const { return x > _identifier ; }
bool operator > ( int16_t x ) const { return x > _identifier ; }
bool operator > ( uint16_t x ) const { return x > _identifier ; }
bool operator > ( int32_t x ) const { return x > int32_t ( _identifier ) ; }
bool operator > ( uint32_t x ) const { return x > uint32_t ( _identifier ) ; }
bool operator > ( int16_t x ) const { return x > int16_t ( _identifier ) ; }
bool operator > ( uint16_t x ) const { return x > uint16_t ( _identifier ) ; }
bool operator > = ( CanId & x ) const { return x . _identifier > = _identifier ; }
bool operator > = ( CanId & x ) const { return x . _identifier > = _identifier ; }
bool operator < ( const CanId & x ) const { return x . _identifier < _identifier ; }
bool operator < ( const CanId & x ) const { return x . _identifier < _identifier ; }
bool operator < = ( const CanId & x ) const { return x . _identifier < = _identifier ; }
bool operator < = ( const CanId & x ) const { return x . _identifier < = _identifier ; }
bool operator > ( const CanId & x ) const { return x . _identifier > _identifier ; }
bool operator > ( const CanId & x ) const { return x . _identifier > _identifier ; }
bool operator > = ( const CanId & x ) const { return x . _identifier > = _identifier ; }
bool operator > = ( const CanId & x ) const { return x . _identifier > = _identifier ; }
# pragma endregion
# pragma region "Assignment Operators"
CanId operator = ( const int32_t val ) {
CanId operator = ( const int32_t val ) {
uint32_t tmpVal = val ;
uint32_t tmpVal = val ;
auto tmp = ( isValidIdentifier ( tmpVal ) ? CanId ( val ) : throw system_error ( error_code ( 0x5421 , generic_category ( ) ) , " INVALID CAST: ID is extended or invalid! " ) ) ;
auto tmp = ( isValidIdentifier ( tmpVal ) ? CanId ( val ) : throw system_error ( error_code ( 0x5421 , generic_category ( ) ) , " INVALID CAST: ID is extended or invalid! " ) ) ;
@ -144,9 +138,7 @@ namespace sockcanpp {
}
}
CanId operator = ( const int64_t val ) { return operator = ( ( int32_t ) val ) ; }
CanId operator = ( const int64_t val ) { return operator = ( ( int32_t ) val ) ; }
# pragma endregion
# pragma region "Arithmetic Operators"
CanId operator + ( CanId & x ) const { return _identifier + x . _identifier ; }
CanId operator + ( CanId & x ) const { return _identifier + x . _identifier ; }
CanId operator + ( const CanId & x ) const { return _identifier + x . _identifier ; }
CanId operator + ( const CanId & x ) const { return _identifier + x . _identifier ; }
CanId operator + ( const int16_t x ) const { return _identifier + x ; }
CanId operator + ( const int16_t x ) const { return _identifier + x ; }
@ -164,7 +156,6 @@ namespace sockcanpp {
CanId operator - ( const uint32_t x ) const { return _identifier - x ; }
CanId operator - ( const uint32_t x ) const { return _identifier - x ; }
CanId operator - ( const int64_t x ) const { return _identifier - x ; }
CanId operator - ( const int64_t x ) const { return _identifier - x ; }
CanId operator - ( const uint64_t x ) const { return _identifier - x ; }
CanId operator - ( const uint64_t x ) const { return _identifier - x ; }
# pragma endregion
public : // +++ Validity Checks +++
public : // +++ Validity Checks +++
/**
/**