-#ifndef __DALI_CONSTRAINT_H__
-#define __DALI_CONSTRAINT_H__
+#ifndef DALI_CONSTRAINT_H
+#define DALI_CONSTRAINT_H
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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
+#include <cstdint> // uint32_t
+
// INTERNAL INCLUDES
#include <dali/public-api/animation/constraint-source.h>
#include <dali/public-api/common/dali-vector.h>
class ConstraintBase;
}
-typedef Vector< PropertyInput* > PropertyInputContainer;
+using PropertyInputContainer = Vector<PropertyInput*>;
/**
* @brief An abstract base class for Constraints.
* @endcode
* @SINCE_1_0.0
*/
-class DALI_IMPORT_API Constraint : public BaseHandle
+class DALI_CORE_API Constraint : public BaseHandle
{
public:
* @brief Used to call the function to copy the stored object.
* @SINCE_1_0.0
*/
- typedef UndefinedClass* (*CopyConstructorDispatcher) ( UndefinedClass* object );
+ using CopyConstructorDispatcher = UndefinedClass* (*)( UndefinedClass* );
/**
* @brief Copies the actual object in Constraint::Function.
}
};
- /**
- * @brief Undefined copy constructor.
- * @SINCE_1_0.0
- */
- Function( const Function& );
-
- /**
- * @brief Undefined assignment operator.
- * @SINCE_1_0.0
- */
- Function& operator=( const Function& );
+ Function( const Function& ) = delete; ///< Deleted copy constructor. @SINCE_1_0.0
+ Function( Function&& ) = delete; ///< Deleted move constructor. @SINCE_1_9.25
+ Function& operator=( const Function& ) = delete; ///< Deleted copy assignment operator. @SINCE_1_0.0
+ Function& operator=( Function&& ) = delete; ///< Deleted move assignment operator. @SINCE_1_9.25
/**
* @brief Constructor used when copying the stored object.
*/
enum RemoveAction
{
- Bake, ///< When the constraint is fully-applied, the constrained value is saved. @SINCE_1_0.0
- Discard ///< When the constraint is removed, the constrained value is discarded. @SINCE_1_0.0
+ BAKE, ///< When the constraint is fully-applied, the constrained value is saved. @SINCE_1_9.28
+ DISCARD ///< When the constraint is removed, the constrained value is discarded. @SINCE_1_9.28
};
- static const RemoveAction DEFAULT_REMOVE_ACTION; ///< Bake
+ static const RemoveAction DEFAULT_REMOVE_ACTION; ///< BAKE
/**
* @brief Creates an uninitialized Constraint; this can be initialized with Constraint::New().
Constraint& operator=( const Constraint& rhs );
/**
+ * @brief Move constructor.
+ *
+ * @SINCE_1_9.22
+ * @param[in] rhs A reference to the moved handle
+ */
+ Constraint( Constraint&& rhs );
+
+ /**
+ * @brief Move assignment operator.
+ *
+ * @SINCE_1_9.22
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this handle
+ */
+ Constraint& operator=( Constraint&& rhs );
+
+ /**
* @brief Downcasts a handle to Constraint handle.
*
* If handle points to a Constraint object, the downcast produces valid handle.
Dali::Property::Index GetTargetProperty();
/**
- * @brief Sets the remove action. Constraint::Bake will "bake" a value when fully-applied.
+ * @brief Sets the remove action. Constraint::BAKE will "bake" a value when fully-applied.
*
- * In case of Constraint::Discard, the constrained value will be discarded, when the constraint is removed.
- * The default value is Constraint::Bake.
+ * In case of Constraint::DISCARD, the constrained value will be discarded, when the constraint is removed.
+ * The default value is Constraint::BAKE.
* @SINCE_1_0.0
* @param[in] action The remove-action
*/
* @SINCE_1_0.0
* @param[in] tag An integer to identify the constraint
*/
- void SetTag( const unsigned int tag );
+ void SetTag( const uint32_t tag );
/**
* @brief Gets the tag.
* @SINCE_1_0.0
* @return The tag
*/
- unsigned int GetTag() const;
+ uint32_t GetTag() const;
public: // Not intended for use by Application developers
*/
} // namespace Dali
-#endif // __DALI_CONSTRAINT_H__
+#endif // DALI_CONSTRAINT_H