Remove a few exports by getting rid of two std::vectors and two std::sets
[platform/core/uifw/dali-core.git] / dali / internal / update / animation / scene-graph-constraint-base.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/update/animation/scene-graph-constraint.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/animation/active-constraint.h>
23
24 namespace Dali
25 {
26
27 namespace Internal
28 {
29
30 namespace SceneGraph
31 {
32
33 #ifdef DEBUG_ENABLED
34   unsigned int ConstraintBase::mCurrentInstanceCount = 0;
35   unsigned int ConstraintBase::mTotalInstanceCount   = 0;
36 #endif
37
38 ConstraintBase::ConstraintBase( PropertyOwnerContainer& ownerSet )
39 : mWeight( Dali::ActiveConstraint::DEFAULT_WEIGHT ),
40   mRemoveAction( Dali::Constraint::DEFAULT_REMOVE_ACTION ),
41   mFirstApply( true ),
42   mDisconnected( true ),
43   mObservedOwners( ownerSet )
44 {
45 #ifdef DEBUG_ENABLED
46   ++mCurrentInstanceCount;
47   ++mTotalInstanceCount;
48 #endif
49 }
50
51 ConstraintBase::~ConstraintBase()
52 {
53   if ( !mDisconnected )
54   {
55     StopObservation();
56   }
57
58 #ifdef DEBUG_ENABLED
59   --mCurrentInstanceCount;
60 #ifndef EMSCRIPTEN
61   memset ( &mWeight, 0xFA, sizeof(mWeight) ); // Fill with garbage pattern to help detect invalid memory access
62 #endif
63 #endif
64 }
65
66 void ConstraintBase::ResetDefaultProperties( BufferIndex updateBufferIndex )
67 {
68   // Not used, since the weight property is reset by PropertyOwner
69   DALI_ASSERT_DEBUG( false );
70 }
71
72 unsigned int ConstraintBase::GetCurrentInstanceCount()
73 {
74 #ifdef DEBUG_ENABLED
75   return mCurrentInstanceCount;
76 #else
77   return 0u;
78 #endif
79 }
80
81 unsigned int ConstraintBase::GetTotalInstanceCount()
82 {
83 #ifdef DEBUG_ENABLED
84   return mTotalInstanceCount;
85 #else
86   return 0u;
87 #endif
88 }
89
90 } // namespace SceneGraph
91
92 } // namespace Internal
93
94 } // namespace Dali