1 #ifndef __DALI_INTERNAL_ANIMATOR_CONNECTOR_BASE_H__
2 #define __DALI_INTERNAL_ANIMATOR_CONNECTOR_BASE_H__
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://floralicense.org/license/
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
21 #include <boost/function.hpp>
24 #include <dali/internal/common/owner-pointer.h>
25 #include <dali/internal/common/owner-container.h>
26 #include <dali/public-api/animation/alpha-functions.h>
27 #include <dali/public-api/animation/time-period.h>
28 #include <dali/public-api/common/dali-common.h>
37 class AnimatorConnectorBase;
39 typedef OwnerPointer<AnimatorConnectorBase> AnimatorConnectorPtr;
41 typedef OwnerContainer< AnimatorConnectorBase* > AnimatorConnectorContainer;
43 typedef AnimatorConnectorContainer::Iterator AnimatorConnectorIter;
44 typedef AnimatorConnectorContainer::ConstIterator AnimatorConnectorConstIter;
47 * An abstract base class for animator connectors.
49 class AnimatorConnectorBase
56 AnimatorConnectorBase(AlphaFunction alpha, const TimePeriod& period)
58 mAlphaFunction(alpha),
66 virtual ~AnimatorConnectorBase()
71 * Set the parent of the AnimatorConnector.
72 * @pre The connector does not already have a parent.
73 * @param [in] parent The parent object.
75 virtual void SetParent(Animation& parent) = 0;
78 * Retrieve the parent of the AnimatorConnector.
79 * @return The parent object, or NULL.
81 Animation* GetParent()
88 Animation* mParent; ///< The parent owns the connector.
90 AlphaFunction mAlphaFunction;
91 TimePeriod mTimePeriod;
94 } // namespace Internal
98 #endif // __DALI_INTERNAL_ANIMATOR_CONNECTOR_BASE_H__