readd missing operator= (needed for STL use)

This commit is contained in:
Glenn Maynard
2008-05-27 17:40:30 +00:00
parent aa99cab574
commit a191c25a13
4 changed files with 27 additions and 3 deletions
+13
View File
@@ -228,6 +228,19 @@ MessageSubscriber::MessageSubscriber( const MessageSubscriber &cpy ):
this->SubscribeToMessage( *msg );
}
MessageSubscriber &MessageSubscriber::operator=(const MessageSubscriber &cpy)
{
if(&cpy == this)
return *this;
UnsubscribeAll();
FOREACH_CONST( RString, cpy.m_vsSubscribedTo, msg )
this->SubscribeToMessage( *msg );
return *this;
}
void MessageSubscriber::SubscribeToMessage( const RString &sMessageName )
{
MESSAGEMAN->Subscribe( this, sMessageName );