-LogicalModelPtr LogicalModel::New()
-{
- return LogicalModelPtr( new LogicalModel() );
-}
-
-void LogicalModel::SetText( const Character* const text,
- Length numberOfCharacters )
-{
- if( 0u == numberOfCharacters )
- {
- mText.Clear();
- }
- else
- {
- mText.Resize( numberOfCharacters );
- memcpy( mText.Begin(), text, numberOfCharacters * sizeof( Character ) );
- }
-}
-
-Length LogicalModel::GetNumberOfCharacters() const
-{
- return mText.Count();
-}
-
-void LogicalModel::GetText( Character* text,
- CharacterIndex characterIndex,
- Length numberOfCharacters ) const
-{
- memcpy( text, mText.Begin() + characterIndex, numberOfCharacters * sizeof( Character ) );
-}
-
-Character LogicalModel::GetCharacter( CharacterIndex characterIndex ) const
-{
- return mText[characterIndex];
-}
-
-void LogicalModel::ReplaceText( CharacterIndex characterIndex,
- Length numberOfCharactersToRemove,
- const Character* const text,
- Length numberOfCharactersToInsert )