src/value.cpp
/*!
 * \fn Enumerator toEnumerator() const
 * \brief returns the value as an enumerator
 *
 * If this value is not an enumerator, this returns a null Enumerator.
 */
\fn Enumerator toEnumerator() const
\brief returns the value as an enumerator

If this value is not an enumerator, this returns a null Enumerator.
\ fn Enumerator toEnumerator () const \ brief returns the value as an enumerator If this value is not an enumerator this returns a null Enumerator .
Enumerator Value::toEnumerator() const
{
  if (d->is_enumerator())
    return static_cast<EnumeratorValue*>(d)->value;
  else if (d->is_cpp_enum())
    return Enumerator(engine()->typeSystem()->getEnum(type()), d->get_cpp_enum_value());
  else
    return Enumerator();
}
Enumerator Value :: toEnumerator ( ) const { if ( d -> is_enumerator ( ) ) return static_cast < EnumeratorValue * > ( d ) -> value ; else if ( d -> is_cpp_enum ( ) ) return Enumerator ( engine ( ) -> typeSystem ( ) -> getEnum ( type ( ) ) , d -> get_cpp_enum_value ( ) ) ; else return Enumerator ( ) ; }
\fn Enumerator toEnumerator() const
 \brief returns the value as an enumerator
\ fn Enumerator toEnumerator () const \ brief returns the value as an enumerator