TextArray is now a Dali::Vector instead a std::vector.
Change-Id: I49930f74969b8b7b7562b57f104baf1ebcf3585a
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
* @param[in] location The TEST_LOCATION macro should be used here
*/
template<>
-inline void DALI_TEST_EQUALS<const TextArray&>( const TextArray& str1, const TextArray& str2, const char* location)
+inline void DALI_TEST_EQUALS<const Integration::TextArray&>( const Integration::TextArray& str1, const Integration::TextArray& str2, const char* location)
{
- if (!std::equal(str1.begin(), str1.end(), str2.begin()))
+ if (!std::equal(str1.Begin(), str1.End(), str2.Begin()))
{
fprintf(stderr, "%s, checking '", location);
- for( unsigned int i = 0; i < str1.size(); ++i)
+ for( unsigned int i = 0; i < str1.Count(); ++i)
{
fprintf(stderr, "%c", str1[i]);
}
fprintf(stderr, "' == '");
- for( unsigned int i = 0; i < str2.size(); ++i)
+ for( unsigned int i = 0; i < str2.Count(); ++i)
{
fprintf(stderr, "%c", str2[i]);
}
/**
* @copydoc PlatformAbstraction::GetFontFamilyForChars()
*/
-const std::string& TestPlatformAbstraction::GetFontFamilyForChars(const TextArray& charsRequested) const
+const std::string& TestPlatformAbstraction::GetFontFamilyForChars(const Integration::TextArray& charsRequested) const
{
mTrace.PushCall("GetFontFamilyForChars", "");
return mGetDefaultFontFamilyResult;
/**
* @copydoc PlatformAbstraction::AllGlyphsSupported()
*/
-bool TestPlatformAbstraction::AllGlyphsSupported(const std::string& name, const std::string& fontStyle, const TextArray& text) const
+bool TestPlatformAbstraction::AllGlyphsSupported(const std::string& name, const std::string& fontStyle, const Integration::TextArray& text) const
{
mTrace.PushCall("AllGlyphsSupported", "");
return true;
/**
* @copydoc PlatformAbstraction::GetFontFamilyForChars()
*/
- virtual const std::string& GetFontFamilyForChars(const TextArray& charsRequested) const;
+ virtual const std::string& GetFontFamilyForChars(const Integration::TextArray& charsRequested) const;
/**
* @copydoc PlatformAbstraction::AllGlyphsSupported()
*/
- virtual bool AllGlyphsSupported(const std::string& name, const std::string& fontStyle, const TextArray& text) const;
+ virtual bool AllGlyphsSupported(const std::string& name, const std::string& fontStyle, const Integration::TextArray& text) const;
/**
* @copydoc PlatformAbstraction::ValidateFontFamilyName()
* Otherwise returns closest match.
* @param[in] charsRequested displayed text.
*/
- virtual const StyledFontFamily& GetFontFamilyForChars( const TextArray& charsRequested ) = 0;
+ virtual const StyledFontFamily& GetFontFamilyForChars( const Integration::TextArray& charsRequested ) = 0;
/**
* Checks whether all characters of text could be displayed with specified font family.
* @param[in] styledFontFamily The name of the font's family and the font's style.
* @param[in] text displayed text.
*/
- virtual bool AllGlyphsSupported( const StyledFontFamily& styledFontFamily, const TextArray& text ) = 0;
+ virtual bool AllGlyphsSupported( const StyledFontFamily& styledFontFamily, const Integration::TextArray& text ) = 0;
/**
* Set the default font family and its style that should be used by the font controller.
return validFont;
}
-const FontController::StyledFontFamily& FontController::GetFontFamilyForChars( const TextArray& charsRequested )
+const FontController::StyledFontFamily& FontController::GetFontFamilyForChars( const Integration::TextArray& charsRequested )
{
if( 0u == mPreferredFonts.Count() )
{
}
}
-bool FontController::AllGlyphsSupported( const StyledFontFamily& styledFontFamily, const TextArray& text )
+bool FontController::AllGlyphsSupported( const StyledFontFamily& styledFontFamily, const Integration::TextArray& text )
{
// The font has already been validated by the font implementation.
( character == UNICODE_CR_LF ) );
}
-bool FontController::FontFamilySupportsText( const StyledFontFamily& styledFontFamily, const TextArray& text )
+bool FontController::FontFamilySupportsText( const StyledFontFamily& styledFontFamily, const Integration::TextArray& text )
{
FcCharSet* charSet = GetCachedFontCharacterSet( styledFontFamily );
DALI_ASSERT_ALWAYS( charSet && "No cached character set for font family" );
- const size_t textLength = text.size();
+ const size_t textLength = text.Count();
// quick early exit before accessing font config for text arrays which are just a single control character
if( textLength == 1u )
{
- if( IsAControlCharacter( *text.begin() ) )
+ if( IsAControlCharacter( *text.Begin() ) )
{
return true;
}
// protect font config
boost::mutex::scoped_lock fcLock( mFontConfigMutex );
- for( TextArray::const_iterator iter = text.begin(), endIter = text.end(); iter != endIter; ++iter )
+ for( Integration::TextArray::ConstIterator iter = text.Begin(), endIter = text.End(); iter != endIter; ++iter )
{
const uint32_t character = (*iter);
return fontset;
}
-_FcCharSet* FontController::CreateCharacterSet( const TextArray& charsRequested )
+_FcCharSet* FontController::CreateCharacterSet( const Integration::TextArray& charsRequested )
{
// create the character set object
FcCharSet* charSet = FcCharSetCreate();
bool validCharAdded(false);
// add valid characters to the character set.
- for( TextArray::const_iterator iter = charsRequested.begin(), endIter = charsRequested.end(); iter != endIter; ++iter )
+ for( Integration::TextArray::ConstIterator iter = charsRequested.Begin(), endIter = charsRequested.End(); iter != endIter; ++iter )
{
const uint32_t character = (*iter);
/**
* @copydoc Dali::Platform::FontController::GetFontFamilyForChars()
*/
- virtual const StyledFontFamily& GetFontFamilyForChars( const TextArray& charsRequested);
+ virtual const StyledFontFamily& GetFontFamilyForChars( const Integration::TextArray& charsRequested);
/**
* @copydoc Dali::Platform::FontController::AllGlyphsSupported()
*/
- virtual bool AllGlyphsSupported( const StyledFontFamily& styledFontFamily, const TextArray& text );
+ virtual bool AllGlyphsSupported( const StyledFontFamily& styledFontFamily, const Integration::TextArray& text );
/**
* @copydoc Dali::Platform::FontController::SetDefaultFontFamily()
* @param text text array.
* @return true if the font family supports the text false if not.
*/
- bool FontFamilySupportsText( const StyledFontFamily& styledFontFamily, const TextArray& text );
+ bool FontFamilySupportsText( const StyledFontFamily& styledFontFamily, const Integration::TextArray& text );
/**
* Clear the font family cache.
* @param charsRequested array of characters.
* @return a pointer to _FcCharSet object on success, NULL on failure.
*/
- _FcCharSet* CreateCharacterSet( const TextArray& charsRequested );
+ _FcCharSet* CreateCharacterSet( const Integration::TextArray& charsRequested );
/**
* Add a font that has not been found on the system but a match has been found.
return mImpl->IsLoading();
}
-const std::string& ResourceLoader::GetFontFamilyForChars( const TextArray& charsRequested )
+const std::string& ResourceLoader::GetFontFamilyForChars( const Integration::TextArray& charsRequested )
{
return mImpl->mFontController->GetFontFamilyForChars( charsRequested ).first;
}
-bool ResourceLoader::AllGlyphsSupported( const std::string& fontFamily, const std::string& fontStyle, const TextArray& charsRequested )
+bool ResourceLoader::AllGlyphsSupported( const std::string& fontFamily, const std::string& fontStyle, const Integration::TextArray& charsRequested )
{
// At this point fontFamily and fontStyle must have been validated.
/**
* @copydoc PlatformAbstraction::GetFontFamilyForChars()
*/
- const std::string& GetFontFamilyForChars(const TextArray& charsRequested);
+ const std::string& GetFontFamilyForChars(const Integration::TextArray& charsRequested);
/**
* @copydoc PlatformAbstraction::AllGlyphsSupported()
*/
- bool AllGlyphsSupported(const std::string& fontFamily, const std::string& fontStyle, const TextArray& charsRequested);
+ bool AllGlyphsSupported(const std::string& fontFamily, const std::string& fontStyle, const Integration::TextArray& charsRequested);
/**
* @copydoc PlatformAbstraction::ValidateFontFamilyName()
}
}
-const std::string& SlpPlatformAbstraction::GetFontFamilyForChars(const TextArray& charsRequested) const
+const std::string& SlpPlatformAbstraction::GetFontFamilyForChars(const Integration::TextArray& charsRequested) const
{
if( mResourceLoader )
{
return NULL_FONT_FAMILY_NAME;
}
-bool SlpPlatformAbstraction::AllGlyphsSupported(const std::string &fontFamily, const std::string& fontStyle, const TextArray& charsRequested) const
+bool SlpPlatformAbstraction::AllGlyphsSupported(const std::string &fontFamily, const std::string& fontStyle, const Integration::TextArray& charsRequested) const
{
bool ret = false;
if (mResourceLoader)
/**
* @copydoc PlatformAbstraction::GetFontFamilyForChars()
*/
- const std::string& GetFontFamilyForChars(const TextArray& charsRequested) const;
+ const std::string& GetFontFamilyForChars(const Integration::TextArray& charsRequested) const;
/**
* @copydoc PlatformAbstraction::AllGlyphsSupported()
*/
- bool AllGlyphsSupported(const std::string &fontFamily, const std::string& fontStyle, const TextArray& charsRequested) const;
+ bool AllGlyphsSupported(const std::string &fontFamily, const std::string& fontStyle, const Integration::TextArray& charsRequested) const;
/**
* @copydoc PlatformAbstraction::ValidateFontFamilyName()