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 650 of file StackElement.cxx.
650#define UNARY_MATH_FUNCTION( FUNC, BASEFUNC ) \
651 StackElement StackElement::FUNC() { \
652 if (this->m_moved) throw std::logic_error("Content already moved");\
653 StackElement temp( std::move(*this) ); \
654 this->m_moved=true; \
655 temp.makeDouble(); \
656 if( temp.m_type == SE_DOUBLE ) { \
657 temp.m_doubleVal = BASEFUNC( temp.m_doubleVal ); \
658 return temp; \
659 } else if( temp.m_type == SE_VECDOUBLE ) { \
660 for( double& value : temp.m_vecDoubleVal ) { \
661 value = BASEFUNC( value ); \
662 } \
663 return temp; \
664 } else { \
665 \
666 return temp; \
667 } \
668 }