2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali/internal/update/animation/scene-graph-constraint.h>
28 uint32_t ConstraintBase::mCurrentInstanceCount = 0;
29 uint32_t ConstraintBase::mTotalInstanceCount = 0;
32 ConstraintBase::ConstraintBase(PropertyOwnerContainer& ownerSet, RemoveAction removeAction)
33 : mRemoveAction(removeAction),
36 mObservedOwners(ownerSet),
37 mLifecycleObserver(nullptr)
40 ++mCurrentInstanceCount;
41 ++mTotalInstanceCount;
45 ConstraintBase::~ConstraintBase()
52 if(mLifecycleObserver != nullptr)
54 mLifecycleObserver->ObjectDestroyed();
58 --mCurrentInstanceCount;
62 uint32_t ConstraintBase::GetCurrentInstanceCount()
65 return mCurrentInstanceCount;
71 uint32_t ConstraintBase::GetTotalInstanceCount()
74 return mTotalInstanceCount;
80 } // namespace SceneGraph
82 } // namespace Internal