}
catch ( DaliException& e )
{
- DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "! \"Property index is invalid", TEST_LOCATION );
+ DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "! \"Cannot find property index", TEST_LOCATION );
}
DALI_TEST_EQUALS( active.GetPropertyIndex( "invalid-property-name"), Property::INVALID_INDEX, TEST_LOCATION );
try
}
catch ( DaliException& e )
{
- DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "false && \"Property index not found", TEST_LOCATION );
+ DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "! \"Cannot find property index", TEST_LOCATION );
}
// Try to get an index that hasn't been added
}
catch ( DaliException& e )
{
- DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "false && \"Property index not found", TEST_LOCATION );
+ DALI_TEST_ASSERT_CONDITION_STARTS_WITH_SUBSTRING( e, "! \"Cannot find property index", TEST_LOCATION );
}
}
return GetImplementation(base).GetPropertyName( index );
}
+ DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
+
// Property not found, return reference to invalid property string.
static const std::string EMPTY_PROPERTY_NAME;
- DALI_LOG_WARNING( "Property index (%d) invalid", index );
return EMPTY_PROPERTY_NAME;
}
{
writable = GetImplementation(base).IsPropertyWritable( index );
}
+ else
+ {
+ DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
+ }
}
return writable;
{
type = GetImplementation(base).GetPropertyType( index );
}
+ else
+ {
+ DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
+ }
}
return type;
}
else
{
- DALI_ASSERT_ALWAYS( false && "Property index not found" );
+ DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
}
}
}
}
else
{
- DALI_ASSERT_ALWAYS( false && "Property name not found" );
+ DALI_ASSERT_ALWAYS( ! "Cannot find property name" );
}
}
}
return GetImplementation( base ).GetProperty( object, index );
}
- DALI_ASSERT_ALWAYS( false && "Property index not found" );
+ DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject
return Property::Value();
}
return GetImplementation( base ).GetProperty( object, name );
}
- DALI_ASSERT_ALWAYS( false && "Property name not found" );
+ DALI_ASSERT_ALWAYS( ! "Cannot find property name" );
return Property::Value();
}
namespace ImageFactoryCache
{
-class Request;
+struct Request;
}
/**
DALI_ASSERT_ALWAYS( numVertices > 0 && "Mesh has no vertices" );
DALI_ASSERT_ALWAYS( ( numVertices * 3 ) < DEFAULT_PROPERTY_MAX_COUNT && "Mesh exceeds maximum supported vertices" );
DALI_ASSERT_ALWAYS( faceIndices.size() > 0 && "Mesh has no faces" );
- for( Dali::AnimatableMesh::FacesConstIter faceIter=faceIndices.begin() ;
- faceIter != faceIndices.end() ;
+ for( Dali::AnimatableMesh::FacesConstIter faceIter=faceIndices.begin();
+ faceIter != faceIndices.end();
++faceIter )
{
unsigned int faceIndex = *faceIter;
return mNumberOfVertices;
}
-Property::Index AnimatableMesh::GetPropertyIndex(
+Property::Index AnimatableMesh::GetVertexPropertyIndex(
unsigned int vertex,
Property::Index property ) const
{
property = &mSceneObject->mVertices[vertexIndex].color;
break;
case Dali::AnimatableVertex::TEXTURE_COORDS:
- property = &mSceneObject->mVertices[vertexIndex].textureCoords ;
+ property = &mSceneObject->mVertices[vertexIndex].textureCoords;
break;
default:
/**
* Get the property index from the vertex index and the vertex property enumeration
*/
- using ProxyObject::GetPropertyIndex;
- Property::Index GetPropertyIndex( unsigned int vertex, Property::Index property ) const;
+ Property::Index GetVertexPropertyIndex( unsigned int vertex, Property::Index property ) const;
/**
* Set the given vertex position
FontMetricsIter iter = mMetricsCache.find( hashValue );
if ( iter == mMetricsCache.end() )
{
- metrics = FontMetrics::New( Vector2(mHorizontalDpi, mVerticalDpi), hashValue, mFontCount, fontFamily, fontStyle, mResourceClient );
+ metrics = FontMetrics::New( Vector2(mHorizontalDpi, mVerticalDpi), hashValue, mFontCount, fontFamily, fontStyle );
mFontCount++;
// load the global metrics
for( FontMetricsMap::const_iterator iter = mMetricsCache.begin(); iter != endIter; ++iter)
{
- const FontMetrics* metric( (*iter).second.Get() ) ;
+ const FontMetrics* metric( (*iter).second.Get() );
if( metric->GetFontId() == fontId)
{
const std::size_t hashValue,
const FontId fontId,
const std::string& fontFamily,
- const std::string& fontStyle,
- ResourceClient& resourceClient )
+ const std::string& fontStyle )
{
- return new FontMetrics( dpi, hashValue, fontId, fontFamily, fontStyle, resourceClient);
+ return new FontMetrics( dpi, hashValue, fontId, fontFamily, fontStyle );
}
void FontMetrics::LoadGlobalMetrics()
const std::size_t hashValue,
const FontId fontId,
const std::string& fontFamily,
- const std::string& fontStyle,
- ResourceClient& resourceClient )
+ const std::string& fontStyle )
:
mFontFamily(fontFamily),
mFontStyle(fontStyle),
// Forward declarations.
class FontMetrics;
-class ResourceClient;
typedef IntrusivePtr<FontMetrics> FontMetricsIntrusivePtr;
* @param [in] fontId font id.
* @param [in] fontFamily the font family
* @param [in] fontStyle the font style
- * @param [in] resourceClient resource client
* @return An intrusive-pointer to the new instance.
*/
static FontMetricsIntrusivePtr New( const Vector2& dpi,
const std::size_t hashValue,
const FontId fontId,
const std::string& fontFamily,
- const std::string& fontStyle,
- ResourceClient& resourceClient );
+ const std::string& fontStyle );
/**
const std::size_t hashValue,
const FontId fontId,
const std::string& fontFamily,
- const std::string& fontStyle,
- ResourceClient& resourceClient );
+ const std::string& fontStyle );
/**
* Virtual destructor.
{
DALI_ASSERT_ALWAYS( index < GetNumberOfVertices() && "Index out of bounds" );
- return GetImplementation(*this).GetPropertyIndex( index, property );
+ return GetImplementation(*this).GetVertexPropertyIndex( index, property );
}
Property AnimatableMesh::GetVertexProperty( unsigned int vertex, Property::Index property)
void AnimatableVertex::SetPosition(const Vector3& position)
{
- mMesh.SetProperty( mMesh.GetPropertyIndex(mVertex, POSITION), Property::Value(position) );
+ mMesh.SetProperty( mMesh.GetVertexPropertyIndex(mVertex, POSITION), Property::Value(position) );
}
void AnimatableVertex::SetColor(const Vector4& color)
{
- mMesh.SetProperty( mMesh.GetPropertyIndex(mVertex, COLOR), Property::Value(color) );
+ mMesh.SetProperty( mMesh.GetVertexPropertyIndex(mVertex, COLOR), Property::Value(color) );
}
void AnimatableVertex::SetTextureCoords(const Vector2& textureCoords)
{
- mMesh.SetProperty( mMesh.GetPropertyIndex(mVertex, TEXTURE_COORDS), Property::Value(textureCoords) );
+ mMesh.SetProperty( mMesh.GetVertexPropertyIndex(mVertex, TEXTURE_COORDS), Property::Value(textureCoords) );
}
Vector3 AnimatableVertex::GetCurrentPosition()
{
Vector3 position;
- mMesh.GetProperty( mMesh.GetPropertyIndex(mVertex, POSITION) ).Get(position);
+ mMesh.GetProperty( mMesh.GetVertexPropertyIndex(mVertex, POSITION) ).Get(position);
return position;
}
Vector4 AnimatableVertex::GetCurrentColor()
{
Vector4 color;
- mMesh.GetProperty( mMesh.GetPropertyIndex(mVertex, COLOR) ).Get(color);
+ mMesh.GetProperty( mMesh.GetVertexPropertyIndex(mVertex, COLOR) ).Get(color);
return color;
}
Vector2 AnimatableVertex::GetCurrentTextureCoords()
{
Vector2 textureCoords;
- mMesh.GetProperty( mMesh.GetPropertyIndex(mVertex, TEXTURE_COORDS) ).Get(textureCoords);
+ mMesh.GetProperty( mMesh.GetVertexPropertyIndex(mVertex, TEXTURE_COORDS) ).Get(textureCoords);
return textureCoords;
}