use modern construct 'nullptr' instead of 'NULL' or '0'
[platform/core/uifw/dali-core.git] / dali / internal / event / animation / constraint-source-impl.h
index 8fed26e..88c0eab 100644 (file)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTERNAL_CONSTRAINT_SOURCE_H__
-#define __DALI_INTERNAL_CONSTRAINT_SOURCE_H__
+#ifndef DALI_INTERNAL_CONSTRAINT_SOURCE_H
+#define DALI_INTERNAL_CONSTRAINT_SOURCE_H
 
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/animation/constraint-source.h>
-#include <dali/internal/event/common/proxy-object.h>
+#include <dali/internal/event/common/object-impl.h>
 
 namespace Dali
 {
@@ -30,8 +30,8 @@ namespace Internal
 {
 
 struct Source;
-typedef std::vector<Source> SourceContainer;
-typedef SourceContainer::iterator SourceIter;
+using SourceContainer = std::vector<Source>;
+using SourceIter      = SourceContainer::iterator;
 
 /**
  * The source of an input property for a constraint.
@@ -44,23 +44,23 @@ struct Source
   Source()
   : sourceType( OBJECT_PROPERTY ),
     propertyIndex( Property::INVALID_INDEX ),
-    object( NULL )
+    object( nullptr )
   {
   }
 
   /**
    * Create a constraint source from a public handle.
-   * The internal proxy object is not referenced by the Internal::Source; therefore
-   * the owner of this object is responsible for observing the ProxyObject's lifetime.
+   * The internal object is not referenced by the Internal::Source; therefore
+   * the owner of this object is responsible for observing the Object's lifetime.
    */
   Source( Dali::ConstraintSource& source )
   : sourceType( source.sourceType ),
     propertyIndex( source.propertyIndex ),
-    object( NULL )
+    object( nullptr )
   {
     if ( source.object )
     {
-      object = &dynamic_cast< ProxyObject& > ( GetImplementation(source.object) );
+      object = &dynamic_cast< Object& > ( GetImplementation(source.object) );
     }
   }
 
@@ -68,11 +68,11 @@ struct Source
 
   Property::Index propertyIndex; ///< The index of the source property
 
-  ProxyObject* object; ///< The target object; only valid if sourceType == OBJECT_PROPERTY
+  Object* object; ///< The target object; only valid if sourceType == OBJECT_PROPERTY
 };
 
 } // namespace Internal
 
 } // namespace Dali
 
-#endif // __DALI_INTERNAL_CONSTRAINT_SOURCE_H__
+#endif // DALI_INTERNAL_CONSTRAINT_SOURCE_H