ActorObserver::ActorObserver()
: mActor ( NULL ),
- mActorDisconnected(false)
+ mActorDisconnected( false ),
+ mRemoveCallback( NULL )
{
DALI_LOG_TRACE_METHOD( gLogFilter );
}
+ActorObserver::ActorObserver( CallbackBase* callback )
+: mActor ( NULL ),
+ mActorDisconnected( false ),
+ mRemoveCallback( callback )
+{
+}
+
ActorObserver::~ActorObserver()
{
DALI_LOG_TRACE_METHOD( gLogFilter );
SetActor( NULL );
+
+ delete mRemoveCallback;
}
Actor* ActorObserver::GetActor()
if ( mActor == &object )
{
+ if ( mRemoveCallback )
+ {
+ CallbackBase::Execute( *mRemoveCallback, mActor );
+ }
+
// do not call object.RemoveObserver here, object is currently iterating through observers
mActorDisconnected = true;
}