U_CAPI UBiDi* U_EXPORT2 ubidi_openSized (UTextOffset maxLength, UTextOffset maxRunCount, UErrorCode *pErrorCode)
Allocate a UBiDi structure with preallocated memory
for internal structures
Allocate aUBiDistructure with preallocated memory for internal structures. This function provides aUBiDiobject likeubidi_open()with no arguments, but it also preallocates memory for internal structures according to the sizings supplied by the caller.Subsequent functions will not allocate any more memory, and are thus guaranteed not to fail because of lack of memory.
The preallocation can be limited to some of the internal memory by setting some values to 0 here. That means that if, e.g.,
maxRunCountcannot be reasonably predetermined and should not be set tomaxLength(the only failproof value) to avoid wasting memory, thenmaxRunCountcould be set to 0 here and the internal structures that are associated with it will be allocated on demand, just like withubidi_open().
UBiDi object with preallocated memory.
The number of runs depends on the actual text and maybe anywhere between
1 and maxLength. It is typically small.
pErrorCode - must be a valid pointer to an error code value,
which must not indicate a failure before the function call.
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de