: _op( parse( strval_r, default_r ) )
{}
+ bool Rel::parseFrom( const std::string & strval_r )
+ {
+ std::map<std::string,Rel::for_use_in_switch>::const_iterator it = findStr( strval_r );
+ if ( it == _table.end() )
+ {
+ return false;
+ }
+ _op = it->second;
+ return true;
+ }
+
///////////////////////////////////////////////////////////////////
//
// METHOD NAME : Rel::asString
*
* \throw PARSE if \a strval_r is not legal.
* \todo refine exceptions and check throw.
- */
+ */
explicit
Rel( const std::string & strval_r );
/** Ctor from string (non-throwing).
* Illegal string values resolve to \c default_r
- */
+ */
Rel( const std::string & strval_r, const Rel & default_r );
+ /** Assign from string IFF it contains a legal value.
+ * \return Whether \a strval_r contained a legal value.
+ */
+ bool parseFrom( const std::string & strval_r );
+
/** Ctor from bits. */
explicit
Rel( unsigned bits_r )