Remove unused FindActorByAlias 13/36613/2
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 10 Mar 2015 17:32:44 +0000 (17:32 +0000)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 10 Mar 2015 17:35:42 +0000 (10:35 -0700)
Change-Id: Ia9a32f2bf1b11cf2c9d8d2c7d956a5004151e831

automated-tests/src/dali/utc-Dali-Actor.cpp
automated-tests/src/dali/utc-Dali-CustomActor.cpp
automated-tests/src/dali/utc-Dali-TypeRegistry.cpp
dali/internal/event/actors/actor-impl.cpp
dali/internal/event/actors/actor-impl.h
dali/internal/event/actors/custom-actor-internal.h
dali/public-api/actors/actor.cpp
dali/public-api/actors/actor.h
dali/public-api/actors/custom-actor-impl.h

index bdff4b6..0a46942 100644 (file)
@@ -2623,35 +2623,6 @@ int UtcDaliActorFindChildByName(void)
   END_TEST;
 }
 
-int UtcDaliActorFindChildByAlias(void)
-{
-  tet_infoline("Testing Dali::Actor::FindChildByAlias()");
-  TestApplication application;
-
-  Actor parent = Actor::New();
-  parent.SetName( "parent" );
-  Actor first  = Actor::New();
-  first .SetName( "first" );
-  Actor second = Actor::New();
-  second.SetName( "second" );
-
-  parent.Add(first);
-  first.Add(second);
-
-  Actor found = parent.FindChildByAlias( "foo" );
-  DALI_TEST_CHECK( !found );
-
-  found = parent.FindChildByAlias( "parent" );
-  DALI_TEST_CHECK( found == parent );
-
-  found = parent.FindChildByAlias( "first" );
-  DALI_TEST_CHECK( found == first );
-
-  found = parent.FindChildByAlias( "second" );
-  DALI_TEST_CHECK( found == second );
-  END_TEST;
-}
-
 int UtcDaliActorFindChildById(void)
 {
   tet_infoline("Testing Dali::Actor::UtcDaliActorFindChildById()");
index 1d2cde3..4eca0f7 100644 (file)
@@ -169,20 +169,6 @@ struct TestCustomActor : public CustomActorImpl
   {
     AddToCallStacks("OnKeyInputFocusLost");
   }
-  virtual Actor GetChildByAlias(const std::string& actorAlias)
-  {
-    AddToCallStacks("GetChildByAlias");
-
-    if ("found" == actorAlias)
-    {
-      return Actor::New();
-    }
-    else
-    {
-      return Actor();
-    }
-  }
-
   virtual Vector3 GetNaturalSize()
   {
     return Vector3( 0.0f, 0.0f, 0.0f );
@@ -482,11 +468,6 @@ public:
   {
   }
 
-  virtual Actor GetChildByAlias(const std::string& actorAlias)
-  {
-    return Actor();
-  }
-
   virtual Vector3 GetNaturalSize()
   {
     return Vector3( 0.0f, 0.0f, 0.0f );
@@ -1589,27 +1570,6 @@ int UtcDaliCustomActorOnMouseWheelEvent(void)
   END_TEST;
 }
 
-int UtcDaliCustomActorFindChildByAlias(void)
-{
-  TestApplication application;
-  tet_infoline("Testing Dali::CustomActor::GetChildByAlias()");
-
-  TestCustomActor custom = TestCustomActor::New();
-  DALI_TEST_EQUALS( 0, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
-
-  custom.Add(Actor::New());
-
-  DALI_TEST_EQUALS( 1, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
-
-  DALI_TEST_CHECK( !custom.FindChildByAlias("not-found") );
-
-  DALI_TEST_EQUALS( 2, (int)(custom.GetMethodsCalled().size()), TEST_LOCATION );
-  DALI_TEST_EQUALS( "GetChildByAlias", custom.GetMethodsCalled()[ 1 ], TEST_LOCATION );
-
-  DALI_TEST_CHECK( custom.FindChildByAlias("found") );
-  END_TEST;
-}
-
 int UtcDaliCustomActorImplOnPropertySet(void)
 {
   TestApplication application;
index 9c96aa0..534b00a 100644 (file)
@@ -242,11 +242,6 @@ struct MyTestCustomActor : public CustomActorImpl
   virtual void OnKeyInputFocusLost()
   {
   }
-  virtual Actor GetChildByAlias(const std::string& actorAlias)
-  {
-    return Actor::New();
-  }
-
   virtual Vector3 GetNaturalSize()
   {
     return Vector3( 0.0f, 0.0f, 0.0f );
index 6de292d..7eee88a 100644 (file)
@@ -444,44 +444,6 @@ ActorPtr Actor::FindChildByName(const std::string& actorName)
   return child;
 }
 
-Dali::Actor Actor::FindChildByAlias(const std::string& actorAlias)
-{
-  Dali::Actor child = DoGetChildByAlias(actorAlias);
-
-  // If not found then search by name.
-  if (!child)
-  {
-    Internal::ActorPtr child_ptr = FindChildByName(actorAlias);
-    if (child_ptr)
-    {
-      child = Dali::Actor(child_ptr.Get());
-    }
-  }
-
-  return child;
-}
-
-Dali::Actor Actor::DoGetChildByAlias(const std::string& actorAlias)
-{
-  Dali::Actor child = GetChildByAlias(actorAlias);
-
-  if (!child && mChildren )
-  {
-    ActorIter end = mChildren->end();
-    for( ActorIter iter = mChildren->begin(); iter != end; ++iter )
-    {
-      child = GetImplementation(*iter).DoGetChildByAlias(actorAlias);
-
-      if (child)
-      {
-        break;
-      }
-    }
-  }
-
-  return child;
-}
-
 ActorPtr Actor::FindChildById(const unsigned int id)
 {
   ActorPtr child = 0;
index 07437a2..b3aef89 100644 (file)
@@ -224,11 +224,6 @@ public:
   ActorPtr FindChildByName(const std::string& actorName);
 
   /**
-   * @copydoc Dali::Actor::FindChildByAlias
-   */
-  Dali::Actor FindChildByAlias(const std::string& actorAlias);
-
-  /**
    * @copydoc Dali::Actor::FindChildById
    */
   ActorPtr FindChildById(const unsigned int id);
@@ -1340,24 +1335,6 @@ private:
    */
   virtual bool OnMouseWheelEvent(const MouseWheelEvent& event) { return false; }
 
-  /**
-   * For use in derived class
-   * If an alias for a child exists, return the child otherwise return an empty handle.
-   * For example 'previous' could return the last selected child.
-   * @pre The Actor has been initialized.
-   * @param[in] actorAlias the name of the actor to find
-   * @return A handle to the actor if found, or an empty handle if not.
-   */
-  virtual Dali::Actor GetChildByAlias(const std::string& actorAlias) { return Dali::Actor(); }
-
-  /**
-   * Support function for FindChildByAlias
-   * @pre The Actor has been initialized.
-   * @param[in] actorAlias the name of the aliased actor to find
-   * @return A handle to the actor if found, or an empty handle if not.
-   */
-  Dali::Actor DoGetChildByAlias(const std::string& actorAlias);
-
 protected:
 
   StagePtr                mStage;        ///< Used to send messages to Node; valid until Core destruction
index 23ce647..deed407 100644 (file)
@@ -159,14 +159,6 @@ private:
   }
 
   /**
-   * @copydoc Internal::Actor::GetChildByAlias
-   */
-  virtual Dali::Actor GetChildByAlias(const std::string& actorAlias)
-  {
-    return mImpl->GetChildByAlias(actorAlias);
-  }
-
-  /**
    * @copydoc Internal::Actor::GetNaturalSize
    */
   virtual Vector3 GetNaturalSize() const
index f2c07d6..e80ce20 100644 (file)
@@ -148,12 +148,6 @@ Actor Actor::FindChildByName(const std::string& actorName)
   return Actor(child.Get());
 }
 
-Actor Actor::FindChildByAlias(const std::string& actorAlias)
-{
-  Actor child = GetImplementation(*this).FindChildByAlias(actorAlias);
-  return child;
-}
-
 Actor Actor::FindChildById(const unsigned int id)
 {
   Internal::ActorPtr child = GetImplementation(*this).FindChildById(id);
index 5d3163f..a6f74fb 100644 (file)
@@ -502,18 +502,6 @@ public:
   Actor FindChildByName(const std::string& actorName);
 
   /**
-   * @brief Search through this actor's hierarchy for an actor with the given name or alias.
-   *
-   * Actors can customize this function to provide actors with preferred alias'
-   * For example 'previous' could return the last selected child.
-   * If no aliased actor is found then FindChildByName() is called.
-   * @pre The Actor has been initialized.
-   * @param[in] actorAlias the name of the actor to find
-   * @return A handle to the actor if found, or an empty handle if not.
-   */
-  Actor FindChildByAlias(const std::string& actorAlias);
-
-  /**
    * @brief Search through this actor's hierarchy for an actor with the given unique ID.
    *
    * The actor itself is also considered in the search
index a68ebb0..aa88262 100644 (file)
@@ -178,17 +178,6 @@ public:
   virtual bool OnMouseWheelEvent(const MouseWheelEvent& event) = 0;
 
   /**
-   * @brief Called to find a child by an alias.
-   *
-   * If an alias for a child exists, return the child otherwise return an empty handle.
-   * For example 'previous' could return the last selected child.
-   * @pre The Actor has been initialized.
-   * @param[in] actorAlias the name of the actor to find
-   * @return A handle to the actor if found, or an empty handle if not.
-   */
-  virtual Dali::Actor GetChildByAlias(const std::string& actorAlias) = 0;
-
-  /**
    * Return the natural size of the actor
    *
    * @return The actor's natural size