class StringVal
{
public:
+ /** */
operator const std::string &() const
{ return _value; }
+ /** */
+ const std::string & asString() const
+ { return _value; }
protected:
/** */
StringVal();
inline std::ostream & operator<<( std::ostream & str, const StringVal & obj )
{ return str << static_cast<const std::string &>(obj); }
+ ///////////////////////////////////////////////////////////////////
+
+ inline bool operator==( const StringVal & lhs, const StringVal & rhs )
+ { return lhs.asString() == rhs.asString(); }
+
+ inline bool operator==( const StringVal & lhs, const std::string & rhs )
+ { return lhs.asString() == rhs; }
+
+ inline bool operator==( const std::string & lhs, const StringVal & rhs )
+ { return lhs == rhs.asString(); }
+
+
+ inline bool operator!=( const StringVal & lhs, const StringVal & rhs )
+ { return !( lhs == rhs ); }
+
+ inline bool operator!=( const StringVal & lhs, const std::string & rhs )
+ { return !( lhs == rhs ); }
+
+ inline bool operator!=( const std::string & lhs, const StringVal & rhs )
+ { return !( lhs == rhs ); }
+
/////////////////////////////////////////////////////////////////
} // namespace base
///////////////////////////////////////////////////////////////////
it != not_installed.end();
it++)
{
- if ((std::string)((*it)->kind()) == "message")
+ if ((*it)->kind() == "message")
{
// DBG << "Patch contains a message" << endl;
return true;
}
- if ((std::string)((*it)->kind()) == "package")
+ if ((*it)->kind() == "package")
{
// Resolvable*
// Resolvable
//
/** Class representing a patch
* \todo Get rid of string based ResKind detection in e.g.
- * PatchImpl::interactive. Esp. DO NOT CAST ResKind to std::string.
+ * PatchImpl::interactive.
*/
class PatchImpl : public PatchImplIf
{