The RunArray
class is a base class for building classes which represent data that is associated with runs of text. More...
#include <RunArrays.h>
RunArray
object from a pre-existing array of limit indices. More...
RunArray
object. More...
The RunArray
class is a base class for building classes which represent data that is associated with runs of text.
This class maintains an array of limit indices into the text, subclasses provide one or more arrays of data.
Definition at line 50 of file RunArrays.h.
◆ RunArray() [1/2] icu::RunArray::RunArray ( const le_int32 * limits, le_int32 count ) inlineConstruct a RunArray
object from a pre-existing array of limit indices.
RunArray
object is destroyed. count is the number of entries in the limit array.
Definition at line 236 of file RunArrays.h.
◆ RunArray() [2/2] icu::RunArray::RunArray ( le_int32 initialCapacity )Construct an empty RunArray
object.
Clients can add limit indices array using the add
method.
The destructor; virtual so that subclass destructors are invoked as well.
Add a limit index to the limit indices array and return the run index where it was stored.
If the array does not exist, it will be created by calling the init
method. If it is full, it will be grown by calling the grow
method.
If the RunArray
object was created with a client-supplied limit indices array, this method will return a run index of -1.
Subclasses should not override this method. Rather they should provide a new add
method which takes a limit index along with whatever other data they implement. The new add
method should first call this method to grow the data arrays, and use the return value to store the data in their own arrays.
Get the number of entries in the limit indices array.
Definition at line 242 of file RunArrays.h.
◆ getDynamicClassID() UClassID icu::RunArray::getDynamicClassID ( ) const inlineoverridevirtual ◆ getLimit() [1/2] le_int32 icu::RunArray::getLimit ( ) const inlineGet the last limit index.
This is the number of characters in the text.
Definition at line 261 of file RunArrays.h.
◆ getLimit() [2/2] le_int32 icu::RunArray::getLimit ( le_int32 run ) const inlineGet the limit index for a particular run of text.
run
is out of bounds.
Definition at line 252 of file RunArrays.h.
◆ getStaticClassID() static UClassID icu::RunArray::getStaticClassID ( ) inlinestaticICU "poor man's RTTI", returns a UClassID for this class.
Definition at line 157 of file RunArrays.h.
◆ grow() virtual void icu::RunArray::grow ( le_int32 capacity ) protectedvirtualGrow a data array to the given initial size.
This method will be called by the add
method if the limit indices array is full. Subclasses which override this method must also call it from the overriding method to grow the limit indices array.
Reimplemented in icu::ValueRuns, icu::LocaleRuns, and icu::FontRuns.
◆ init() virtual void icu::RunArray::init ( le_int32 capacity ) protectedvirtualCreate a data array with the given initial size.
This method will be called by the add
method if there is no limit indices array. Subclasses which override this method must also call it from the overriding method to create the limit indices array.
Reimplemented in icu::ValueRuns, icu::LocaleRuns, and icu::FontRuns.
◆ reset() void icu::RunArray::reset ( ) inlineReset the limit indices array.
This method sets the number of entries in the limit indices array to zero. It does not delete the array.
Note: Subclass arrays will also be reset and not deleted.
Definition at line 247 of file RunArrays.h.
◆ fClientArrays le_bool icu::RunArray::fClientArrays protectedSet by the constructors to indicate whether or not the client supplied the data arrays.
If they were supplied by the client, the add
method won't change the arrays and the destructor won't delete them.
Definition at line 204 of file RunArrays.h.
The documentation for this class was generated from the following file:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4