Value: StackElement StackElement::FUNC() { \
if (this->m_moved) throw std::logic_error("Content already moved");\
StackElement temp( std::move(*this) ); \
this->m_moved=true; \
temp.makeDouble(); \
if( temp.m_type == SE_DOUBLE ) { \
temp.m_doubleVal = BASEFUNC( temp.m_doubleVal ); \
return temp; \
} else if( temp.m_type == SE_VECDOUBLE ) { \
for( double& value : temp.m_vecDoubleVal ) { \
value = BASEFUNC( value ); \
} \
return temp; \
} else { \
\
return temp; \
} \
}
Helper macro for implementing many of the mathematical functions.
Definition at line 653 of file StackElement.cxx.
653#define UNARY_MATH_FUNCTION( FUNC, BASEFUNC ) \
654 StackElement StackElement::FUNC() { \
655 if (this->m_moved) throw std::logic_error("Content already moved");\
656 StackElement temp( std::move(*this) ); \
657 this->m_moved=true; \
658 temp.makeDouble(); \
659 if( temp.m_type == SE_DOUBLE ) { \
660 temp.m_doubleVal = BASEFUNC( temp.m_doubleVal ); \
661 return temp; \
662 } else if( temp.m_type == SE_VECDOUBLE ) { \
663 for( double& value : temp.m_vecDoubleVal ) { \
664 value = BASEFUNC( value ); \
665 } \
666 return temp; \
667 } else { \
668 \
669 return temp; \
670 } \
671 }