-#ifndef __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H__
-#define __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H__
+#ifndef DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H
+#define DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_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.
*
*/
-// EXTERNAL INCLUDES
-
// INTERNAL INCLUDES
#include <dali/public-api/common/dali-vector.h>
+#include <dali/devel-api/common/owner-container.h>
#include <dali/internal/common/message.h>
-#include <dali/internal/common/owner-container.h>
#include <dali/internal/update/common/property-base.h>
#include <dali/internal/update/common/scene-graph-buffers.h>
#include <dali/internal/update/common/uniform-map.h>
* may not be called (i.e. when shutting down).
*/
virtual void PropertyOwnerDestroyed( PropertyOwner& owner ) = 0;
+
+ protected:
+
+ /**
+ * Virtual destructor, no deletion through this interface
+ */
+ virtual ~Observer() {}
+
};
/**
* @post The PropertyOwner takes ownership of the property.
* @param[in] property A pointer to a newly allocated property.
*/
- void InstallCustomProperty(PropertyBase* property);
+ void InstallCustomProperty( OwnerPointer<PropertyBase>& property );
/**
* Retrieve the custom properties owned by the object.
return mCustomProperties;
}
- /**
- * Reset animatable properties to the corresponding base values.
- * @param[in] currentBufferIndex The buffer to reset.
- * @post The ResetDefaultProperties method is called, during which derived classes can reset default properties.
- */
- void ResetToBaseValues( BufferIndex updateBufferIndex );
// Constraints
* Apply a constraint.
* @param[in] constraint The constraint to apply.
*/
- void ApplyConstraint( ConstraintBase* constraint );
+ void ApplyConstraint( OwnerPointer<ConstraintBase>& constraint );
/**
* Begin removal of constraints.
/**
* @copydoc UniformMap::Add
*/
- void AddUniformMapping( UniformPropertyMapping* map );
+ virtual void AddUniformMapping( OwnerPointer< UniformPropertyMapping >& map );
/**
* @copydoc UniformMap::Remove
*/
- void RemoveUniformMapping( const std::string& uniformName );
+ virtual void RemoveUniformMapping( const std::string& uniformName );
/**
* Get the mappings table
// Undefined
PropertyOwner& operator=(const PropertyOwner& rhs);
- /**
- * Called after ResetToBaseValues; derived classes should reset any default properties.
- * @param[in] currentBufferIndex The buffer to reset.
- */
- virtual void ResetDefaultProperties( BufferIndex updateBufferIndex ) {}
-
protected:
OwnedPropertyContainer mCustomProperties; ///< Properties provided with InstallCustomProperty()
} // namespace Dali
-#endif // __DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H__
+#endif // DALI_INTERNAL_SCENE_GRAPH_PROPERTY_OWNER_H