{
Property::Value value( Property::ARRAY );
Property::Array* array = value.GetArray();
- size_t count( mValue.Size() );
+ uint32_t count = static_cast<uint32_t>( mValue.Size() );
if( array )
{
array->Reserve( count );
- for( size_t i( 0 ); i != count; ++i )
+ for( uint32_t i( 0 ); i != count; ++i )
{
array->PushBack( mValue[i] );
}
{
Property::Value value( Property::ARRAY );
Property::Array* array = value.GetArray();
- size_t count( mProgress.Size() );
+ uint32_t count = static_cast<uint32_t>( mProgress.Size() );
if( array )
{
array->Reserve( count );
- for( size_t i( 0 ); i != count; ++i )
+ for( uint32_t i( 0 ); i != count; ++i )
{
array->PushBack( mProgress[i] );
}
const Property::Array* array = propertyValue.GetArray();
if( array )
{
- size_t propertyArrayCount = array->Count();
+ uint32_t propertyArrayCount = static_cast<uint32_t>( array->Count() );
if( index == Dali::LinearConstrainer::Property::VALUE )
{
mValue.Clear(); // remove old values
mValue.Resize( propertyArrayCount );
- for( size_t i(0); i != propertyArrayCount; ++i )
+ for( uint32_t i(0); i != propertyArrayCount; ++i )
{
array->GetElementAt( i ).Get( mValue[ i ] );
}
{
mProgress.Clear(); // remove old values
mProgress.Resize( propertyArrayCount );
- for( size_t i(0); i != propertyArrayCount; ++i )
+ for( uint32_t i(0); i != propertyArrayCount; ++i )
{
array->GetElementAt( i ).Get( mProgress[ i ] );
}
Property::Value value( Property::ARRAY );
Property::Array* array = value.GetArray();
const Dali::Vector<Vector3>& point = mPath->GetPoints();
- Property::Array::SizeType pointCount = point.Size();
+ Property::Array::SizeType pointCount = static_cast<Property::Array::SizeType>( point.Size() );
if( array )
{
Property::Value value( Property::ARRAY );
Property::Array* array = value.GetArray();
const Dali::Vector<Vector3>& point = mPath->GetControlPoints();
- Property::Array::SizeType pointCount = point.Size();
+ Property::Array::SizeType pointCount = static_cast<Property::Array::SizeType>( point.Size() );
if( array )
{
return mCreate;
}
-size_t TypeInfo::GetActionCount() const
+uint32_t TypeInfo::GetActionCount() const
{
- size_t count = mActions.size();
+ uint32_t count = static_cast<uint32_t>( mActions.size() );
if( GetBaseType( mBaseType, mTypeRegistry, mBaseTypeName ) )
{
return count;
}
-std::string TypeInfo::GetActionName(size_t index) const
+std::string TypeInfo::GetActionName( uint32_t index ) const
{
std::string name;
- const size_t count = mActions.size();
+ const uint32_t count = static_cast<uint32_t>( mActions.size() );
if( index < count )
{
return name;
}
-size_t TypeInfo::GetSignalCount() const
+uint32_t TypeInfo::GetSignalCount() const
{
- size_t count = mSignalConnectors.size();
+ uint32_t count = static_cast<uint32_t>( mSignalConnectors.size() );
if( GetBaseType( mBaseType, mTypeRegistry, mBaseTypeName ) )
{
return count;
}
-std::string TypeInfo::GetSignalName(size_t index) const
+std::string TypeInfo::GetSignalName( uint32_t index ) const
{
std::string name;
- const size_t count = mSignalConnectors.size();
+ const uint32_t count = static_cast<uint32_t>( mSignalConnectors.size() );
if( index < count )
{
/**
* @copydoc Dali::TypeInfo::GetActionCount
*/
- size_t GetActionCount() const;
+ uint32_t GetActionCount() const;
/**
* @copydoc Dali::TypeInfo::GetActionName
*/
- std::string GetActionName(size_t index) const;
+ std::string GetActionName( uint32_t index ) const;
/**
* @copydoc Dali::TypeInfo::GetSignalCount
*/
- size_t GetSignalCount() const;
+ uint32_t GetSignalCount() const;
/**
* @copydoc Dali::TypeInfo::GetSignalName
*/
- std::string GetSignalName(size_t index) const;
+ std::string GetSignalName( uint32_t index ) const;
/**
* @copydoc Dali::TypeInfo::GetPropertyCount
return GetTypeInfo( typeName );
}
-size_t TypeRegistry::GetTypeNameCount() const
+uint32_t TypeRegistry::GetTypeNameCount() const
{
- return mRegistryLut.size();
+ return static_cast<uint32_t>( mRegistryLut.size() );
}
-std::string TypeRegistry::GetTypeName( size_t index ) const
+std::string TypeRegistry::GetTypeName( uint32_t index ) const
{
std::string name;
/**
* @copydoc Dali::TypeRegistry::GetTypeNameCount
*/
- size_t GetTypeNameCount() const;
+ uint32_t GetTypeNameCount() const;
/**
* @copydoc Dali::TypeRegistry::GetTypeName
*/
- std::string GetTypeName(size_t index) const;
+ std::string GetTypeName( uint32_t index ) const;
/**
* Register a type
mPanGestureProcessor.SetPredictionMode(mode);
}
-void GestureEventProcessor::SetPanGesturePredictionAmount( unsigned int amount )
+void GestureEventProcessor::SetPanGesturePredictionAmount( uint32_t amount )
{
mPanGestureProcessor.SetPredictionAmount(amount);
}
-void GestureEventProcessor::SetPanGestureMaximumPredictionAmount( unsigned int amount )
+void GestureEventProcessor::SetPanGestureMaximumPredictionAmount( uint32_t amount )
{
mPanGestureProcessor.SetMaximumPredictionAmount(amount);
}
-void GestureEventProcessor::SetPanGestureMinimumPredictionAmount( unsigned int amount )
+void GestureEventProcessor::SetPanGestureMinimumPredictionAmount( uint32_t amount )
{
mPanGestureProcessor.SetMinimumPredictionAmount(amount);
}
-void GestureEventProcessor::SetPanGesturePredictionAmountAdjustment( unsigned int amount )
+void GestureEventProcessor::SetPanGesturePredictionAmountAdjustment( uint32_t amount )
{
mPanGestureProcessor.SetPredictionAmountAdjustment(amount);
}
-void GestureEventProcessor::SetPanGestureSmoothingMode(int mode)
+void GestureEventProcessor::SetPanGestureSmoothingMode( int32_t mode )
{
mPanGestureProcessor.SetSmoothingMode(mode);
}
mPanGestureProcessor.SetUseActualTimes( value );
}
-void GestureEventProcessor::SetPanGestureInterpolationTimeRange( int value )
+void GestureEventProcessor::SetPanGestureInterpolationTimeRange( int32_t value )
{
mPanGestureProcessor.SetInterpolationTimeRange( value );
}
mPanGestureProcessor.SetTwoPointAccelerationBias( value );
}
-void GestureEventProcessor::SetPanGestureMultitapSmoothingRange( int value )
+void GestureEventProcessor::SetPanGestureMultitapSmoothingRange( int32_t value )
{
mPanGestureProcessor.SetMultitapSmoothingRange( value );
}
*
* @param[in] mode The prediction mode to use
*/
- void SetPanGesturePredictionMode( int mode );
+ void SetPanGesturePredictionMode( int32_t mode );
/**
* @brief Sets the prediction amount of the pan gesture
*
* @param[in] amount The prediction amount in milliseconds
*/
- void SetPanGesturePredictionAmount( unsigned int amount );
+ void SetPanGesturePredictionAmount( uint32_t amount );
/**
* @brief Sets the upper bound of the prediction amount for clamping
*
* @param[in] amount The prediction amount in milliseconds
*/
- void SetPanGestureMaximumPredictionAmount( unsigned int amount );
+ void SetPanGestureMaximumPredictionAmount( uint32_t amount );
/**
* @brief Sets the lower bound of the prediction amount for clamping
*
* @param[in] amount The prediction amount in milliseconds
*/
- void SetPanGestureMinimumPredictionAmount( unsigned int amount );
+ void SetPanGestureMinimumPredictionAmount( uint32_t amount );
/**
* @brief Sets the prediction amount to adjust when the pan velocity is changed.
*
* @param[in] amount The prediction amount in milliseconds
*/
- void SetPanGesturePredictionAmountAdjustment( unsigned int amount );
+ void SetPanGesturePredictionAmountAdjustment( uint32_t amount );
/**
* @brief Called to set how pan gestures smooth input
*
* @param[in] mode The smoothing mode to use
*/
- void SetPanGestureSmoothingMode( int mode );
+ void SetPanGestureSmoothingMode( int32_t mode );
/**
* @brief Sets the prediction amount of the pan gesture
*
* @param[in] value Time range in ms
*/
- void SetPanGestureInterpolationTimeRange( int value );
+ void SetPanGestureInterpolationTimeRange( int32_t value );
/**
* @brief Sets whether to use scalar only prediction, which when enabled, ignores acceleration.
*
* @param[in] value Time in past in ms
*/
- void SetPanGestureTwoPointInterpolatePastTime( int value );
+ void SetPanGestureTwoPointInterpolatePastTime( int32_t value );
/**
* @brief Sets the two point velocity bias. This is the ratio of first and second points to use for velocity.
*
* @param[in] value Time in past in ms
*/
- void SetPanGestureMultitapSmoothingRange( int value );
+ void SetPanGestureMultitapSmoothingRange( int32_t value );
public: // needed for PanGesture
}
}
-unsigned int PanGestureDetector::GetMinimumTouchesRequired() const
+uint32_t PanGestureDetector::GetMinimumTouchesRequired() const
{
return mMinimumTouches;
}
-unsigned int PanGestureDetector::GetMaximumTouchesRequired() const
+uint32_t PanGestureDetector::GetMaximumTouchesRequired() const
{
return mMaximumTouches;
}
AddAngle( direction, threshold );
}
-size_t PanGestureDetector::GetAngleCount() const
+uint32_t PanGestureDetector::GetAngleCount() const
{
- return mAngleContainer.size();
+ return static_cast<uint32_t>( mAngleContainer.size() );
}
-PanGestureDetector::AngleThresholdPair PanGestureDetector::GetAngle(size_t index) const
+PanGestureDetector::AngleThresholdPair PanGestureDetector::GetAngle(uint32_t index) const
{
PanGestureDetector::AngleThresholdPair ret( Radian(0),Radian(0) );
/**
* @copydoc Dali::PanGestureDetector::GetMinimumTouchesRequired() const
*/
- unsigned int GetMinimumTouchesRequired() const;
+ uint32_t GetMinimumTouchesRequired() const;
/**
* @copydoc Dali::PanGestureDetector::GetMaximumTouchesRequired() const
*/
- unsigned int GetMaximumTouchesRequired() const;
+ uint32_t GetMaximumTouchesRequired() const;
/**
* @copydoc Dali::PanGestureDetector::AddAngle()
/**
* @copydoc Dali::PanGestureDetector::GetAngleCount()
*/
- size_t GetAngleCount() const;
+ uint32_t GetAngleCount() const;
/**
* @copydoc Dali::PanGestureDetector::GetAngle()
*/
- AngleThresholdPair GetAngle(size_t index) const;
+ AngleThresholdPair GetAngle(uint32_t index) const;
/**
* @copydoc Dali::PanGestureDetector::ClearAngles()
return geometry;
}
-std::size_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
+uint32_t Geometry::AddVertexBuffer( PropertyBuffer& vertexBuffer )
{
mVertexBuffers.push_back( &vertexBuffer );
SceneGraph::AttachVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, *vertexBuffer.GetRenderObject() );
- return mVertexBuffers.size() - 1u;
+ return static_cast<uint32_t>( mVertexBuffers.size() - 1u );
}
-std::size_t Geometry::GetNumberOfVertexBuffers() const
+uint32_t Geometry::GetNumberOfVertexBuffers() const
{
- return mVertexBuffers.size();
+ return static_cast<uint32_t>( mVertexBuffers.size() );
}
-void Geometry::RemoveVertexBuffer( std::size_t index )
+void Geometry::RemoveVertexBuffer( uint32_t index )
{
const Render::PropertyBuffer& renderPropertyBuffer = static_cast<const Render::PropertyBuffer&>( *(mVertexBuffers[index]->GetRenderObject()) );
SceneGraph::RemoveVertexBufferMessage( mEventThreadServices.GetUpdateManager(), *mRenderObject, renderPropertyBuffer );
mVertexBuffers.erase( mVertexBuffers.begin() + index );
}
-void Geometry::SetIndexBuffer( const uint16_t* indices, size_t count )
+void Geometry::SetIndexBuffer( const uint16_t* indices, uint32_t count )
{
Dali::Vector<uint16_t> indexData;
if( indices && count )
}
}
-
} // namespace Internal
+
} // namespace Dali
/**
* @copydoc Dali::Geometry::AddVertexBuffer()
*/
- std::size_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
+ uint32_t AddVertexBuffer( PropertyBuffer& vertexBuffer );
/**
* @copydoc Dali::Geometry::GetNumberOfVertexBuffers()
*/
- std::size_t GetNumberOfVertexBuffers() const;
+ uint32_t GetNumberOfVertexBuffers() const;
/**
* @copydoc Dali::Geometry::RemoveVertexBuffer()
*/
- void RemoveVertexBuffer( std::size_t index );
+ void RemoveVertexBuffer( uint32_t index );
/**
* @copydoc Dali::Geometry::SetIndexBuffer()
*/
- void SetIndexBuffer( const uint16_t* indices, size_t count );
+ void SetIndexBuffer( const uint16_t* indices, uint32_t count );
/**
* @copydoc Dali::Geometry::SetType()
}
// Called from event thread
-uint32_t* MessageQueue::ReserveMessageSlot( std::size_t requestedSize, bool updateScene )
+uint32_t* MessageQueue::ReserveMessageSlot( uint32_t requestedSize, bool updateScene )
{
DALI_ASSERT_DEBUG( 0 != requestedSize );
* @param[in] updateScene If set to true, denotes that the message will cause the scene graph node tree to require an update
* @return A pointer to the first char allocated for the message
*/
- uint32_t* ReserveMessageSlot( std::size_t size, bool updateScene );
+ uint32_t* ReserveMessageSlot( uint32_t size, bool updateScene );
/**
* Flushes the message queue
private:
// Not copyable:
- MessageQueue ( const MessageQueue& rhs );
- MessageQueue& operator=( const MessageQueue& rhs );
+ MessageQueue() = delete;
+ MessageQueue ( const MessageQueue& rhs ) = delete;
+ MessageQueue& operator=( const MessageQueue& rhs ) = delete;
private:
PanGestureDetector::AngleThresholdPair PanGestureDetector::GetAngle(size_t index) const
{
- return GetImplementation(*this).GetAngle(index);
+ return GetImplementation(*this).GetAngle( static_cast<uint32_t>( index ) );
}
void PanGestureDetector::ClearAngles()
// EXTERNAL INCLUDES
#include <cmath>
-#include <cstring> // for memcpy
+#include <cstdint> // uint32_t
+#include <cstring> // memcpy
#include <ostream>
// INTERNAL INCLUDES
{
const float ROTATION_EPSILON = 0.003f; // Deliberately large
-const size_t NUM_BYTES_IN_ROW_OF_3( 3 * sizeof( float ) );
-const size_t NUM_BYTES_IN_ROW( 4 * sizeof( float ) );
-const size_t NUM_BYTES_IN_MATRIX( 16 * sizeof( float ) );
-const size_t ROW1_OFFSET( 4 );
-const size_t ROW2_OFFSET( 8 );
-const size_t ROW3_OFFSET( 12 );
+const uint32_t NUM_BYTES_IN_ROW_OF_3( 3 * sizeof( float ) );
+const uint32_t NUM_BYTES_IN_ROW( 4 * sizeof( float ) );
+const uint32_t NUM_BYTES_IN_MATRIX( 16 * sizeof( float ) );
+const uint32_t ROW1_OFFSET( 4 );
+const uint32_t ROW2_OFFSET( 8 );
+const uint32_t ROW3_OFFSET( 12 );
/**
* Helper to convert to Quaternion to float16 array
#include <dali/public-api/math/matrix3.h>
// EXTERNAL INCLUDES
-#include <cstring> // for memcpy
+#include <cstdint> // uint32_t
+#include <cstring> // memcpy
#include <ostream>
// INTERNAL INCLUDES
namespace
{
-const size_t NUM_BYTES_IN_ROW = 3*sizeof(float);
-const size_t NUM_BYTES_IN_MATRIX = 9*sizeof(float);
+const uint32_t NUM_BYTES_IN_ROW = 3*sizeof(float);
+const uint32_t NUM_BYTES_IN_MATRIX = 9*sizeof(float);
}
namespace Dali
{
// Use average rather than determinant to remove rounding to zero errors in further multiplication
float sum=0;
- for(size_t i=0;i<9;i++)
+ for(uint32_t i=0;i<9;i++)
{
sum+=fabsf(cof[i]);
}
float Matrix3::Magnitude() const
{
float avg=0;
- for(size_t i=0;i<9;i++)
+ for(uint32_t i=0;i<9;i++)
{
avg+=fabsf(mElements[i]);
}
std::string TypeInfo::GetActionName(size_t index)
{
- return GetImplementation(*this).GetActionName(index);
+ return GetImplementation(*this).GetActionName( static_cast<uint32_t>( index ) );
}
size_t TypeInfo::GetSignalCount() const
std::string TypeInfo::GetSignalName(size_t index)
{
- return GetImplementation(*this).GetSignalName(index);
+ return GetImplementation(*this).GetSignalName( static_cast<uint32_t>( index ) );
}
size_t TypeInfo::GetPropertyCount() const
*
*/
+// EXTERNAL INCLUDES
+#include <cstdint> // uint32_t
// INTERNAL INCLUDES
#include <dali/public-api/object/base-handle.h>
class DALI_CORE_API TypeInfo : public BaseHandle
{
public:
- typedef BaseHandle (*CreateFunction)(); ///< Function signature for creating an instance of the associated object type. @SINCE_1_0.0
- typedef bool (*ActionFunction)(BaseObject*, const std::string&, const Property::Map&); ///< Function signature for creating scriptable actions @SINCE_1_0.0
+ using CreateFunction = BaseHandle (*)(); ///< Function signature for creating an instance of the associated object type. @SINCE_1_0.0
+
+ using ActionFunction = bool (*)(BaseObject*, const std::string&, const Property::Map&); ///< Function signature for creating scriptable actions @SINCE_1_0.0
/**
* @brief Connects a callback function with the object's signals.
* @return True if the signal was connected
* @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.
*/
- typedef bool (*SignalConnectorFunction)(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
+ using SignalConnectorFunction = bool (*)(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor);
/**
* @brief Callback to set an event-thread only property.
* @param[in] value The new value of the property for the object specified
* @see PropertyRegistration.
*/
- typedef void (*SetPropertyFunction)( BaseObject* object, Property::Index index, const Property::Value& value );
+ using SetPropertyFunction = void (*)( BaseObject* object, Property::Index index, const Property::Value& value );
/**
* @brief Callback to get the value of an event-thread only property.
* @return The current value of the property for the object specified
* @see PropertyRegistration.
*/
- typedef Property::Value (*GetPropertyFunction)( BaseObject* object, Property::Index index );
+ using GetPropertyFunction = Property::Value (*)( BaseObject* object, Property::Index index );
/**
* @brief Allows the creation of an empty TypeInfo handle.
/**
* @brief Retrieves the number of event side type registered properties for this type.
*
- * This count does not include all properties.
* @SINCE_1_0.0
* @return The count
*/
std::string TypeRegistry::GetTypeName(size_t index) const
{
- return GetImplementation(*this).GetTypeName(index);
+ return GetImplementation(*this).GetTypeName( static_cast<uint32_t>( index ) );
}
TypeRegistry::TypeRegistry(Internal::TypeRegistry* internal)
void Geometry::RemoveVertexBuffer( std::size_t index )
{
- GetImplementation(*this).RemoveVertexBuffer( index );
+ GetImplementation(*this).RemoveVertexBuffer( static_cast<uint32_t>( index ) );
}
void Geometry::SetIndexBuffer( const uint16_t* indices, size_t count )
{
- GetImplementation(*this).SetIndexBuffer( indices, count );
+ GetImplementation(*this).SetIndexBuffer( indices, static_cast<uint32_t>( count ) );
}
void Geometry::SetType( Type geometryType )